Calculate AROT to orient a vessel prograde

Marijn

Active member
Joined
Mar 5, 2008
Messages
755
Reaction score
166
Points
43
Location
Amsterdam
For my scenario tooling, I want to calculate meaningful numbers for AROT so the scenario will start with the vessel oriented in a predifined orientation. As a start, I want to be able to calculate the numbers I need to orient the vessel prograde for any given orbit.

I have spent quite a bit of time reading up on Euler angles, left- and right handed coordinate systems and pretty much anything I could find about this subject. And although there are many examples out there, including some on this forum, I just can't follow along with any of them. With every example, there is something which I fail to understand and stops me. The mental picture in my brain just always collapses. It's very frustrating.

I know, that as soon as I can get my hands on an complete example, I will be able to complete any other example without much effort just by substituting values and pattern recognition.

On page 7 of the Orbiter Scenario Editor manual, the rotation matrix below is given. It says it transforms from the vessel local frame to the global ecliptic frame.

[ 1 0 0 ] [ cos(b) 0 -sin(b) ] [cos(y) sin(y) 0 ]
[ 0 cos(a) sin(a) ] [ 0 1 0 ] [-sin(y) cos(y) 0 ]
[ 0 -sin(a) cos(a) ] [ sin(b), 0, cos(b) ] [0 0 1 ]

So I am looking for an example where this math is actually applied with a number as a result which is confirmed by Orbiter as being correct. Hopefully, when I can reverse engineer an example, I'll be able to calculate AROT for an orbit like:

RPOS 4595508.49 -2356114.60 4075775.92
RVEL -5093.198 -5216.763 2726.795

Thanks for any help.
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Not sure whether this is an option for you or not, but I usually try to avoid 3d rotation matrices as I manage to confuse myself about the sign convention at least three times whenever I code them - rather I try to use pointing vectors and align vessel body axes with the pointing vectors.

For instance, the pointing vector from your position towards another object you can get very simply by subtracting the two position vectors and normalizing the result.

The condition that the normalized body x-axis dotted into the pointing vector has to be 1 then defines orientation up to a roll angle.

For almost all orientation problems, I find this much easier to handle than trying to obtain rotation angles.
 
Top