Worked examples — Attitude estimation — triad method (two vector measurements)
This page is the drill ground for the TRIAD parent note. The parent built the recipe; here we run it against every kind of input the method can meet — clean rotations, noisy sensors, degenerate (near-parallel) geometry, sign traps, a real Sun/mag word problem, and an exam twist.
Before we start, one reminder of the whole machine in one breath: we build a right-handed triad (three mutually perpendicular unit axes — a little coordinate cross) from the two reference vectors, build the same triad from the two body measurements, stack each triad as the columns of a matrix ( and ), and the attitude is . See Cross Product and Right-Handed Frames for the perpendicular-axis idea and Rotation Matrices and SO(3) for why must have .
The scenario matrix
Every TRIAD problem lands in one of these cells. The examples below are labelled with the cell they hit.
| Cell | What changes | Danger / lesson |
|---|---|---|
| A. Clean, aligned | true rotation, no noise, axis-aligned vectors | learn the mechanics with zero distraction |
| B. Clean, tilted axis | true rotation about a slanted axis | non-integer entries; test the machine |
| C. Noisy slot-2 | sensor-2 angle off by a few degrees | the whole point — angle discarded, error stays small |
| D. Sign / handedness trap | swap slot 1 ↔ slot 2, or feed a left-handed pair | changes; must still be |
| E. Degenerate: near-parallel | between the two vectors | , noise blows up — refuse |
| F. Degenerate: exactly parallel | or | cross product is ; attitude undetermined |
| G. Real word problem | Sun sensor + magnetometer, given numbers | choose slot 1 = accurate sensor |
| H. Exam twist | recover the rotation angle from | reads out from the trace |
We work through A–H in order.
Cell A — Clean, aligned (mechanics with zero noise)
Forecast: Guess before computing — the true rotation is a quarter-turn about . What do you expect the and entries of to look like? (Hint: standard .)
-
Reference triad. . , already unit, so . . Why this step? Slot 1 keeps the trusted vector; slot 2's cross product is automatically perpendicular to it; slot 3 closes the right-handed box.
-
Body triad, identical recipe. ; ; .
Why this step? Both triads describe the same physical cross — one in reference words, one in body words.
-
Assemble : Why this step? column by column; orthonormal .
Verify: ✅ and ✅; ✅. This is exactly .
Figure below — what to look for: the three coloured arrows are the reference triad. The cyan arrow is slot 1 (, kept exactly), the amber arrow is slot 2 (, perpendicular to cyan), and the white arrow is slot 3 (, closing the right-handed box). Notice all three meet at — that orthogonality is what makes and hence a clean rotation.

Cell B — Clean, tilted axis (non-integer entries)
Forecast: The rotation lives entirely in the -plane, so should be untouched — expect the third row/column of to be .
-
Reference triad — same as Cell A: . Why this step? The reference vectors are unchanged, so the reference frame is identical; only the body side moves.
-
Body triad. . (unit already) . . Why this step? The cross of two in-plane vectors points along — the axis the sensors both lie perpendicular to.
-
Assemble :
Verify: ✅ and ✅; ✅. Using the trace-to-angle identity defined above, , so ✅ — matching the truth. (Remember the quadrant caveat: the trace alone would not distinguish from ; the positive off-diagonal pattern confirms the counter-clockwise sense. We push on this fully in Cell H.)
Cell C — Noisy slot-2 (the whole point)
Forecast: TRIAD keeps exactly and only uses the direction of the cross product. So do you expect the error in to be around , or much smaller? Guess before reading.
-
Slot 1 is exact. — untouched by noise. Why this step? Whatever accurate sensor produced is perfectly honored.
-
Slot 2 — cross product, then normalize. . Its norm is , so normalizing gives exactly (to working precision). Why this step? The tilt changes the length of the cross product ( vs ), but normalizing erases the length. Only the direction survives — and that direction barely moved because both vectors still lie in the -plane.
-
Slot 3 and assemble. Identical to Cell A: , giving the same .
Verify: The recovered still satisfies exactly and ✅; ✅. The noise in slot 2 produced zero attitude error here because it was an in-plane tilt — exactly TRIAD's design intent: sensor-2 angle discarded. (In general the residual is second-order in slot-2 noise, not first-order.) This is why more accurate sensors like a Sun sensor go in slot 1. For a method that instead weights both measurements optimally, see Wahba's Problem and QUEST algorithm.
Cell D — Sign / handedness trap (order matters)
Forecast: The parent note warned TRIAD is asymmetric. Guess: same , or different ?
-
Reference triad (swapped). ; ; . Why this step? Note the cross product flipped sign versus Cell A because the order flipped — .
-
Body triad (swapped). ; ; .
-
Assemble :
Verify: Here the data was noiseless, so swapping gives the same as Cell A — good, both agree with truth. Check the mappings: ✅ and ✅. Also ✅ and ✅, still a proper rotation. The lesson: the matrix can differ between slot orderings only when there is noise (then the two orderings disagree, and you must put the trusted sensor in slot 1). Feeding a left-handed pair would not break TRIAD — the cross product still builds a right-handed triad automatically, guaranteeing regardless.
Cell E — Degenerate: near-parallel (noise blows up)
Forecast: The cross-product magnitude is . With that is small. Guess: does a small input error stay small, or get amplified?
First, name the error precisely. Let (in radians) be a tiny out-of-plane angular error in — that is, the true lies in the -plane, but the noisy measurement is tipped by angle out of that plane (a small -component of size ). We track how much the slot-2 unit vector then swings.
-
Cross-product magnitude sets the denominator. . Why this step? Slot 2 is divided by this magnitude. A tiny denominator magnifies whatever is in the numerator.
-
Why an in-plane wobble is harmless but an out-of-plane slip is not — the geometry. Recall is perpendicular to the plane spanned by the two vectors, with length . If only wiggles within the -plane, the spanned plane is still the -plane, so the cross product still points along — its direction is unchanged, only its length breathes (and normalizing erases length, as in Cell C). But if tips out of the plane by , it drags the numerator's perpendicular sideways by an amount (an absolute nudge), while the vector we divide by is only long. So the fractional swing of the unit normal is Why this step? This is the amplification: dividing a fixed absolute nudge by the small length multiplies it.
-
Put in numbers. With , the factor is . A modest out-of-plane slip becomes of attitude error.
Verify: Amplification ✅; ✅. Rule: require good separation (best near , where , no amplification). If your two directions are close, TRIAD is the wrong tool — reach for a filtered estimator like the Kalman Filter — Attitude or the optimal Davenport q-method.
Figure below — what to look for: the cyan curve is the amplification factor versus the separation angle . Watch it rocket upward as (the amber marker at sits at gain ), and flatten to at the white marker — the sweet spot where errors pass through unmagnified.

Cell F — Degenerate: exactly parallel (undetermined)
Forecast: With both vectors along the same line, is the attitude fully known, or is one degree of freedom lost?
-
Compute slot 2. . Why this step? Parallel vectors have zero cross product ().
-
Normalize → division by zero. is undefined. The triad cannot be built. Why this step? Geometrically, one direction fixes only 2 of 3 degrees of freedom — the spin about that line is invisible, so no method using only these two collinear vectors can recover it.
Verify: ✅ (anti-parallel is just as degenerate). Rule: TRIAD requires two non-parallel directions — this is the very reason the parent stressed "two independent directions."
Cell G — Real word problem (choose slot 1 wisely)
Forecast: Which measurement goes in slot 1? Guess before continuing.
-
Assign slots by accuracy. Slot 1 = Sun sensor (, most trusted). So , ; , . Why this step? Slot 1 is honored exactly, so the accurate sensor's info is never degraded.
-
Reference triad. ; ; .
-
Body triad. ; ; .
-
Assemble :
Verify: ✅ (Sun matched exactly); ✅; ✅ and ✅, a proper rotation. Converting to a quaternion for onboard propagation is the job of Quaternion Attitude Kinematics.
Cell H — Exam twist (read the angle out of )
Forecast: The trace of (sum of diagonal entries) encodes the rotation angle. What angle gives — and can you tell if it turned clockwise or counter-clockwise from the trace alone?
-
Why the trace and not, say, one entry? Any proper rotation by angle has eigenvalues ; their sum (the trace) is , independent of the axis. One single matrix entry mixes axis and angle, so it cannot isolate ; the trace can. (This identity is stated in the definition callout at the top.) Why this step? We pick the one scalar built from that depends on alone.
-
Invert with . From Cell B, . Then Why this step? is the question "which angle has this cosine?" — it undoes the cosine.
-
Confront the quadrant ambiguity. Because and only outputs , the trace gives but cannot say whether the turn was (counter-clockwise) or (clockwise) — both have trace . To break the tie you read the off-diagonal part: the skew piece carries the axis with its sign. Here , which pins the sense to counter-clockwise about . Why this step? is even, so it loses sign; the antisymmetric part restores it.
Verify: and ✅. Recovered magnitude , matching the truth we hid; the positive skew entry confirms the sense ✅.
Active Recall
Recall Which cell breaks TRIAD, and why?
Cells E and F — near-parallel and exactly-parallel inputs. In F the cross product is (division by zero); in E dividing by multiplies noise by . Fix: demand good angular separation, ideally near .
Recall In Cell C the slot-2 sensor was off by
. How much attitude error resulted, and why? Essentially zero here — because normalizing the cross product throws away its length (the of the angle), keeping only its direction, which barely moved for an in-plane tilt. TRIAD is designed to discard slot-2 angle.
Recall What does
tell you, and what does it hide? It gives the rotation angle's magnitude via ::: but not its sign — clockwise vs counter-clockwise needs the off-diagonal (skew) part, since is even.
Recall Slot assignment for a
Sun sensor and a magnetometer? Sun sensor in slot 1 (honored exactly), magnetometer in slot 2 (only its direction used) ::: because slot 1's measurement is preserved perfectly while slot 2's precise angle is discarded.