Re: bearing calculation off of your heading
- From: Sam Wormley <swormley1@xxxxxxxxx>
- Date: Wed, 14 Feb 2007 19:46:51 GMT
Thomas Magma wrote:
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
Those two "points" are not points at all, but distances between
two points in the east-west and north-south directions. It is a
less restrictive solution than the one I suggested with UTM
coordinates.
-Sam
.
- References:
- bearing calculation off of your heading
- From: Thomas Magma
- Re: bearing calculation off of your heading
- From: Sam Wormley
- Re: bearing calculation off of your heading
- From: Thomas Magma
- bearing calculation off of your heading
- Prev by Date: Re: bearing calculation off of your heading
- 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
|