9

I have two different systems (Engine A, Engine B). Engine A (Motive Tracking Software) generates (Yaw, Pitch, Roll) and Engine B (Cinema 4D) expects (Heading, Pitch, Bank).

My research brought me to the result that there is no difference between those two systems.

Yaw     Pitch   Roll
Heading Pitch   Bank
Y       X       Z

However, for some reason, when I import the values, I get a mismatch.

My Input values are the following.

Frame, Yaw, Pitch, Roll 

0,  179.98199463, 5.58994007, 20.91039276

1,  -0.02482126, 0.21532322, -0.06678514

2,  -0.03007862, 0.24067645, -0.12998220

But when I import the values, I am getting weird numbers:

Frame, Heading, Pitch, Bank

0, 119.383, -16.126, 72.529

1, -1.422, 12.337, -3.827

2, -1.723, 13.79, -7.447

It would be great if you could give me a hint, or if there is a difference between those systems, that you provide me the correct calculation.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
user1767754
  • 23,311
  • 18
  • 141
  • 164
  • Be careful: the mapping between the coordinate axis _x_, _y_ and _z_ and _yaw_, _pitch_ and _roll_ is **not** always the same (and this may create confusion). In your case, you're mapping _y_ to _yaw_, _pitch_ to _x_ and _roll_ to _z_, but, for example, in another case (in a particular case I'm currently working on), _x_ is mapped to _roll_, _y_ is mapped to _pitch_ and _z_ is mapped to _yaw_. Moreover, care must also be taken regarding the direction of the _x_, _y_ and _z_ axis (in your particular problem) and in general if you're using left- or right-coordinate system. – nbro Mar 08 '17 at 18:38
  • Furthermore, according to this [Wikipedia's article](https://en.wikipedia.org/wiki/Aircraft_principal_axes), _bank_ is actually the _angular displacement_ around the roll axis. – nbro Mar 08 '17 at 18:40

3 Answers3

9

Yaw, Pitch, Roll is the same as Heading, Pitch, Bank.

I was getting weird numbers as Cinema4D was expecting radiant numbers. I've figured out as I was passing for testing purposes (1, 1, 1) for all three axes.

nbro
  • 15,395
  • 32
  • 113
  • 196
user1767754
  • 23,311
  • 18
  • 141
  • 164
  • 2
    A cautionary note for anyone tripping across this answer to learn about "yaw versus heading" (this answer comes up in searches, regardless of what the stackoverflow question is actually about): Be careful to clarify what someone "means" when they use the term yaw. A good clarifying question might be: "If an aircraft has a yaw of 90 degrees, are you saying that it is flying east, or that it is flying 'sideways' regardless of its direction of travel"? – geomojo Mar 11 '22 at 18:57
  • @geomojo If it's flying sideways, isn't that a _roll_ of 90 degrees? :confused: – Orestis Kapar Aug 24 '22 at 17:32
3

Outdated post maybe but I must correct something here. Heading is not the same as yaw. If for example, an aircraft pitches up by 45 deg, and then yaws to the left by 15 degrees, it will not change in heading by 15 deg. Instead it will pitch down and to the left and the heading and pitch will change by less than 15 deg, although the total angle change of heading and pitch combined will be 15 deg.

JB3DG
  • 39
  • 4
  • This is wrong, you are confusing roll, pitch, yaw and rotation vector. What you described is the rotation vector measured by gyro. RPY are ZYX euler angles from an inertial frame of reference (read the wikipedia page) – anishtain4 Jul 11 '19 at 17:31
0

Yaw, pitch, and roll are different from heading, attitude, and bank. Heading, attitude, and bank are what the 3-2-1 Euler angles correspond to. Yaw, pitch, and roll should be thought of as motions. "The vehicle pitches, the vehicle yaws, the vehicle rolls," etc. If you have the angular velocity vector, then projections along the vehicle frame yield the yaw rate, pitch rate, and roll rate.

As another user pointed out, if a vehicle pitches up 45 degrees to an attitude of 45 degrees, and then executes a yawing motion, you are not only varying the heading, but the attitude and bank as well. For example, if the vehicle then yaws 90 degrees, the end result will be that its heading will be 90 degrees off from the original configuration, its attitude will be 0 degrees, and its bank will be 45 degrees.

Evan
  • 71
  • 2