Re: bearing calculation off of your heading
- From: "Thomas Magma" <somewhere@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 16:45:13 GMT
Try: Aviation [Navigation] Formulary V1.43 by Ed Williams
http://williams.best.vwh.net/avform.htm
I got the below algorithm from Ask Dr.Math that is based on Ed Williams
website. It's titled 'Bearing Between Two Points'.
http://mathforum.org/library/drmath/view/55417.html
dlat = lat2 - lat1
dlon = lon2 - lon1
y = sin(lon2-lon1)*cos(lat2)
x = cos(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(lon2-lon1)
if y > 0 then
if x > 0 then tc1 = arctan(y/x)
if x < 0 then tc1 = 180 - arctan(-y/x)
if x = 0 then tc1 = 90
if y < 0 then
if x > 0 then tc1 = -arctan(-y/x)
if x < 0 then tc1 = arctan(y/x)-180
if x = 0 then tc1 = 270
if y = 0 then
if x > 0 then tc1 = 0
if x < 0 then tc1 = 180
if x = 0 then [the 2 points are the same]
It looks like a looking algorithm but I don't understand how you can get an
angle between two static points. I'm trying to figure out the angle between
a point and the direction of travel of another point. The above formula does
not take into consideration the direction of travel.
Any comments.
Thomas
.
- Follow-Ups:
- Re: bearing calculation off of your heading
- From: Sam Wormley
- Re: bearing calculation off of your heading
- References:
- bearing calculation off of your heading
- From: Thomas Magma
- Re: bearing calculation off of your heading
- From: Sam Wormley
- bearing calculation off of your heading
- Prev by Date: Re: lost satellite reception
- Next by Date: Re: IS THE GALILEO SYSTEM IN JEOPARDY?
- Previous by thread: Re: bearing calculation off of your heading
- Next by thread: Re: bearing calculation off of your heading
- Index(es):
Relevant Pages
|