3.5.1Guidance, Navigation & Control (GNC)

Reference frames — body frame, inertial frame; rotation between them

2,077 words9 min readdifficulty · medium

WHAT are the frames?


WHAT is a rotation between frames?

A vector v\vec v is a physical arrow — it doesn't change. Only its components change when you describe it in different frames. If vI\vec v^{\mathcal I} are its components in the inertial frame and vB\vec v^{\mathcal B} in the body frame, they are related by a matrix:

vB=RBIvI\vec v^{\mathcal B} = R_{\mathcal B \mathcal I}\,\vec v^{\mathcal I}

RBIR_{\mathcal B \mathcal I} (read "R body-from-inertial") is the Direction Cosine Matrix (DCM) / rotation matrix.

Figure — Reference frames — body frame, inertial frame; rotation between them

HOW to derive the rotation matrix from first principles

Let {x^B,y^B,z^B}\{\hat x_{\mathcal B},\hat y_{\mathcal B},\hat z_{\mathcal B}\} be body axes expressed in inertial coordinates. Any vector: v=vxBx^B+vyBy^B+vzBz^B\vec v = v_x^{\mathcal B}\hat x_{\mathcal B} + v_y^{\mathcal B}\hat y_{\mathcal B} + v_z^{\mathcal B}\hat z_{\mathcal B}

Why this step? Because a vector equals the sum of its components along an orthonormal basis.

Project onto x^B\hat x_{\mathcal B} (dot both sides, using x^B ⁣ ⁣y^B=0\hat x_{\mathcal B}\!\cdot\!\hat y_{\mathcal B}=0 etc.): vxB=vx^Bv_x^{\mathcal B} = \vec v \cdot \hat x_{\mathcal B} Writing v=vxIX^+vyIY^+vzIZ^\vec v = v_x^{\mathcal I}\hat X + v_y^{\mathcal I}\hat Y + v_z^{\mathcal I}\hat Z: vxB=(x^B ⁣ ⁣X^)vxI+(x^B ⁣ ⁣Y^)vyI+(x^B ⁣ ⁣Z^)vzIv_x^{\mathcal B} = (\hat x_{\mathcal B}\!\cdot\!\hat X)\,v_x^{\mathcal I} + (\hat x_{\mathcal B}\!\cdot\!\hat Y)\,v_y^{\mathcal I} + (\hat x_{\mathcal B}\!\cdot\!\hat Z)\,v_z^{\mathcal I}

Why this step? The dot product is linear, so the projection of v\vec v is the weighted sum of projections of the inertial basis vectors.

Stacking all three rows: RBI=[x^B ⁣ ⁣X^x^B ⁣ ⁣Y^x^B ⁣ ⁣Z^y^B ⁣ ⁣X^y^B ⁣ ⁣Y^y^B ⁣ ⁣Z^z^B ⁣ ⁣X^z^B ⁣ ⁣Y^z^B ⁣ ⁣Z^]\boxed{R_{\mathcal B\mathcal I}=\begin{bmatrix}\hat x_{\mathcal B}\!\cdot\!\hat X & \hat x_{\mathcal B}\!\cdot\!\hat Y & \hat x_{\mathcal B}\!\cdot\!\hat Z\\ \hat y_{\mathcal B}\!\cdot\!\hat X & \hat y_{\mathcal B}\!\cdot\!\hat Y & \hat y_{\mathcal B}\!\cdot\!\hat Z\\ \hat z_{\mathcal B}\!\cdot\!\hat X & \hat z_{\mathcal B}\!\cdot\!\hat Y & \hat z_{\mathcal B}\!\cdot\!\hat Z\end{bmatrix}}

Each entry is a direction cosine. Rows are body axes written in inertial components.

Why RTR=IR^{\mathsf T}R=I (derive it)

Row ii of RR is body axis e^iB\hat e_i^{\mathcal B} in inertial coordinates. Entry (i,j)(i,j) of RRTR R^{\mathsf T} is e^iB ⁣ ⁣e^jB\hat e_i^{\mathcal B}\!\cdot\!\hat e_j^{\mathcal B}. Since body axes are orthonormal, this is δij\delta_{ij}RRT=IRR^{\mathsf T}=I. Why it matters: the inverse is free — just transpose, no matrix inversion onboard.


Elementary rotations (building blocks)

A rotation by angle θ\theta about the zz-axis (derived from projecting rotated axes): Rz(θ)=[cosθsinθ0sinθcosθ0001]R_z(\theta)=\begin{bmatrix}\cos\theta & \sin\theta & 0\\ -\sin\theta & \cos\theta & 0\\ 0&0&1\end{bmatrix}

Why the signs? This maps inertial components to body components when the body is rotated by +θ+\theta. The row of sin-\sin comes from the new yBy_{\mathcal B} axis leaning into X-X. (Some texts use the transpose — always check whether the matrix is "frame-to-frame" or "vector-rotation".)

A general attitude = product of three elementary rotations (e.g. yaw-pitch-roll 3-2-1): RBI=Rx(ϕ)Ry(θ)Rz(ψ)R_{\mathcal B\mathcal I}=R_x(\phi)\,R_y(\theta)\,R_z(\psi)


Worked examples


Common mistakes


Recall Feynman: explain to a 12-year-old

Imagine you're spinning on a merry-go-round holding a camera. The world is really standing still (that's the "star frame"), but your camera film sees everything sliding sideways (that's your "body frame"). A rotation matrix is a little translation table that says: "if the world says the tree is there, then on your spinning camera it shows up here." Spacecraft do this same trick to know which way they're pointing at the stars, even though their sensors are spinning along with them.


Flashcards

What distinguishes an inertial frame from a body frame?
Inertial = non-rotating, non-accelerating (Newton's laws simple, fixed to stars); body = rigidly attached to vehicle, rotates/translates with it.
What is each entry of a Direction Cosine Matrix physically?
The cosine of the angle between one frame's axis and another's — i.e. the dot product of two unit axes.
Given vB=RBIvI\vec v^{\mathcal B}=R_{\mathcal B\mathcal I}\vec v^{\mathcal I}, how do you get vI\vec v^{\mathcal I}?
vI=RBITvI\vec v^{\mathcal I}=R_{\mathcal B\mathcal I}^{\mathsf T}\vec v^{\mathcal I} — transpose, since RR is orthogonal (R1=RTR^{-1}=R^{\mathsf T}).
Why does RTR=IR^{\mathsf T}R=I for a rotation matrix?
Its rows are orthonormal basis vectors; row-dot-row gives δij\delta_{ij}.
What is det(R)\det(R) for a proper rotation and why?
+1+1; it's a pure rotation with no reflection (no handedness flip).
How do you combine IO\mathcal I\to\mathcal O then OB\mathcal O\to\mathcal B?
RBI=RBOROIR_{\mathcal B\mathcal I}=R_{\mathcal B\mathcal O}R_{\mathcal O\mathcal I}; adjacent subscripts cancel, rightmost applied first.
Write Rz(θ)R_z(\theta) (frame-to-frame form).
[cosθsinθ0sinθcosθ0001]\begin{bmatrix}\cos\theta&\sin\theta&0\\-\sin\theta&\cos\theta&0\\0&0&1\end{bmatrix}
Why can't you treat the body frame as inertial for dynamics?
It rotates, so fictitious forces (Coriolis, centrifugal, Euler) appear; F=ma\vec F=m\vec a only holds cleanly in I\mathcal I.

Connections

  • Euler angles and gimbal lock
  • Quaternions for attitude representation
  • [[Angular velocity and the kinematic equation $\dot R = -[\omega\times]R$]]
  • IMU and gyroscope sensing
  • Coriolis and fictitious forces in rotating frames
  • ECI, ECEF and orbit reference frames
  • Attitude determination — star trackers

Concept Map

report in

defined in

rigidly attached to

fixed to

must translate between

must translate between

converts

related by

related by

derives entries of

entry equals cos of angle

only components change

Onboard sensors

Body frame B

Newton laws and stars

Inertial frame I

Vehicle CoM axes

Distant stars ECI

GNC problem

Direction Cosine Matrix R

v_B = R v_I

Projection dot product

Vector is physical arrow

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, spacecraft ke andar jitne bhi sensors hote hain — gyro, accelerometer, star tracker — woh sab vehicle ke upar bolted hote hain. Yaani jo bhi number woh dete hain, woh body frame mein hota hai, jo vehicle ke saath hi ghoomta hai. Lekin physics ke laws (F=ma\vec F=m\vec a) aur stars, jinke against hum navigate karte hain, woh ek aise frame mein rehte hain jo na rotate karta hai na accelerate — usko inertial frame kehte hain (jaise ECI). GNC ka pura kaam hai in do frames ke beech numbers ko translate karna, baar-baar, har second mein hazaaron baar.

Ye translation ka kaam rotation matrix (DCM) karta hai. Yaad rakho — vector khud nahi badalta, sirf uske components badalte hain jab observer badalta hai. Har matrix entry actually do axes ke beech ke angle ka cosine hai (isliye "direction cosine matrix"). Derive karne ka simple trick: component nikalna matlab projection, aur projection matlab dot product axis ke saath. Bas isi se poora matrix ban jaata hai.

Ek bahut kaam ki property: rotation matrix orthogonal hoti hai, isliye uska inverse sirf transpose hai (R1=RTR^{-1}=R^{T}). Onboard computer ke liye ye sona hai — koi heavy matrix inversion nahi, bas rows aur columns swap. Aur frames ko chain karna ho toh subscripts ko dominoes ki tarah cancel karo: RBI=RBOROIR_{BI}=R_{BO}R_{OI}.

Sabse common galti: "vector ghumana" aur "frame ghumana" confuse kar dena — dono transpose ke relation mein hote hain. Hamesha poocho: "main arrow badal raha hoon ya observer?" Aur dusri galti — body frame ko inertial samajh lena. Body frame rotate karta hai, isliye usmein Coriolis aur centrifugal jaise fictitious forces aa jaate hain. Clean F=ma\vec F=m\vec a sirf inertial frame mein milta hai.

Go deeper — visual, from zero

Test yourself — Guidance, Navigation & Control (GNC)

Connections