Getting heading from velocity East and Velocity North?

  • Thread starter Thread starter Bruce E. Stemplewski
  • Start date Start date
B

Bruce E. Stemplewski

Another thought I had was to use velocity East and Velocity North to
determine heading. I'm no math wiz so I don't even know if this is
possible. Is it? If so where can I find the algorithm?
 
Bruce said:
Another thought I had was to use velocity East and Velocity North to
determine heading. I'm no math wiz so I don't even know if this is
possible. Is it? If so where can I find the algorithm?

Since most GPS units already compute the heading ( actually the track )
internally from the velocities, why bother to do it externally ?


--
Regards,

Adrian Jansen adrianjansen at internode dot on dot net
Design Engineer J & K Micro Systems
Microcomputer solutions for industrial control
Note reply address is invalid, convert address above to machine form.
 
Adrian said:
Since most GPS units already compute the heading ( actually the track )
internally from the velocities, why bother to do it externally ?

The Garmin protocol does not give heading. Plus you would have to
download the whole track log to do it.
 
Bob said:
heading = atan2(Ve, Vn) in radians atan2 is a four quadrant arctangent

http://www.cplusplus.com/ref/cmath/atan2.html
Thanks just got the same thing from an astrophysicist friend of mine.

Here is the whole thing in C

double heading = atan2(v_e, v_n); // This function returns the
angle, in radians, between -pi and pi.
heading *= 180.0 / M_PI; // Convert from radians to
degrees. Now heading is in the range [-180, 180]
if (heading < 0.0) heading += 360.0; // Get rid of negative headings.
 

Members online

No members online now.
Back
Top