Bookmark this page: Add Help calculating  GPRMB value   true bearing to destination   to Yahoo MyWeb Add Help calculating  GPRMB value   true bearing to destination   to Google Bookmarks Add Help calculating  GPRMB value   true bearing to destination   to Windows Live Add Help calculating  GPRMB value   true bearing to destination   to Del.icio.us Digg Help calculating  GPRMB value   true bearing to destination  ! Add Help calculating  GPRMB value   true bearing to destination   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:35 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


Posted by Dominic Sexton on April 12, 2006, 9:32 am


weg22@drexel.edu writes
>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

From

http://williams.best.vwh.net/avform.htm#GCF

Initial great circle heading from point 1 to 2

tc1=mod(atan2(sin(lon1-lon2)*cos(lat2),
cos(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(lon1-lon2)),
2*pi)

That page has lots of other god stuff too.

Hop it helps.

--

Dominic Sexton