Convert spacecraft attitude between Euler angles, quaternions, and direction cosine matrices. This tool also
shows the gimbal-lock risk that appears when Euler pitch approaches ±90°, making it useful for GNC and 6DOF simulation work.
What this tool computes
Attitude can be represented in several mathematically equivalent ways. This converter uses a 3-2-1 yaw-pitch-roll convention
and computes the equivalent quaternion and DCM.
Euler angles: yaw \(\psi\), pitch \(\theta\), roll \(\phi\)
Quaternion \([q_0, q_1, q_2, q_3]\)
Direction cosine matrix
Gimbal-lock warning for Euler-angle singularity
Simple 3D body-axis visualization
Euler angles
Euler angles are intuitive because they resemble yaw, pitch, and roll commands. However, they are sequence-dependent
and can become singular.
\[
C = R_x(\phi)R_y(\theta)R_z(\psi)
\]
In a 3-2-1 convention, pitch near \(\pm 90^\circ\) causes yaw and roll to lose independent meaning.
Quaternion attitude
Quaternions avoid Euler-angle singularities and are widely used in spacecraft simulation, estimation, and control.