\(
\newcommand{\BE}{\begin{equation}}
\newcommand{\EE}{\end{equation}}
\newcommand{\BA}{\begin{eqnarray}}
\newcommand{\EA}{\end{eqnarray}}
\newcommand\CC{\mathbb{C}}
\newcommand\FF{\mathbb{F}}
\newcommand\NN{\mathbb{N}}
\newcommand\QQ{\mathbb{Q}}
\newcommand\RR{\mathbb{R}}
\newcommand\ZZ{\mathbb{Z}}
\newcommand{\va}{\hat{\mathbf{a}}}
\newcommand{\vb}{\hat{\mathbf{b}}}
\newcommand{\vn}{\hat{\mathbf{n}}}
\newcommand{\vt}{\hat{\mathbf{t}}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\bv}{\mathbf{v}}
\newcommand{\bg}{\mathbf{g}}
\newcommand{\bn}{\mathbf{n}}
\newcommand{\by}{\mathbf{y}}
\)

Euler Angles

Introduction

Attitude Description using Euler Angles

The idea of the Euler angles comes from the following. Take an aircraft in a default position such that its body frame coincides with the inertial frame, which serves as a base reference to the world. In the flat earth approximation, the inertial frame would be with the first axis pointing north, the second axis pointing east, and the third axis pointing down towards the earth. An aircraft in default position with its body frame coinciding with the inertial frame would be an aircraft in level flight flying north (and neglecting any needed angle of attack, i.e. its longitudinal axis being horizontal with respect to the earth). We shall always use right-handed axis systems with the axes being represented by unit vectors perpendicular to each other with respect to the standard Euclidean scalar product (dot product). For more details, see our reference frames primer (and certain aspects of our linear algebra primer as needed).

Now, to obtain an arbitrary aircraft attitude starting from the above default position, rotate the aircraft around one of its current body axes by a certain angle (and list the number of this axis first, counting the axes in the order \(x, y, z\)). Now perform a rotation by another angle around a different current body axis (current referring to the new axes obtained after the first rotation). This second rotation axis has to be a different one than the first rotation otherwise they would just add up to a larger rotation around the same axis. Finally, perform a third rotation by a third angle. The axis of this third rotation can either be the same as the first or the third axis around which we have not rotated so far. Rotations, when by a positive angle, are always to the right, according the the right hand rule (i.e. clockwise if you imagine looking along the rotation axis, with the vector of the axis pointing away from you.

Sets of Euler Angles

In this way, one can obtain 12 different rotations, depending on which axes one chooses: 1-2-1, 1-3-1, 2-1-2, 2-3-2, 3-1-3, 3-2-3; 1-2-3, 1-3-2, 2-1-3, 2-3-1, 3-1-2, 3-2-1. The angles involved in these rotations are called the Euler angles. Of these, we will ultimately only use the 3-2-1 set, but let us discuss all of them in general first.

The choices of axes where one axis is repeated are called symmetric Euler angles or proper/classic Euler Angles. They correspond to the first six choices in the above list. The choices of axes where all three axes are used and none is repeated, are called asymmetric Euler angles, Tait-Bryan angles (or Cardan angles, nautical angles). They correspond to the last six choices in the above list. (Note that some authors refer to the first six simply as Euler angles and the last six as Tait-Bryan angles, without having a term for all twelve cumulatively.)

In aviation it is customary to use the asymmetric choice of 3-2-1 Euler angles to describe aircraft attitude, and they are often referred to by their higher-level term simply as the Euler angles. It is to be noted though that these are by far not the only set in use in aerospace engineering. The symmetric sets also find widespread use, e.g. in astrodynamics describing orbits, where the 3-1-3 choice is popular.

Rotation Matrices around a Single Body Axis

The above attitude description by means of Euler angles is performed by three consecutive rotations, each around one current axis. The corresponding transformation matrices or DCMs for the components of vectors fixed in space (i.e. for their coefficient matrices), which accomplish these three individual rotations are given by

\begin{eqnarray}
M_1(\alpha)&=&\begin{pmatrix}
1 & 0 & 0\\
0 & \cos\alpha & \sin\alpha\\
0 & -\sin\alpha & \cos\alpha
\end{pmatrix}\\
M_2(\alpha)&=&\begin{pmatrix}
\cos\alpha & 0 & -\sin\alpha \\
0 & 1 & 0\\
\sin\alpha & 0& \cos\alpha
\end{pmatrix}\\
M_3(\alpha)&=&\begin{pmatrix}
\cos\alpha & \sin\alpha & 0 \\
-\sin\alpha & \cos\alpha & 0\\
0 & 0& 1
\end{pmatrix}
\end{eqnarray}
where \(\alpha\) can be any of the Euler angles, depending on how one labels them. \(M_1\) rotates around the first axis, \(M_2\) rotates around the second axis, and \(M_3\) rotates around the third axis.

They are combined by matrix multiplication in proper order (reading from right to left) to achieve the desired rotations around the chosen axes. For instance, to obtain the DCM, \(B\), for the 2-3-1 Euler angles, we need to evaluate:
\begin{equation}
B = M_1(\alpha_3)M_3(\alpha_2)M_2(\alpha_1)
\end{equation}
where starting from the initial position, the first rotation is by angle \(\alpha_1\) around the current \(y\)-axis, then rotation by angle \(\alpha_2\) around the current \(z\)-axis, and finally by \(\alpha_3\) around the current \(x\)-axis.

To obtain the DCM, \(B\), for the 2-3-2 Euler angles, we need to evaluate:
\begin{equation}
B = M_2(\alpha_3)M_3(\alpha_2)M_2(\alpha_1)
\end{equation}

In practice, rather than using the same letter with different index for the three angles, typically three different Greek letters are chosen for the three angles, with the choices depending on the context.

 

3-2-1 Euler Angles

When discussing the attitude of aircraft flying in the earth’s atmosphere, the standard choice in aerospace engineering is to use the 3-2-1 Euler angles and label them, in order, \(\psi\), \(\theta\), \(\phi\). They are called yaw angle, pitch angle, and roll angle, respectively. They describe the attitude of the body axis system of the aircraft with respect to the inertial frame of the world.

The 3-2-1 Euler angles are also used to describe the attitude of other common axis systems, like the wind frame axis system (we shall assume here that the air does not move with respect to the earth surface), which gives the direction of the flight path rather than the attitude of the airplane (the two coordinate systems differ, for instance in a sideslip or when angle-of-attack effects are taken into account). Describing the wind frame axis system, one uses the symbols \(\xi, \gamma, \mu\) for the three 3-2-1 Euler angles and calls them horizontal flight path angle (or heading), vertical flight path angle (or elevation), and bank angle, respectively.

Side Note: Terminological Ambiguities

The astute reader has likely noted that in this terminology, the terms roll angle \(\phi\) and bank angle \(\mu\) are not synonymous, even though they are oftentimes similar enough in aircraft flight situations that one does not need to concern much with distinguishing between them (which is why pilots often use the words roll angle and bank angle synonymously—what the attitude indicator indicates is roll angle). The roll angle describes roll around the longitudinal axis of the aircraft, while the bank angle describes “roll” around the velocity vector of the aircraft. During a level turn, for instance, the relevant angle for the horizontal component of lift and thus resulting in a higher load factor is the bank angle $\mu$, not the roll angle \(\phi\), as is easily verified by realizing that lift defined is along an axis of the wind frame (not the body frame), and the wind frame is referenced to the velocity vector of the aircraft and the aircraft plane of symmetry.

Also note that in the above terminology, heading is not the direction in which the airplane is pointing but rather the direction of the velocity vector of the aircraft in horizontal direction, the direction of flight, i.e. the ground track, which will be different in the presence of a crosswind. The direction in which the aircraft is pointing is the yaw angle \(\psi\). This is also a departure from common pilot jargon. Pilots (and flight controllers) usually refer to the direction in which the airplane is pointing as heading, and the corresponding aircraft instrument is the heading indicator, even though it would be more properly called the yaw angle indicator.

Similarly, the word elevation is typically used by pilots for MSL altitudes of the ground, as in field elevation, for instance. This, too, can lead to misunderstandings. We will therefore throughout all of our materials call \(\xi\) and \(\gamma\) horizontal and vertical flight path angle, respectively, and will avoid the terms heading and elevation in this context, whenever possible. The direction in which the aircraft is pointing will be called the yaw angle. And we will distinguish between roll angle and bank angle.

Relation of 3-2-1 Euler Angles to DCM

In terms of the rotation matrices around single axes defined above, the DCM corresponding to the 3-2-1 Euler angles is obtained by evaluating

\begin{equation}
B = M_1(\phi)M_2(\theta)M_3(\psi)
\end{equation}

Forward mapping from Euler angles \(\psi\), \(\theta\), \(\phi\) to the DCM \(B\), which translates from the inertial frame to the body frame is accomplished by the expression

\begin{equation}
B = \begin{pmatrix}
\cos(\theta)\cos(\psi) & \cos(\theta)\sin(\psi) & -\sin(\theta)\\
\sin(\phi)\sin(\theta)\cos(\psi)-\cos(\phi)\sin(\psi) & \sin(\phi)\sin(\theta)\sin(\psi)+\cos(\phi)\cos(\psi) & \sin(\phi)\cos(\theta)\\ \cos(\phi)\sin(\theta)\cos(\psi)+\sin(\phi)\sin(\psi) & \cos(\phi)\sin(\theta)\sin(\psi)-\sin(\phi)\cos(\psi) & \cos(\phi)\cos(\theta)
\end{pmatrix}
\end{equation}

The above DCM, \(B\), (which would correspond to \([BEc]\) in the notation introduced in our linear algebra primer), can now be applied to the coefficient matrices of vectors expressed with respect the inertial frame, to obtain their coefficients in the body frame. To get the inverse of the above matrix, \([EBc]\), going from the body frame to the inertial frame, simply transpose the above matrix, because it is orthonormal.

To obtain the Euler angle \(\phi\), \(\theta\), and \(\psi\) from a given DCM, use the reverse mapping from the DCM back to Euler angles:

\begin{eqnarray}
\psi &=& \tan^{-1}\left(\frac{B_{12}}{B_{11}}\right) \\
\theta &=& – \sin^{-1}(B_{13}) \\
\phi &=& \tan^{-1}\left(\frac{B_{23}}{B_{33}}\right)
\end{eqnarray}

3-2-1 Euler Angle Differential Kinematic Equations

Body Angular Rates \((p,q,r)\) from Euler Angle Rates \((\dot\psi, \dot\theta, \dot\phi)\)

In order to obtain the body angular rates from the Euler angle rates (first time derivative of Euler angles, use the matrix in the following equation:

\begin{equation}
\omega_{\mathcal{B}} = \begin{pmatrix}\omega_1\\\omega_2\\\omega_3\end{pmatrix}_{\mathcal{B}}=
\begin{pmatrix}p \\ q \\ r\end{pmatrix} =
\begin{pmatrix}
-\sin(\theta) & 0 & 1\\
\sin(\phi)\cos(\theta) & \cos(\phi) & 0\\
\cos(\phi)\cos(\theta) & -\sin(\phi) & 0
\end{pmatrix}
\begin{pmatrix}
\dot\psi\\
\dot\theta\\
\dot\phi
\end{pmatrix}
\end{equation}

A comment is in order. On the right, we use the Euler angle order \(\psi, \theta, \phi\), to denote the order of rotations. In much of aerospace engineering literature the order \(\phi, \theta, \psi\) is preferred (in order of the enumeration of the axes, around which the rotations are performed). This is merely a matter of convention and changes the content of the matrix, but has no bearing on the result. This is because the Euler angles live in a mixture of axis systems and do not form a vector and do not transform under basis transformation as a vector (which is why they are here just an arbitrarily arranged 3-tuple of numbers). This is very much unlike \((p, q, r)\), which is the coordinate matrix of the angular velocity vector expressed with respect to the body frame \(\mathcal{B}\); their order matters.

Euler Angle Rates \((\dot\psi, \dot\theta, \dot\phi)\) from Body Angular Rates \((p,q,r)\)

However, more frequently needed in attitude integration is the inverse of the above matrix, relating the body angular rates (measured by onboard rate gyroscopes) to the Euler angle rates:

\begin{equation}
\begin{pmatrix}
\dot\psi\\
\dot\theta\\
\dot\phi
\end{pmatrix}
=
\frac{1}{\cos\theta}
\begin{pmatrix}
0 & \sin(\phi) & \cos(\phi)\\
0 & \cos(\phi)\cos(\theta) & -\sin(\phi)\cos(\theta)\\
\cos(\theta) & \sin(\phi)\sin(\theta) & \cos(\phi)\sin(\theta)
\end{pmatrix}
\left(\begin{matrix}p\\q\\r \end{matrix}\right)
=\mathcal{L}(\psi, \theta, \phi)\omega_{\mathcal{B}}
\end{equation}

This matrix has been obtained by inverting the previous matrix (this matrix is not orthonormal and cannot be simply transposed to obtain the inverse). Note that this matrix becomes ill-defined for \(\theta=90^\circ\), which is where the Euler angles have a singularity and experience gimbal lock.

The Euler angle rates obtained from the above can then be integrated with respect to time to obtain the attitude of the aircraft. Because Euler angles are a minimal set, one does not have to worry about satisfying extra constraints of redundant parameter sets. But one may have to worry about coordinate singularities as mentioned. Indeed, with Euler angles, one is never more than 90 degrees away from a coordinate singularity. Which is why we shall explore other attitude parametrizations as well. However, unless one performs aerobatics, aircraft usually do not point straight up or down, so for most regimes of flight, the coordinate singularity of the 3-2-1 Euler angles does not pose a major issue.

3-1-3 Euler Angles \(\Omega\), \(i\), \(\omega\)

The 3-1-3 Euler angles are sequential rotations around the third, first, and again the third frame axis, respectively. 3-1-3 Euler Angles are typically used for orbits in astrodynamics, where the angles are called, in order, \(\Omega\) (longitude of the ascending node, i.e. angle from the vernal equinox), \(i\) (inclination), and \(\omega\) (argument of periapsis). For more information on these angles, we suggest you consult the Wikipedia page on orbital elements. Note that \(i\) denotes an Euler angle here and not the imaginary number \(i=\sqrt{-1}\).

The 3-1-3 Euler angles are a symmetric Euler angle set. We discuss it briefly here just to give the reader a taste of a different set of Euler angles in use, and to illustrate that repeating an axis and using a symmetric Euler angle set can make physically good sense, depending on application. For aircraft, the use of a symmetric Euler angle set would be less desirable.

Relation of 3-1-3 Euler Angles to DCM

The DCM is obtained from the 3-1-3 Euler angles by evaluating:
\begin{equation}
M_3(\omega)M_1(i)M_3(\Omega)
\end{equation}

Forward mapping from 3-1-3 Euler angles \(\Omega\), \(i\), \(\omega\) to the DCM, \(B\), leads to:

\begin{equation}
B = \begin{pmatrix}
\cos(\theta_3)\cos(\theta_1)-\sin(\theta_3)\cos(\theta_2)\sin(\theta_1) & \cos(\theta_3)\sin(\theta_1)+\sin(\theta_3)\cos(\theta_2)\cos(\theta_1) & \sin(\theta_3)\sin(\theta_2)\\
-\sin(\theta_3)\cos(\theta_1)-\cos(\theta_3)\cos(\theta_2)\sin(\theta_1) & -\sin(\theta_3)\sin(\theta_1)+\cos(\theta_3)\cos(\theta_2)\cos(\theta_1) & \cos(\theta_3)\cos(\theta_2)\\
\sin(\theta_2)\sin(\theta_1) & -\sin(\theta_2)\cos(\theta_1) & \cos(\theta_2)
\end{pmatrix}
\end{equation}

Inverse mapping from the DCM, \(B\) back to Euler angles:

\begin{eqnarray}
\Omega &=&  \arctan\left(\frac{B_{31}}{-B_{32}}\right) \\
i &=& \arccos(B_{33}) \\
\omega &=& \arctan\left(\frac{B_{13}}{B_{23}}\right)
\end{eqnarray}

Warning: The arctan function is to be implemented with arctan2() (or atan2()) function in code, which takes two arguments (i.e. \(B_{31}\) and \(-B_{32}\)) instead of just one (i.e. \(B_{31}/-B_{32}\)) and automatically determines the proper quadrant of the resulting angle. It is therefore imperative that the minus sign in the first equation stays in the denominator; do not take it into the numerator, or you will get the wrong quadrant.

Conversions between Different Sets of Euler Angles

If you want to go from one set of Euler angles to a different one (i.e. from 3-2-1 to 3-1-3), you can construct the DCM from the first set, and then extract the Euler angles from the DCM for the second set. This always works, making the DCM the “universal translator” between sets of Euler angles (and any other rotation formalism by the way), even though between some specific sets direct conversion formulas may exists, without having to compute the DCM in between.