# How do I determine a direction?

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.

-
That probably depends on whether you want the arrow to point along the shortest path to the destination or along the line of constant heading. –  Rahul Feb 5 '11 at 19:43