next up previous contents
Next: Position Up: Kinematic Equations Previous: Euler Angles


Euler angles have two disadvantages. First, the Euler angle equations contain many trigonometric functions. Trigonometric functions are very slow compared to basic arithmetic operations such as addition and multiplication. For computational efficiency, it is almost always better to choose a method using only simple arithmetic operations.

The more important disadvantage is the numerical singularity appearing in Equations 17 and 19 when $\Theta=\pm\ensuremath{90^\circ} $, that is, when the airplane's nose points straight up or down. While not a problem in normal, level flight, the singularity can present numerical problems when the airplane performs maneuvers such as loops.

Replacing the three Euler angles with four quarternions alleviates both difficulties. Because only three parameters define any possible rotation, the quarternions need a constraint so that there are only three independent variables. This constraint is % latex2html id marker 1552

e02+e12+e22+e32=1 (20)

One nice feature of quarternions is that numerical integration of their time derivatives tends not to destroy the constraint. Thus, a flight simulator only needs to normalize the quarternions occasionally. With high enough numerical precision, it may not ever have to normalize them.

The direction cosine matrix for the airplane, constructed from the four quarternions, is given by Equation 21 % latex2html id marker 1554

 \begin{displaymath}[C]= \left[
e_0^2+e_1^2-e_2^2-e_3^2 & 2 (e...
...(e_2 e_3-e_0 e_1) & e_0^2-e_1^2-e_2^2+e_3^2
\end{displaymath} (21)

The kinematic equations for the quarternions are given by Equations 22-25 % latex2html id marker 1556
$\displaystyle \dot e_0$ = $\displaystyle -\textstyle{\frac{1}2}(e_1p + e_2q + e_3r)$ (22)
$\displaystyle \dot e_1$ = $\displaystyle \textstyle{\frac{1}2}(e_0p - e_3q + e_2r)$ (23)
$\displaystyle \dot e_2$ = $\displaystyle \textstyle{\frac{1}2}(e_3p + e_0q - e_1r)$ (24)
$\displaystyle \dot e_3$ = $\displaystyle \textstyle{\frac{1}2}(-e_2p + e_1q + e_0r)$ (25)

Quarternions are more computationally efficient than Euler angles, and do not exhibit singularities. Furthermore, the kinematic equations using quarternions are hardly more complex then the corresponding equations using Euler angles; some might say that the quarternion equations are simpler. In fact, the only drawback to using quarternions is that they have no useful physical meaning.

In practice, this is not a serious drawback. Only a human can benefit from the direct physical meaningfulness of the Euler angles. Humans can use Euler angles to visualize an aircraft's orientation, but computers determine the orientation by mathematical computation. Thus, it is only important to use Euler angles when transferring information to and from a human, i.e., for input and output. It is not important at all to use Euler angles internally.

When a simulator using quarternions inputs the initial orientation of an airplane as Euler angles, it must convert them to quarternions. Equations 26-29 give the formulas for this % latex2html id marker 1558

e0 = $\displaystyle \cos\textstyle{\frac{\Psi}2}\cos\textstyle{\frac{\Theta}2}\cos\te...
...xtstyle{\frac{\Psi}2}\sin\textstyle{\frac{\Theta}2}\sin\textstyle{\frac{\Phi}2}$ (26)
e1 = $\displaystyle \cos\textstyle{\frac{\Psi}2}\cos\textstyle{\frac{\Theta}2}\sin\te...
...xtstyle{\frac{\Psi}2}\sin\textstyle{\frac{\Theta}2}\cos\textstyle{\frac{\Phi}2}$ (27)
e2 = $\displaystyle \sin\textstyle{\frac{\Psi}2}\cos\textstyle{\frac{\Theta}2}\sin\te...
...xtstyle{\frac{\Psi}2}\sin\textstyle{\frac{\Theta}2}\cos\textstyle{\frac{\Phi}2}$ (28)
e3 = $\displaystyle \sin\textstyle{\frac{\Psi}2}\cos\textstyle{\frac{\Theta}2}\cos\te...
...xtstyle{\frac{\Psi}2}\sin\textstyle{\frac{\Theta}2}\sin\textstyle{\frac{\Phi}2}$ (29)

The reverse process, obtaining the Euler angles from quarternions, is done indirectly, after calculating the cosine matrix. By inspection of Equation 16, the following relations yield the Euler angles:

$\displaystyle \Phi$ = $\displaystyle \tan^{-1}(C_{32}/C_{33})$ (30)
$\displaystyle \Theta$ = $\displaystyle \sin^{-1}(-C_{31})$ (31)
$\displaystyle \Psi$ = $\displaystyle \tan^{-1}(C_{21}/C_{11})$ (32)

One reason for the simulator to calculate the Euler angles is to display the instruments properly. For example, the heading indicator requires the value of $\Psi$.

next up previous contents
Next: Position Up: Kinematic Equations Previous: Euler Angles
Carl Banks