3.5.10 · D1Guidance, Navigation & Control (GNC)

Foundations — Converting between DCM, quaternions, Euler angles

2,902 words13 min readBack to topic

Before you can convert between representations, you must be fluent in the raw ingredients. We build them in dependency order: arrows → frames → the numbers that link two frames → the matrix that packages those numbers → the axis-angle idea → the half-angle quaternion → the trig tools that read angles back out.


1. A vector — an arrow with a length and a direction

Figure — Converting between DCM, quaternions, Euler angles

What to extract from Figure s01: the burnt-orange arrow is . Its shadow on the floor (teal dashes) gives you and ; its vertical rise (plum dash) gives . The lesson: those three shadows ARE the three numbers — nothing more mysterious than "how far along each direction".

Why the topic needs it: the whole point of a rotation is to take one arrow and turn it into another arrow, . Everything downstream — DCM, quaternion, Euler angles — is machinery for describing that one turn.


2. A unit vector — an arrow of length exactly 1

Why the topic needs it: the rotation axis is always a unit vector — we only care which way the spin-axis points, not how long we draw it. The quaternion formula (built in §9) multiplies that pure direction by a number.


3. Two frames A and B — two sets of reference axes

Figure — Converting between DCM, quaternions, Euler angles

What to extract from Figure s02: the teal star of arrows is frame (the world). The plum star is the same origin twisted — frame (the body). The single lesson: the whole topic asks only "how is B rotated relative to A?" — every representation is an answer to this picture.

Why the topic needs it: DCM, quaternion, and Euler angles are all just three ways to write down the twist between these two star-shaped bundles of arrows.


4. The dot product — "how much do two arrows agree?"

Why the topic needs it: a direction cosine is literally a dot product between one axis of frame and one axis of frame . The name Direction Cosine Matrix means "the table of all nine such cosines".


5. The cross product and the skew matrix

Why the topic needs it: the matrix lets Rodrigues' rotation be written as one clean matrix formula instead of a cross-product buried inside. It is the bridge that turns "geometry" into "a table you can multiply".


6. A matrix and the product — a machine that eats an arrow, spits out an arrow

Why the topic needs it: the DCM is the "hub" of all conversions. Its 9 numbers with 6 constraints (3 unit-length + 3 perpendicularity) is the honest, bulky encoding everything else compresses. See Direction Cosine Matrix Properties.


7. The identity matrix — "do nothing"

Why the topic needs it: Rodrigues' formula starts from : at , , so — zero rotation does nothing. This is the sanity check that anchors the whole formula.


8. Axis–angle — the master key

Figure — Converting between DCM, quaternions, Euler angles

What to extract from Figure s03: the plum arrow is the skewer through the object. The orange arrow swings along the dark arc to the teal arrow ; the arc's opening angle is (Greek capital phi). The lesson: a rotation is fully captured by just two things — the direction of the skewer and the amount of turn .

Why the topic needs it: both DCM and quaternion have clean formulas straight from . So the parent derives both from this anchor, then composes conversions. Master this and the rest is bookkeeping. See Rodrigues Rotation Formula.


9. , , — and the half-angle

Why the topic needs it: every conversion formula is trig glue. In particular, (defined next in §10), and the identities and are what turn "quaternion" into "DCM".


10. The quaternion — a 4-number rotation token


11. Euler angles — three human-readable tilts

Figure — Converting between DCM, quaternions, Euler angles

What to extract from Figure s04: a little aircraft with three curved arrows — orange yaw (nose swings left/right about vertical), teal pitch (nose tips up/down), plum roll (wings tilt about the nose line). The lesson: Euler angles are the human way to say orientation, but because each turn changes the axes for the next, doing them in a different order gives a different result — and at two axes line up (Gimbal Lock).

Why the topic needs it: Euler angles are how a rotation gets reported to a person. Pulling them back out of a DCM (e.g. , ) is exactly why we need the inverse-trig tools of §12.


12. and — reading an angle back out

Figure — Converting between DCM, quaternions, Euler angles

What to extract from Figure s05: two arrows with the same ratio — the orange one in quadrant I , the teal one in quadrant III . Plain sees only the ratio and confuses them; reads both signs and lands each in its correct quadrant. The lesson: always feed both numbers separately.

Why the topic needs it: extracting Euler angles from a DCM requires full-circle inverse trig, or your reported roll/pitch/yaw will silently flip. This tool is also where Gimbal Lock shows up: at pitch the arguments become — undefined.


Prerequisite map

The chain below reads top-down: raw arrows spawn the dot and cross products; those two build both the DCM and the quaternion's multiplication rule; axis-angle plus half-angle trig fills in the numbers; inverse trig reads out Euler angles. All three representations meet at the topic.

Vector arrow v

Unit vector e-hat

Dot product

Cross product

Skew matrix of e

Axis-angle e and Phi

Direction Cosine Matrix C

Matrix times vector

Identity I

cos sin tan and half-angle

Quaternion q

Converting DCM Quaternion Euler

arcsin and atan2

Euler angles phi theta psi


Equipment checklist

Test yourself — you should be able to answer each before opening the parent note.

What are the two properties that fully define a vector?
its length and its direction
What does the little hat mean, as in ?
the arrow has length exactly 1 (a unit vector), pure direction
What single number does the dot product measure?
how aligned the two arrows are —
Why does the cross product appear in a rotation formula?
it makes the -turned sideways companion that swings an arrow around
Write the skew-symmetric matrix for .
What is special about a rotation matrix, and what is its inverse?
rows are perpendicular unit vectors (orthonormal); its inverse is its transpose
What does the identity matrix do to an arrow?
nothing — returns the same arrow (zero rotation)
State Euler's rotation theorem in one line.
any orientation is one turn by angle about one fixed unit axis
How many numbers is a quaternion, and what are its two parts?
four — a scalar part and a vector part
Give the quaternion from axis-angle.
and
How do you rotate a vector with a quaternion?
the sandwich ; the output vector part is the rotated arrow
What is the quaternion inverse of a unit ?
its conjugate — flip the sign of the vector part:
Why does the quaternion use and not ?
the sandwich applies the axis twice; halving cancels the doubling (also and agree)
Name the three Euler angles and their axes in a 3-2-1 sequence.
yaw about , pitch about new , roll about newest
Why prefer over ?
atan2 uses the signs of both arguments, so it picks the correct quadrant over the full circle

Recall Ready to proceed?

If you can picture: an arrow → a hatted axis → two twisted frames → a nine-cosine table (DCM) → a spun skewer (axis-angle) → a scalar-plus-vector quaternion multiplied by the sandwich → three tilt angles read back out with atan2 — you have every symbol the parent note assumes. Head back to the parent topic.