|
|
|
Main Menu
|
|
Sections
Meta
Talkback
Downloads
Information
|
|
|
|
|
example of quaternions and Euler angles
|
(Example)
|
|
|
This companion article belongs to the PhysicsLibrary entry quaternions and Euler angles. All exercises are stated first. Complete solutions appear only after the exercise section so that the article is self-study friendly.
We use right-handed frames, Hamilton multiplication, scalar-first display notation, and the active 3-2-1 yaw-pitch-roll convention
 |
(1) |
Show that a pure yaw of angle is represented by
 |
(2) |
Show that a pure pitch of angle is represented by
 |
(3) |
Show that a pure roll of angle is represented by
 |
(4) |
Multiply
and derive the 3-2-1 quaternion components.
For
 |
(5) |
compute the corresponding quaternion.
For
 |
(6) |
compute the corresponding quaternion.
For
 |
(7) |
compute the corresponding quaternion.
Write the 3-2-1 rotation matrix
explicitly.
Show that the quaternion from Exercise 5 produces the same matrix as the 3-2-1 matrix with , , and
.
Given a unit quaternion
 |
(8) |
recover the 3-2-1 yaw, pitch, and roll angles.
Given a unit quaternion
 |
(9) |
recover the 3-2-1 yaw, pitch, and roll angles.
Explain why the 3-2-1 Euler angle description becomes singular at
.
A student uses a scalar-last quaternion array
directly in a scalar-first Euler angle formula. Explain the error.
Why can two different triples
describe the same physical orientation?
What is the practical advantage of propagating attitude with quaternions while still displaying yaw, pitch, and roll to a user?
A yaw is a rotation about the axis, so its axis quaternion is
 |
(10) |
A pitch is a rotation about the axis, so
 |
(11) |
A roll is a rotation about the axis, so
 |
(12) |
Introduce the half-angle abbreviations , , , , , and . Multiplying
gives
 |
(13) |
 |
(14) |
 |
(15) |
 |
(16) |
Substituting , , and
gives
 |
(17) |
Substituting
, , and gives
 |
(18) |
Substituting ,
, and gives
 |
(19) |
The explicit matrix is
 |
(20) |
The quaternion of Exercise 5 is
. By Q09 its matrix is
 |
(21) |
Setting , , and
in the 3-2-1 matrix gives the same result.
Comparing with
shows
 |
(22) |
So the orientation is a pure yaw of .
Comparing with
shows
 |
(23) |
So the orientation is a pure roll of .
At
, the yaw and roll axes align. The mapping from orientation to the triple
therefore loses rank and one combination of yaw and roll becomes indistinguishable. This is the Euler angle singularity called gimbal lock.
The formulas assume that the first component is the scalar part . If the array order is actually
, then the symbols are being matched to the wrong numerical entries. The components must be remapped before using the scalar-first formula.
Euler angles are not a unique global parameterization. Because rotations are periodic and because of the singular structure of the coordinate chart, different triples can represent the same orientation. For example, adding to one angle may leave the physical orientation unchanged.
Quaternions are numerically robust for propagation, interpolation, and control, and they avoid gimbal-lock singularities. Euler angles, however, are intuitive for humans. A common strategy is therefore to compute internally with quaternions and display yaw, pitch, and roll externally.
This article is an original synthesis prepared for PhysicsLibrary and intended for release under CC BY-SA 4.0.
| "example of quaternions and Euler angles" is owned by bloftin.(view preamble)
|
|
| Keywords: |
quaternion, Euler angles, yaw pitch roll, 321 sequence, gimbal lock, Tait-Bryan angles, exercises, worked solutions |
This object's parent.
Cross-references: scalar, formula, matrix, quaternion, section, quaternions and Euler angles
This is version 1 of example of quaternions and Euler angles, born on 2026-08-24.
Object id is 1104, canonical name is ExampleOfQuaternionsAndEulerAngles.
Accessed 6 times total.
Classification:
|
|
|
|
|
|
|
|
Pending Errata and Addenda
|
|
|
|
|
|
|
|
|
|
|