Converting reference frames

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
1
Points
0
Location
Ontario
I'm trying to find the attitude of a vessel orbiting Earth in the M50 reference frame. This is a right-handed frame where the X axis points towards the vernal equinox and the Z axis is parallel to Earth's rotation axis. (To be precise, these axes should be correct for the year 1950, although I don't think they would have changed significantly since then).
I think the global frame used by Orbiter is fairly similar, although I haven't found a precise definition of what Orbiter uses. How would I convert the attitude returned by GetGlobalOrientation from Orbiter's frame to the M50 frame?
 

Chode

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 21, 2008
Messages
107
Reaction score
1
Points
0
The x axis is the same, but y points north in Orbiter. In addition, Orbiter uses a left-handed system, so if you swap y and z values, that should get you closer. But you say z is parallel to the
Earth's axis, where in Orbiter, the global frame is referenced to the ecliptic, not the Earth's rotation, so you need to account for the tilt of the Earth's axis relative to the ecliptic by rotating your coordinate system by the tilt of Earth's axis. I have the detailed numbers which I can dig out if you like.

Regards
 

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
1
Points
0
Location
Ontario
So if I swap the Y and Z values, then rotate the vector around the X axis by the tilt of Earth's axis, would that do it? I think theY value of the new vector should be multipled by -1 to convert it to a right-handed frame. (the positive Z-axis points toward the North Pole)
 

Chode

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 21, 2008
Messages
107
Reaction score
1
Points
0
The transform should be this:

X_M50 = X_Orbiter
Y_M50 = cos(theta) * Z_Orbiter - sin(theta) * Y_Orbiter
Z_M50 = cos(theta) * Y_Orbiter + sin(theta) * Z_Orbiter

where theta is the obliquity of the Earth's axis, 23.4458878 degrees.

If you want to be completely accurate, you would also need to apply a correction for precession, since M50 is referenced to 1950, while Orbiter's coordinates are referenced to J2000.

Regards
 

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
1
Points
0
Location
Ontario
Another question: given attitude in a right-handed LVLH frame (Z-axis points toward centre of Earth, X-axis points in direction of motion), is there a way to find the attitude in the M50 frame?
 

Chode

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 21, 2008
Messages
107
Reaction score
1
Points
0
You'll need some more info like your latitude and longitude, your heading, the date and time. Knowing all that, you should be able to calculate your global orientation.

Regards
 
Top