3.5.12 · D1Guidance, Navigation & Control (GNC)

Foundations — Attitude estimation — triad method (two vector measurements)

2,601 words12 min readBack to topic

This page assumes you have seen none of the notation in the parent topic before. We build every symbol from the ground up, in the order the topic needs them.


1. Arrows in space — what a "vector" is

A vector is just an arrow: it has a direction (where it points) and a length (how long it is). We write it in bold, like , to say "this is an arrow, not a plain number."

To write an arrow down with numbers, we drop it into a set of three perpendicular measuring sticks — the x, y, z axes — and read off how far it reaches along each. Those three numbers are the components:

Figure — Attitude estimation — triad method (two vector measurements)

Figure 1 — A single arrow and its three coloured shadow-lengths dropped onto the x, y, z axes. Takeaway: a vector is nothing but three numbers, one per axis.

Why the topic needs it. In TRIAD everything — the Sun's direction, the magnetic field, the spacecraft's axes — is an arrow. Nothing else. If you're comfortable with arrows-as-three-numbers, you're ready.


2. The little hat — a "unit vector" (direction only)

Sometimes we only care about which way an arrow points, not how long it is. So we shrink it to length . A length-1 arrow is called a unit vector, and we mark it with a little hat: (read "v-hat").

To shrink any arrow to length 1, divide it by its own length:

Here (read "the norm of v" — the double bars mean length) is found by the 3D Pythagoras rule:

Why the topic needs it. The parent writes everywhere — all hats. The hat is a promise: "this arrow has length 1, it's a direction."


3. Two frames — reference vs. body (both right-handed)

A frame is a choice of "which way is x, which way is y, which way is z." The topic uses two frames:

  • Reference (inertial) frame — the fixed "map of the sky." We know where the Sun and the magnetic field point here from an almanac/model. Arrows here get the letter (subscript on any frame quantity).
  • Body frame — glued to the spacecraft, so it rotates when the spacecraft rotates. Our sensors report directions in this frame. Arrows here get the letter (subscript ).
Figure — Attitude estimation — triad method (two vector measurements)

Figure 2 — The SAME physical Sun-arrow drawn twice: once on the fixed reference sky-map (numbers ), once on the tilted spacecraft body frame (numbers ). The red arrow is the rotation linking them. Takeaway: only the spacecraft's orientation makes the two number-sets differ.

Why the topic needs it. Attitude estimation is precisely the job of finding the twist that connects these two frames. No two frames, no problem to solve.


4. The subscripts and — which landmark

The subscript just labels which landmark:

  • = landmark 1 (say the Sun), in reference / body coordinates.
  • = landmark 2 (say the magnetic field).

So reads: "the unit vector to landmark 2, as measured in the body frame." Nothing more.


5. The rotation matrix — the "twist machine"

A matrix is a grid of numbers that acts on an arrow: feed it a vector, it hands back another vector. The special matrices that only rotate arrows (never stretch, never squash, never mirror) are called rotation matrices. The topic calls the attitude one .

It maps a vector's reference-frame numbers () into its body-frame numbers () — using exactly the same / subscripts we set up in Section 3:

Read this as: "take the arrow's reference-frame numbers, run them through the twist machine , and out come the body-frame numbers."

Two facts we'll lean on hard:

  • Orthonormal = its columns are unit vectors that are mutually perpendicular. For such a matrix the inverse equals the transpose: (more on transpose below).
  • Determinant = it's a proper rotation (a real turn), not a mirror-flip.

Why the topic needs it. "Attitude" is this matrix . Finding it is the entire goal.


6. Transpose , identity , and inverse

The transpose flips a matrix across its diagonal: row 1 becomes column 1, and so on.

The identity matrix is the "do-nothing" matrix — s down the diagonal, s everywhere else. Multiplying any vector by hands it straight back unchanged, like multiplying a number by :

The inverse is the "undo" machine — apply then and you're back where you started: (do the rotation, then undo it, and it's as if nothing happened).

The magic used in the final formula: for a rotation matrix, transposing IS inverting. Flipping the grid across its diagonal undoes the rotation. That's why the parent replaces the hard-to-compute with the trivial .

Recall Why can we swap

for ? Because is orthonormal (unit, perpendicular columns), and for orthonormal matrices — undoing the rotation is the same as flipping across the diagonal. ::: For orthonormal matrices , so already is the inverse.


7. The cross product — the perpendicular-maker

This is the tool that does the real work, so we define it carefully and say why this tool and not another.

The cross product of two arrows, written , produces a new arrow that is perpendicular to both of them. In components:

Two properties matter enormously:

  1. Direction: perpendicular to the plane containing and , pointing the way your right thumb points when your fingers curl from toward (the right-hand rule — this is exactly why we insisted both frames are right-handed; see Cross Product and Right-Handed Frames).
  2. Length: , where is the angle between them.
Figure — Attitude estimation — triad method (two vector measurements)

Figure 3 — Two arrows (yellow) and (blue) lying in a shaded plane, and their cross product (red) sticking straight out perpendicular to both. Takeaway: the cross product manufactures a brand-new axis at right angles to the two you fed in.

Why the topic needs it. Every second and third axis of both triads is a normalized cross product. It's the engine that turns two arrows into a full 3-axis skeleton.


8. The triad — a 3-axis skeleton, built step by step

Now we assemble the actual TRIAD skeleton. Take the reference arrows and build three perpendicular unit axes (we use the superscript on each axis to say "belongs to the reference triad"):

Reading each line: axis 1 is just the trusted first arrow; axis 2 is the (normalized) cross product, guaranteed perpendicular to axis 1; axis 3 is the cross of the first two, filling in the last perpendicular direction and making the set right-handed.

Do the identical recipe with the body arrows (superscript now):

Finally, stack the three axes as columns to get a matrix. We write the matrix with a subscript ( for the reference triad, for the body triad) and its columns with the matching superscript:

M_b = \big[\,\hat{\mathbf t}_1^{(b)} \;\; \hat{\mathbf t}_2^{(b)} \;\; \hat{\mathbf t}_3^{(b)}\,\big]$$ Because the three columns are perpendicular unit vectors in a right-handed order, **$M_r$ and $M_b$ are automatically orthonormal with $\det = +1$** — valid rotations. That is what later makes the trick $M^{-1} = M^{\mathsf T}$ legal. > [!definition] Triad matrix $M$ > A $3\times 3$ grid whose three columns are a right-handed set of perpendicular unit vectors $\hat{\mathbf t}_1, \hat{\mathbf t}_2, \hat{\mathbf t}_3$. Picture: a tiny rigid tripod of arrows, written down as a matrix. $M_r$ is the tripod drawn on the sky-map; $M_b$ is the *same physical tripod* drawn on the spacecraft. **Why the topic needs it.** Both $M_r$ and $M_b$ describe **one and the same tripod**, just in two different frames. The rotation carrying one into the other *is the attitude*: $A M_r = M_b$, hence $A = M_b M_r^{\mathsf T}$. --- ## 9. Putting the symbols together Read the map below **bottom-up as a shopping list**: the boxed result at the bottom (the TRIAD attitude) is what you're cooking; every box above it is an ingredient you must have ready first. Each arrow means *"you need the box behind the arrow before the box ahead of it makes sense."* Trace any path from top to bottom and you get a valid learning order. ```mermaid graph TD A["Vectors as three numbers"] --> B["Unit vectors hat notation"] B --> C["Two right-handed frames reference and body"] C --> D["Rotation matrix A twist machine"] B --> E["Cross product perpendicular maker"] E --> F["Triad matrices Mr and Mb"] D --> F G["Identity and transpose equals inverse for rotations"] --> D F --> H["TRIAD attitude A equals Mb times Mr transpose"] D --> H ``` So: master arrows and hats first, then frames, then the two tools (rotation matrices and the cross product), then combine them into triads, and only then read off the attitude. If any box feels shaky, go back to its section before continuing. --- ## Equipment checklist Test yourself — say the answer out loud before revealing it. What does the hat in $\hat{\mathbf v}$ promise about the arrow? ::: Its length is exactly $1$ — it's a pure direction. How do you shrink any arrow to a unit vector? ::: Divide it by its own length $\lVert\mathbf v\rVert = \sqrt{v_x^2+v_y^2+v_z^2}$. What is the difference between $\hat{\mathbf r}_1$ and $\hat{\mathbf b}_1$? ::: Same physical direction (landmark 1), but written in the fixed reference frame vs the rotating body frame. What does it mean for a frame to be right-handed? ::: Fingers of the right hand curl from x to y, thumb points along z; equivalently $\hat{\mathbf x}\times\hat{\mathbf y}=\hat{\mathbf z}$. What does the matrix $A$ *do* to a vector? ::: Rotates its reference-frame coordinates into body-frame coordinates without changing length ($\mathbf v_b = A\mathbf v_r$). What is the identity matrix $I$ and what does it do? ::: The matrix with $1$s on the diagonal and $0$s elsewhere; it leaves any vector unchanged ($I\mathbf v=\mathbf v$). Why can we write $M_r^{\mathsf T}$ instead of $M_r^{-1}$? ::: Because $M_r$ is orthonormal, and for orthonormal matrices the transpose equals the inverse. Write the three reference triad axes from memory. ::: $\hat{\mathbf t}_1^{(r)}=\hat{\mathbf r}_1$; $\hat{\mathbf t}_2^{(r)}=(\hat{\mathbf r}_1\times\hat{\mathbf r}_2)/\lVert\hat{\mathbf r}_1\times\hat{\mathbf r}_2\rVert$; $\hat{\mathbf t}_3^{(r)}=\hat{\mathbf t}_1^{(r)}\times\hat{\mathbf t}_2^{(r)}$. What kind of result does the cross product $\mathbf a\times\mathbf b$ give? ::: A new arrow perpendicular to both, with length $\lVert\mathbf a\rVert\lVert\mathbf b\rVert\sin\theta$. When does the cross product's length go to zero, and why does that break TRIAD? ::: When the arrows are parallel ($\sin\theta=0$); dividing by that near-zero length amplifies noise catastrophically. Why do we need *two* landmarks instead of one? ::: One landmark leaves a spin about that direction undetermined; the second locks that last degree of freedom. When every reveal comes easily, move on to the derivation in [[3.5.12 Attitude estimation — triad method (two vector measurements) (Hinglish)|the parent topic]], and later to [[Wahba's Problem]], [[QUEST algorithm]], and [[Davenport q-method]] for the noise-optimal upgrades.