Bookmark this page: Add help calculating  GPRMB value to Yahoo MyWeb Add help calculating  GPRMB value to Google Bookmarks Add help calculating  GPRMB value to Windows Live Add help calculating  GPRMB value to Del.icio.us Digg help calculating  GPRMB value! Add help calculating  GPRMB value to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by weg22 on April 10, 2006, 2:34 pm


Hi everyone,

In the $GPRMB data string, the 11th byte gives the "true bearing to
destination". I need to verify this parameter and was wondering how to
calculate it based on the LAT and LONG data. I have come across a
variey of formulas on the web:

TB1 =
acos((sin(LAT_DEST)-sin(LAT_START)*cos(D))/(sin(D)*cos(LAT_START)))
TB2 = 360 -
acos((sin(LAT_DEST)-sin(LAT_START)*cos(D))/(sin(D)*cos(LAT_START)))
TB3 = atan2((LAT_DEST - LAT_START),(LONG_DEST - LONG_START))

I think TB2 (law of cosines) is probably the most accurate and
efficient way to calculate this value, right?

Thanks in advance,
weg