⚠ GIMBAL LOCK — roll and yaw axes are aligned, one control axis is lost
Body X (pitch axis) Body Y (yaw axis) Body Z (roll axis)
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Satellite Attitude Control: Quaternion PD vs Gimbal Lock

Command a target roll, pitch and yaw for a rigid satellite and watch a real PD attitude controller drive it there through genuine quaternion kinematics (q̇ = ½Ω(ω)q). Switch between a coordinate-free quaternion controller and a naive Euler-angle controller that runs three independent per-axis PD loops, and push the target pitch toward 90° to see the Euler controller's roll and yaw axes swing into alignment — real gimbal lock, with one degree of control freedom lost — while the quaternion controller sails through the same attitude without noticing anything special happened.