Hello all,
I need to convert a spacecraft attitude (roll/pitch/yaw) from Cartesian XYZ, earth-centric space (XY plane slicing the Earth equator plane, z-axis going through poles) to spherical Earth frame of reference (aircraft attitude), that is, nominal roll/pitch/yaw attitude values that AIRCRAFT use anywhere on Earth.
Moreover, to avoid gymbal lock problems, I'd like to use quaternions to implement this. I am using a public domain Physics Engine (Newton Game Dynamics) coupled with a graphics client that ONLY accepts aircraft (spherical Earth frame of reference) attitude values. The Physics engine provides the attitude quaternion in Earth centric frame of reference, and I need to convert this attitude quaternion to Spherical Earth frame of reference. This derived attitude will, of course, depend on where on earth the spacecraft is (Lat/Long), so what I am looking for is some quaternion "unwind" sequence that will use Lat and Long position on the globe and convert the attitude into "local" values.
This has nothing to do with Orbiter per se, although, I am considering using Orbiter as a server only (which is another topic entirely), if I can't get this solved.
Can anyone assist me or point me in the right direction towards the solution?
Many thanks,
Misho
I need to convert a spacecraft attitude (roll/pitch/yaw) from Cartesian XYZ, earth-centric space (XY plane slicing the Earth equator plane, z-axis going through poles) to spherical Earth frame of reference (aircraft attitude), that is, nominal roll/pitch/yaw attitude values that AIRCRAFT use anywhere on Earth.
Moreover, to avoid gymbal lock problems, I'd like to use quaternions to implement this. I am using a public domain Physics Engine (Newton Game Dynamics) coupled with a graphics client that ONLY accepts aircraft (spherical Earth frame of reference) attitude values. The Physics engine provides the attitude quaternion in Earth centric frame of reference, and I need to convert this attitude quaternion to Spherical Earth frame of reference. This derived attitude will, of course, depend on where on earth the spacecraft is (Lat/Long), so what I am looking for is some quaternion "unwind" sequence that will use Lat and Long position on the globe and convert the attitude into "local" values.
This has nothing to do with Orbiter per se, although, I am considering using Orbiter as a server only (which is another topic entirely), if I can't get this solved.
Can anyone assist me or point me in the right direction towards the solution?
Many thanks,
Misho