A method for determining heading misalignment between a device and a platform, the device within the platform, using acceleration or deceleration of the platform, wherein the device comprises sensors capable of providing sensor readings, wherein said sensors comprise at least one accelerometer with at least two axes, the method comprising the steps of: a) detecting that the platform is moving in a straight line, and responsive to detecting that the platform is moving in a straight line, detecting acceleration or deceleration of the platform; b) obtaining leveled horizontal components of acceleration readings along forward and lateral axes of the device from the accelerometer; and c) when acceleration or deceleration of the platform is detected, calculating a heading misalignment angle between the device and the platform using the leveled horizontal components of acceleration readings along the forward and lateral axes of the device, whereby in a case where acceleration is detected said heading misalignment angle is calculated as equal to atan 2(- accel leveled,lateral, accel leveled,forward) and in a case where deceleration is detected said heading misalignment angle is calculated as equal to atan 2( accel leveled,lateral, -accel leveled,forward) where ( accel leveled,lateral) is the leveled lateral horizontal component of acceleration and ( accel leveled,forward) is the leveled forward component of acceleration, and wherein the leveled horizontal components of acceleration used in calculating the heading misalignment angle between the device and platform comprise one of the following: (i) the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (ii) a buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (iii) the summation of buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (iv) a smoothed version of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; or (v) a smoothed version of a buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device. a) detecting that the platform is moving in a straight line, and responsive to detecting that the platform is moving in a straight line, detecting acceleration or deceleration of the platform; b) obtaining leveled horizontal components of acceleration readings along forward and lateral axes of the device from the accelerometer; and c) when acceleration or deceleration of the platform is detected, calculating a heading misalignment angle between the device and the platform using the leveled horizontal components of acceleration readings along the forward and lateral axes of the device, whereby in a case where acceleration is detected said heading misalignment angle is calculated as equal to atan 2(- accel leveled,lateral, accel leveled,forward) and in a case where deceleration is detected said heading misalignment angle is calculated as equal to atan 2( accel leveled,lateral, -accel leveled,forward) where ( accel leveled,lateral) is the leveled lateral horizontal component of acceleration and ( accel leveled,forward) is the leveled forward component of acceleration, and wherein the leveled horizontal components of acceleration used in calculating the heading misalignment angle between the device and platform comprise one of the following: (i) the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (ii) a buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (iii) the summation of buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; (iv) a smoothed version of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device; or (v) a smoothed version of a buffered history of the leveled horizontal components of acceleration readings along the forward and lateral axes of the device.