If you were Registered and logged in, you could reply and use other advanced thread options
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
weg22@drexel.edu writes
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
- help calculating "true bearing to destination" value in $GPRMB string
- Global Positioning System
- 2006-04-10
- Novice help please
- Garmin GPS
- 2011-12-15
- Help Mapsource
- Garmin GPS
- 2011-10-30



>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