Re: bearing calculation off of your heading




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


.



Relevant Pages

  • Re: bearing calculation off of your heading
    ... Thomas Magma wrote: ... 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. ...
    (sci.geo.satellite-nav)
  • Re: Compound miter brainteaser
    ... I agree with your algorithm, ... One of the other common algoriths for computing the miter (x in your ... times the cosine of the angle between them. ... A second way to calculate the dot product is to write the vectors as ...
    (rec.woodworking)
  • Re: Compound miter brainteaser
    ... >I agree with your algorithm, ... recall that the dot product of two vectors is ... > times the cosine of the angle between them. ... > If we take the peak of the roof to be the point, and we imagine ...
    (rec.woodworking)
  • Re: Public domain algorithm for arbitrary-precision fast division?
    ... David N. Williams wrote: ... >> I'm looking for an algorithm for doing arbitrary-precision ... the fastest method uses fast multiplication by two steps. ... I've never used it, but I must say that from the outside, GMP ...
    (sci.math.num-analysis)
  • Re: Determining angle via Arcsine?
    ... we also know that the angle must be between 0-360 Degrees ... The angle theta which a line from the origin to the point ... One possible algorithm is to first determine the angle from the origin to ... to correct to the proper quadrant by use of the signs of x and y. ...
    (sci.math)