2
$\begingroup$

I have three points on a map: origin, position, and destination. For each point, I have a latitude and longitude. The position point includes the lat/long plus a heading. The heading is in degrees between $0^{\circ}$ and $360^{\circ}$. $0^{\circ}$ and $360^{\circ}$ both represent absolute North.

I want to draw an arrow that points from towards the destination from the current position, considering the heading. How do I determine the degree to draw the line from and two.

Essentially, I'm trying to figure out how to build a compass where the destination is always north.

  • 1
    That probably depends on whether you want the arrow to point along [the shortest path to the destination](http://en.wikipedia.org/wiki/Great_circle) or along [the line of constant heading](http://en.wikipedia.org/wiki/Rhumb_line).2011-02-05

1 Answers 1