General Question Converting Eulers to Pitch-Yaw-Bank

Evgheny

New member
Joined
Oct 18, 2011
Messages
29
Reaction score
0
Points
0
Location
Moscow
How to convert Eulers angles to Pitch-Yaw-Bank?

This functionality can be demonstrated in Scenario Editor. There, I can modify Pith, Yaw or Bank and see how Euler angles are modified.

NsYN92G.png
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,624
Reaction score
2,343
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
How to convert Eulers angles to Pitch-Yaw-Bank?

Well... lets start with the obvious: That takes a whole lot of math. If you already know linear algebra, you will now get bored.

Next, like Pitch-Yaw-Roll (PYR), Euler angles have singularities, in which you need conventions for having at least a workable attitude, because your component rotation axes become parallel (like gimbal lock).

The whole problem is described mathematically as two matrixes: One for PYR and one for Euler (XYZ). every column in such a matrix describes the base unit vectors of your local coordinate system: The first column is the X axis of your spacecraft (1,0,0) after being projected into the G-body relative coordinate system of Orbiter. Every matrix is 3x3 large, and every "cell" in the matrix contains a formula that calculates a number from the angles (PYR or XYZ).

And the resulting numbers in every cell in the PYR matrix is equal to every cell in the XYZ matrix (despite having different formulas).

So, you have 9 equations, and six variables (PYR angles and Euler angles)... now you just need to pick those equations, that are easiest to solve for your direction.

Now, since I am very lazy, I will just look for a link where the formulas have already been solved.
 

Evgheny

New member
Joined
Oct 18, 2011
Messages
29
Reaction score
0
Points
0
Location
Moscow
I know that, Euler angles in Eulers are in 'ZYX' convention, so first rotation is about z-global axis: so, in (alpha, beta, gamma) Eulers, the third angle is the vessel's roll - because vessel's z-axis matches global z-axis when Eulers angles are (0,0,0)

I'm trying to understand your answer in this paragraph:
The whole problem is described mathematically as two matrixes: One for PYR and one for Euler (XYZ). every column in such a matrix describes the base unit vectors of your local coordinate system: The first column is the X axis of your spacecraft (1,0,0) after being projected into the G-body relative coordinate system of Orbiter. Every matrix is 3x3 large, and every "cell" in the matrix contains a formula that calculates a number from the angles (PYR or XYZ).

By these matrices you don't mean Rotation matrices, do you?
 

Thunder Chicken

Fine Threads since 2008
Donator
Joined
Mar 22, 2008
Messages
4,371
Reaction score
3,304
Points
138
Location
Massachusetts
I might be muddling this conversation a bit, but I recall there was something peculiar about the vector math as applied in Orbiter itself, the expected right hand convention was actually left handed. I think I was looking to calculate a normal vector or something. Dr. Martin explained it to me, think it was something to do with DivX or something like that.

TL;DR - Careful about trying to compare math conventions to what is done in Orbiter may lead to frustration.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,624
Reaction score
2,343
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I might be muddling this conversation a bit, but I recall there was something peculiar about the vector math as applied in Orbiter itself, the expected right hand convention was actually left handed. I think I was looking to calculate a normal vector or something. Dr. Martin explained it to me, think it was something to do with DivX or something like that.

TL;DR - Careful about trying to compare math conventions to what is done in Orbiter may lead to frustration.

Almost right.

Orbiter uses a left-handed coordinate system, because DirectX uses a left-handed coordinate system. Call it the Ned Flanders of all game engines.
 
Top