Chaining turns: the object's axes or the world's axes
When we add one more turn to the object, there are two different questions: turn about the object's own axis, or about the fixed world axis? The answer decides which side we multiply on.
7.1Two kinds of "turn about x"
Imagine the object already turned 90° about z. Now "turn about x". The object’s own x has moved with it, but the world’s x is still where it was. These are two different turns, and they give different results.
Here q is the orientation so far, and Δq (delta q) is the quaternion of the new turn. The arrow ← means: replace q by what stands on the right.
With numbers. Start with q = 90° about z = [0.707, 0, 0, 0.707], and add Δq = 90° about x = [0.707, 0.707, 0, 0]:
Two different results, so two different orientations.
Why this way round? From lesson 5, the quaternion on the right acts first. In \(\Delta q \otimes q\), the old q acts first and the new turn comes after it, about the world axes. In \(q \otimes \Delta q\), the new turn acts first, while the object is still in its start pose, where its own axes and the world axes are the same. Then q carries the whole thing along. So the new turn ends up about the object’s own axes.
7.2Euler angles are a chain of three turns
Now we can write the ZYX Euler angles as one product:
Read it left to right: yaw, then pitch about the new y, then roll about the newest x. Those are turns about the object’s own axes, multiplied on the right. Read it right to left: roll, pitch, yaw about the fixed world axes. Both readings give the same result. That’s why both descriptions of Euler angles you see in books are correct.
7.3Which one do I need?
Ask where the turn is measured. A gyroscope is fixed to the object, and a pilot or a player thinks "pitch up" from the cockpit. Those are turns about the object’s own axes, so we multiply on the right: \(q \leftarrow q \otimes \Delta q\). A user dragging a 3D model on the screen turns it about the fixed screen axes, so we multiply on the left. We use the first one in lesson 9.
Every multiplication adds a tiny rounding error, and after thousands of steps the length of q drifts away from 1. So after chaining, we divide q by its length. One square root and four divisions, and q is a clean rotation again.
- Object axes (many books say body axes): multiply the new turn on the right, q ⊗ Δq.
- World axes: multiply on the left, Δq ⊗ q.
- Turn rates measured on the object itself are object-axis turns.
- Normalise q after many multiplications.
✓Check yourself
A player pushes the stick to pitch the plane. Do we multiply the new turn on the left or on the right?
On the right, q ⊗ Δq. The player thinks from inside the plane, so it is a turn about the object’s own axes.
Is "yaw 90° then roll 90° about the object's axes" the same as "roll 90° then yaw 90° about the world axes"?
Yes. Both are q_yaw ⊗ q_roll. Try it in the lab.
+Sources and further reading
- J. Solà, "Quaternion kinematics for the error-state Kalman filter", 2017
chapter 2 and 4: composing rotations, local and global