Lesson
The theory — Gimbal Lock & Quaternions
A gimbal is three rings, one inside the next, each free to turn about its own axis. Three rings, three angles, and any orientation you like — until two of the rings line up. Gimbal lock is that moment: the outer and inner rings share a plane, their two angles do the same job, and one whole direction of turn becomes unreachable whichever way the rings are set. A quaternion is the other way to write a rotation, four numbers rather than three, and it has no rings to line up.
What each symbol means
ψ, θ, φ- yaw, pitch and roll — the three ring angles, applied in that order about z, then the new y, then the new x
q- the quaternion
(w, x, y, z):w = cos(α/2)for a single turn of α, and the restsin(α/2)times the axis it turns about |cos θ|- the freedom left: the size of the determinant of the map from ring rates to how the body turns, 1 when the rings are square and 0 when two are parallel
How to read what you see
The page opens at yaw 30°, pitch 60°, roll 20°. The quaternion row reads 0.8463, 0.0178, 0.5145, 0.1369, and the row below turns that into the one thing it really is: a single turn of 64.4° about an axis close to y. Freedom reads 50.0%, which is cos 60° exactly, and the two probe rows read 5.2° and 19.3° — both still moving, but no longer by the same amount. Drag pitch to 90° and the first of those two falls to 0.0°.
- Assumes
- That the three turns happen in this order and about these axes. Change the convention to z-y-z and the fold moves to a middle angle of 0° instead of 90°, though it does not go away. Every three-angle scheme has a locked configuration somewhere, which is a theorem about three-dimensional rotation rather than a shortcoming of one convention.
- Breaks when
- It does not break; it is the point. Apollo's guidance platform carried three gimbals rather than four, so the crew had a region of attitudes to steer around rather than through, and the alternative was a heavier fourth ring. What breaks is the idea that more precision helps: at 90° the third freedom is gone rather than small, and no number of decimal places in yaw or roll will recover it.
Problem solved in full
-
What is left to control at 90° of pitch 6 steps
Set pitch to 90° and yaw to 20°, with roll at 0°. Show that adding 10° to yaw and 10° to roll leaves the body exactly where it was, and say what the orientation does still depend on.
-
The rotation is three turns in order: yaw about z, then pitch about the new y, then roll about the new x. Written out,
R = R_z(ψ)·R_y(θ)·R_x(φ). -
Put θ = 90°. The middle turn carries the x axis onto −z and the z axis onto x, so the first turn and the last one are now being applied about the same line in space. Whatever ψ does, φ can undo.
-
So the product collapses to a single turn that depends on φ − ψ and on nothing else. Two different pairs with the same difference are the same orientation, not merely a similar one.
-
Check it. Starting from ψ = 20°, φ = 0°, the difference is −20°. Move to ψ = 30°, φ = 10° and the difference is still −20°.
-
So those two sets of angles are not merely close. They name the same orientation, and the gap between them is zero — the angle row does not move at all.
-
Now break the difference instead. ψ = 30°, φ = −10° gives −40°, and the body swings the full 20.0000°.
Answer
Adding 10° to both leaves the body exactly where it was — the two orientations differ by 0.0000°, and both are the same single turn of 91.728° about (−0.1711, 0.9703, 0.1711). Adding to one and subtracting from the other moves it the full 20.0000°. What survives at θ = +90° is φ − ψ, one number where there were two, and at θ = −90° it is φ + ψ instead. The third degree of freedom has stopped existing rather than become hard to reach, and no amount of precision in ψ or φ will bring it back.
-