Re: bearing calculation off of your heading



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


.



Relevant Pages

  • Re: bearing calculation off of your heading
    ... I got the below algorithm from Ask Dr.Math that is based on Ed Williams ... 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: 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)
  • hough transform
    ... Hello guys!I have a problem with the algorithm i created on implementing ... hough transform over some points in an image. ... to all the angles the sum at each angle in the accumulator matrix is equal ... degrees because the document has none or very little skew angle. ...
    (sci.image.processing)