Great Circle bearings betweeen Latitude/Longitude points
Having the start/end points of a great-circle, compute their bearings.
Here's how it works:
Because earth is (almost) a sphere, the shortest distance from, say, Spain to Japan is not a straight line, but a great-circle line, that looks like this. So a plane would start its flight at a 29° bearing in Spain but land at 150° in Japan. That's how the geometry works.
It may come in handy.