I'm creating a very basic simulation which involves air travel across the world and am trying to correctly position and orient my aircraft in a rendered 3D representation.
I am representing the Earth as a perfect sphere with unit radius and each aircraft as two geographic points on the surface of the sphere (current position and destination). Aircraft should always move along the shortest path to their destination (great circles); no other factors are considered.
In my head, always moving along great circles should make this easy. The "starting point" for aircraft is at the south pole, oriented along the prime meridian, with all rotations taking place around the center of the Earth. Correctly positioning and orienting the aircraft should then be a matter of:
- Finding the great circle which passes through both the aircraft's current position and destination.
- Calculating the point of intersection between that circle and the prime meridian.
- Pitching the aircraft along the prime meridian to the point of intersection.
- Yawing the aircraft so that it is oriented along the circle.
- Pitching the aircraft along the great circle until it reaches its current position.
Unfortunately, I don't know how to accomplish the first step, let alone all five.
I'm currently representing coordinates as decimal longitude/latitude, but translating those into yaw/pitch radians or UV coordinates is trivial, if that makes the math simpler. I'm also not currently interested in distance or time, just position and orientation.
Can anyone provide me with the formulas to implement this? (Or point me towards an alternate approach if I'm barking up the wrong tree?) In particular, I'd be grateful for a good resource on this type calculation; I imagine I'll be doing quite a bit of it in the near future and my Google skills have so far failed me.