Conversion between quaternions and Euler angles

Spatial rotations in three dimensions can be parametrized using both Euler angles and unit quaternions. This article explains how to convert between the two representations. Actually this simple use of 'quaternions' was first presented by Euler some seventy years earlier than Hamilton to solve the problem of magic squares. For this reason the dynamics community commonly refers to quaternions in this application as 'Euler parameters'. Spatial rotations in three dimensions can be parametrized using both Euler angles and unit quaternions. This article explains how to convert between the two representations. Actually this simple use of 'quaternions' was first presented by Euler some seventy years earlier than Hamilton to solve the problem of magic squares. For this reason the dynamics community commonly refers to quaternions in this application as 'Euler parameters'. For the rest of this article, the JPL quaternion convention shall be used. A unit quaternion can be described as: We can associate a quaternion with a rotation around an axis by the following expression where α is a simple rotation angle (the value in radians of the angle of rotation) and cos(βx), cos(βy) and cos(βz) are the 'direction cosines' locating the axis of rotation (Euler's Rotation Theorem). Similarly for Euler angles, we use the Tait Bryan angles (in terms of flight dynamics): where the X-axis points forward, Y-axis to the right and Z-axis downward with angles defined for clockwise/lefthand rotation. In the conversion example above the rotation occurs in the order heading, attitude, bank (about intrinsic axes). The orthogonal matrix (post-multiplying a column vector) corresponding to a clockwise/left-handed (looking along positive axis to origin) rotation by the unit quaternion q = q 0 + i q 1 + j q 2 + k q 3 {displaystyle q=q_{0}+iq_{1}+jq_{2}+kq_{3}} is given by the inhomogeneous expression: or equivalently, by the homogeneous expression: If q 0 + i q 1 + j q 2 + k q 3 {displaystyle q_{0}+iq_{1}+jq_{2}+kq_{3}} is not a unit quaternion then the homogeneous form is still a scalar multiple of a rotation matrix, while the inhomogeneous form is in general no longer an orthogonal matrix. This is why in numerical work the homogeneous form is to be preferred if distortion is to be avoided.

[ "Backward Euler method" ]
Parent Topic
Child Topic
    No Parent Topic