Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random |  
Login
create new user
Username:
Password:
forget your password?
Main Menu
Sections

Meta

Talkback

Downloads

Information
[parent] Strapdown Inertial Navigation Examples: Vectors, Frames, and Direction Cosine Matrices (Example)

Strapdown Inertial Navigation Examples: Vectors, Frames, and Direction Cosine Matrices

This companion to INS01 develops the coordinate-frame machinery through explicit calculations. The emphasis is not on memorizing rotation matrices. Each exercise asks the reader to connect the matrix algebra back to the geometry of basis vectors and to the passive transformation convention

|------------|
|vn =  Cnvb. |
--------b----
(1)

The exercises are stated first so that the article can be used as a self-study problem set. Complete worked solutions follow in the second half.

The examples use the same conventions as INS01: body axes are forward–right–down, the local navigation frame is north–east–down (NED), and a matrix Cbn converts components resolved in frame b into components resolved in frame n. These conventions are standard in inertial-navigation treatments such as Titterton and Weston [1], Groves [2], and Jekeli [3].

1 Exercises

Exercise 1: One vector, two coordinate frames

In a horizontal plane, let the body frame b be rotated counterclockwise by

       ∘
ψ = 30
(2)

relative to the navigation frame n. A physical vector has body-frame coordinates

     [4]
vb =     .
      1
(3)

  1. Construct the passive coordinate transformation Cbn.
  2. Compute vn.
  3. Verify that the vector magnitude is unchanged.
  4. Explain geometrically why the coordinate numbers change even though the physical vector does not.

PIC

Figure. The same physical vector resolved in two planar frames. The body axes are rotated by 30∘ relative to the navigation axes.

Exercise 2: Construct a DCM directly from basis vectors

The body basis vectors are given in navigation coordinates by

     ⌊ √ -⌋            ⌊   √-⌋
       -22               − 22-             ⌊0⌋
  b  | √2-|        b   |  √2-|         b   ⌈ ⌉
e 1 = ⌈ 2 ⌉  ,    e2 = ⌈  2  ⌉  ,     e3 =  0   .
        0                 0                 1  n
           n                   n
(4)

  1. Construct Cbn directly from the basis vectors.
  2. Interpret the first column physically.
  3. Transform the body-frame velocity
         ⌊   ⌋
       10
vb = ⌈ 0 ⌉ m/s

       0

    into NED coordinates.

  4. State the vehicle heading implied by this result.

Exercise 3: Orthogonality, inverse, and round trip

Using the DCM from Exercise 2:

  1. Calculate (Cbn)T C bn.
  2. Calculate det Cbn.
  3. Write Cnb without performing a general matrix inversion.
  4. Starting from
          ⌊   ⌋
        3
wb  = ⌈ − 4⌉ ,
        2

    transform to n and then back to b. Verify that the original coordinate column is recovered.

Exercise 4: Composition and matrix order

Let frame b be rotated by +25∘ about Down relative to n, and let frame a be rotated by −40∘ about the same axis relative to b.

  1. Write Cbn and C ab.
  2. Form the direct transformation Can.
  3. What single planar rotation angle does Can represent?
  4. Transform
         ⌊ 5⌋
 a   ⌈  ⌉
u  =   0
       0

    into navigation coordinates.

  5. Explain why Can = C bnC ab rather than C abC bn.

PIC

Figure. Coordinate transformations compose by following the frame labels from right to left.

Exercise 5: Active rotation versus passive coordinate transformation

A vector initially has navigation coordinates

      ⌊ ⌋
       1
rn =  ⌈0⌉ .
       0
(5)

Consider a positive 90∘ rotation about the third axis.

  1. Actively rotate the physical vector by +90∘ while keeping the navigation axes fixed. What are the new coordinates?
  2. Instead keep the physical vector fixed and rotate the coordinate axes by +90∘. What are the coordinates in the rotated frame?
  3. Explain why the two matrices have opposite signs in the off-diagonal terms even though the same angle 90∘ appears in both descriptions.

Exercise 6: Body-frame velocity resolved in NED

A level vehicle has heading

ψ = 40 ∘
(6)

east of north. Its body-frame velocity is

     ⌊20 ⌋
 b   ⌈   ⌉
v =    5   m/s,
       0
(7)

where the first component is forward and the second is rightward.

  1. Construct the level-heading DCM Cbn.
  2. Compute vN, vE, and vD.
  3. Verify the horizontal speed using both frames.
  4. Interpret physically why a positive rightward body velocity contributes both north and east components for this heading.

PIC

Figure. A level vehicle at 40∘ heading. Body-forward and body-right velocity components must both be projected onto North and East.

Exercise 7: The skew-symmetric cross-product matrix

Let

    ⌊    ⌋          ⌊    ⌋
       1               4
a = ⌈ − 2 ⌉,    b = ⌈  5 ⌉ .

       3              − 1
(8)

  1. Construct [a]×.
  2. Compute [a]×b.
  3. Verify directly that the result equals a × b.
  4. Verify that [a]×T = −[a] ×.
  5. Show that aT [a] ×b = 0 and explain the geometry.

Exercise 8: Cross products are geometric and therefore frame consistent

Let

      ⌊ 0  − 1 0 ⌋
  n   ⌈          ⌉
C b =   1  0   0  ,
        0  0   1
(9)

which represents a 90∘ body-to-navigation heading transformation. Let

     ⌊  ⌋           ⌊    ⌋
       1               4
ab = ⌈ 2⌉ ,    bb = ⌈ − 1⌉ .
       3               2
(10)

Compute the cross product in two ways:

  1. First evaluate ab × bb in frame b, then transform the result to n.
  2. Transform a and b separately to frame n, then calculate an × bn.
  3. Verify that the two answers agree.
  4. Use the numerical result to illustrate
    [Cnab]  = Cn [ab] Cb .
  b   ×     b    ×  n

Exercise 9: First-order small angle DCM

Let the small rotation vector be

       ⌊      ⌋
         0.01
δ 𝜃n = ⌈ − 0.02⌉ rad.
         0.03
(11)

  1. Construct [δ𝜃n] ×.
  2. Form the first-order approximation
    Cnb ≈ I + [δ𝜃n]×.

  3. Show symbolically why this approximation is orthogonal to first order.
  4. For the numerical values above, evaluate (Cbn)T C bn − I and explain why the residual is second order rather than zero.
  5. Explain why repeated use of a first-order matrix without re-orthogonalization would eventually cause an implemented attitude matrix to drift away from a true DCM.

PIC

Figure. A small attitude change is represented to first order by I + [δ𝜃]×. Orthogonality errors appear only at second order.

Exercise 10: Debugging a matrix that looks almost like a DCM

Suppose software reports the matrix

     ⌊√ -        ⌋
      -23  − 12  0
^C =  |⌈0.6  0.8  0|⌉ .

       0    0   1
(12)

  1. Evaluate CT C.
  2. Evaluate det C.
  3. Is the matrix a valid DCM? Explain which test is decisive.
  4. Apply the round-trip operation
                          ⌊  ⌋
                       1
qrt = ^CT ^Cq,      q = ⌈2 ⌉,
                       3

    and quantify the failure to recover q.

  5. Explain why checking only whether the determinant is “close to one” is not sufficient for validating a numerical attitude matrix.

2 Worked solutions

2.1 Solution 1: One vector, two coordinate frames

For a body frame rotated counterclockwise by ψ relative to n, the body basis vectors resolved in navigation coordinates are

     [     ]            [       ]
eb=   cosψ    ,    eb =  −  sin ψ   .
 1    sinψ  n       2     cos ψ  n
(13)

Therefore the passive body-to-navigation DCM is

|-----[--------------]--|
| n    cos ψ  − sinψ    |
C b =  sinψ    cosψ   . |
-------------------------
(14)

With ψ = 30∘,

      [√ -     ]
  n    -23  − 12
C b =   1   √3-  .
        2    2
(15)

Hence

vn = C bnvb (16)
= [ √-     ]
  -3- − 1
  2   √ 2
  12   -23[ ]
 4
 1 (17)
= [ √ --  1 ]
 2  3 −√ 2
  2 + --3
       2. (18)

Numerically,

|----------------|
|      [2.9641]  |
|vn ≈           .|
--------2.8660---
(19)

The body-frame magnitude is

  b    √ -2----2   √ ---
∥v ∥ =   4  + 1 =    17.
(20)

The navigation-frame magnitude is

∥vn∥2 = ( √ --   1)
 2  3 −  --
         22 + (        )
      √3--
  2 + ----
       22 (21)
= 17. (22)

Thus

|---------------√----|
|∥vn∥ = ∥vb ∥ =   17.|
----------------------
(23)

The numbers changed because they are projections onto different basis vectors. The geometric arrow in space did not change.

2.2 Solution 2: Construct a DCM directly from basis vectors

For a passive DCM, the columns of Cbn are the body basis vectors resolved in navigation coordinates. Therefore

|-------√------√-------|
|      ⌊--2  − -2- 0⌋  |
| n    |√2-   √2    |  |
|Cb =  ⌈-22   22-  0⌉ .|
|        0    0    1   |
------------------------
(24)

The first column says that the body forward axis has equal North and East components. Geometrically, body forward points 45∘ east of north.

For

     ⌊   ⌋
       10
vb = ⌈ 0 ⌉ ,
       0
(25)

we obtain

vn = C bnvb (26)
= ⌊  √ -⌋
  5  2-
⌈ 5√ 2⌉

   0 m/s. (27)

Numerically,

|-----⌊------⌋-------|
|       7.071        |
|vn ≈ ⌈ 7.071⌉  m/s. |
|                    |
----------0----------|
(28)

Thus the implied heading is

|------------------|
|45∘ east of north.|
-------------------
(29)

2.3 Solution 3: Orthogonality, inverse, and round trip

Let

        √2--
c = s = ---.
         2
(30)

Then

      ⌊         ⌋
        c  − s 0
Cnb = ⌈ s   c  0⌉ .
        0  0   1
(31)

Its transpose is

         ⌊         ⌋
           c   s  0
(Cn)T =  ⌈− s  c  0⌉ .
  b
           0   0  1
(32)

Multiplication gives

           ⌊  2    2           ⌋
  n T  n     c +  s   2 0  2  0
(Cb ) Cb = ⌈    0     c + s   0⌉ =  I.
                0       0     1
(33)

Therefore

|----------------------|
|Cbn = (Cnb )−1 = (Cnb )T.
------------------------
(34)

The determinant is

det Cnb =  c2 + s2 = 1,
(35)

so this is a proper orthogonal matrix.

For any vector, including

      ⌊   ⌋
        3
wb  = ⌈ − 4⌉ ,
        2
(36)

the round trip is

wrtb = C nbC bnwb (37)
= (Cbn)T C bnwb (38)
= Iwb (39)
= ⌊   ⌋
  3
⌈− 4⌉

  2 . (40)

This round-trip property is a useful numerical unit test for implemented attitude matrices.

2.4 Solution 4: Composition and matrix order

For a positive planar rotation α,

        ⌊ cosα   − sin α  0⌋
        ⌈                 ⌉
R (α) =   sin α    cosα   0  .
            0      0     1
(41)

Hence

Cnb = R (25∘),    Cba = R (− 40∘).
(42)

The direct transformation is

Cn =  CnCb .
 a     b  a
(43)

Because both rotations are about the same axis,

Cn  = R (25∘ − 40∘) = R (− 15∘).
  a
(44)

Thus

|------⌊--------------------⌋--|
|        cos15 ∘   sin 15∘  0   |
|Cn =  ⌈− sin15 ∘ cos 15∘  0⌉ .|
| a                            |
------------0--------0-----1----
(45)

For

      ⌊ ⌋
       5
ua =  ⌈0⌉ ,
       0
(46)

un = C anua (47)
= ⌊          ⌋
  5 cos15 ∘
⌈ − 5 sin 15∘⌉

      0 (48)
≈⌊         ⌋
   4.8296
⌈ − 1.2941 ⌉

     0 . (49)

The matrix order follows the coordinate chain:

  n     n  b a
u  =  Cb C◟◝a◜u◞.
           ub
(50)

The rightmost matrix acts first. Reading the frame labels from right to left gives

a →  b → n.
(51)

2.5 Solution 5: Active rotation versus passive coordinate transformation

For an active positive 90∘ rotation of the physical vector while the axes remain fixed,

            ⌊         ⌋
             0  − 1  0
       ∘    ⌈         ⌉
R (+90  ) =  1   0   0  .
             0   0   1
(52)

Therefore

                 ⌊  ⌋    ⌊--⌋-|
                   1     | 0  |
rnactive = R(+90 ∘)⌈ 0⌉ =  ⌈ 1⌉ .
                   0     | 0  |
                         ------
(53)

Now hold the physical vector fixed and rotate the coordinate axes by +90∘. Coordinates must then rotate by the inverse transformation:

                  ⌊         ⌋
   ′                0   1  0
Cnn =  R(− 90∘) = ⌈ − 1 0  0⌉ .
                    0   0  1
(54)

Thus

              ⌊  ⌋   |⌊----⌋-|
                1    |   0   |
rn′ = R(− 90∘)⌈ 0⌉ = |⌈ − 1 ⌉ .
                     |       |
                0    ----0---|
(55)

The sign reversal is the essence of the active/passive distinction. Actively rotating a vector by +𝜃 relative to fixed axes is equivalent, at the level of coordinates, to holding the vector fixed and rotating the axes by −𝜃.

2.6 Solution 6: Body-frame velocity resolved in NED

For a level vehicle with heading ψ, body Down is aligned with navigation Down, so

      ⌊                 ⌋
        cosψ   − sin ψ  0
Cnb = ⌈ sin ψ   cos ψ   0⌉ .
          0      0     1
(56)

At ψ = 40∘,

      ⌊cos40 ∘  − sin 40∘  0⌋ ⌊20 ⌋
 n    ⌈      ∘        ∘    ⌉ ⌈   ⌉
v  =   sin40    cos 40    0    5   .
          0        0      1    0
(57)

Therefore

vN = 20 cos 40∘− 5 sin 40∘ ≈ 12.107 m/s, (58)
vE = 20 sin 40∘ + 5 cos 40∘ ≈ 16.686 m/s, (59)
vD = 0. (60)

Thus

|--------------------|
|     ⌊12.107 ⌋      |
| n   ⌈       ⌉      |
v   ≈  16.686   m/s. |
----------0-----------
(61)

In body coordinates,

∥v  ∥ = √202--+-52 = √425--≈  20.616  m/s.
   H
(62)

In navigation coordinates,

∘  --------
   v2N + v2E ≈ 20.616 m/s,
(63)

as required by norm preservation.

The rightward body component is not aligned with East unless the vehicle points exactly North. At a 40∘ heading, both body-forward and body-right axes have projections onto North and East, so each body component contributes to both navigation components.

2.7 Solution 7: The skew-symmetric cross-product matrix

For

     ⌊  ⌋
      a1
a =  ⌈a2⌉ ,
      a3
(64)

the cross-product matrix is

       ⌊  0    − a   a  ⌋
       ⌈          3   2 ⌉
[a]× =    a3    0   − a1  .
         − a2  a1     0
(65)

Therefore

|-------⌊-----------⌋--|
|        0  − 3  − 2   |
|[a ] =  ⌈3   0   − 1⌉ .|
|  ×                   |
---------2---1----0----|
(66)

Multiplying by b,

[a]×b = ⌊           ⌋
  0  − 3 − 2
⌈ 3  0   − 1⌉
  2  1    0⌊   ⌋
  4
⌈ 5 ⌉
 − 1 (67)
= ⌊     ⌋
  − 13
⌈ 13  ⌉
  13 . (68)

Direct evaluation of a × b gives the same result.

The transpose is

[a]T× = − [a ]×,
(69)

so the matrix is skew symmetric.

Finally,

aT[a] b =  a ⋅ (a × b ) = 0.
     ×
(70)

The cross product is perpendicular to a, so its dot product with a must vanish.

2.8 Solution 8: Cross products are frame consistent

First calculate the body-frame cross product:

          |         |   ⌊   ⌋
          ||i   j   k||     7
ab × bb = |1   2   3| = ⌈ 10⌉ .
          ||4  − 1  2||     − 9
(71)

Transforming this result to n gives

   ⌊    ⌋   |⌊----⌋-|
      7     | − 10  |
Cnb⌈ 10 ⌉ = |⌈  7 ⌉ |.
     − 9    |  − 9  |
            ---------
(72)

Now transform the vectors separately:

             ⌊   ⌋
 n     n b    − 2
a =  Cb a =  ⌈ 1 ⌉ ,
               3
(73)

and

              ⌊ ⌋
               1
bn =  Cn bb = ⌈4⌉ .
       b
               2
(74)

Their navigation-frame cross product is

          |⌊-----⌋-|
          |  − 10  |
an × bn = |⌈  7  ⌉ ,
          |        |
          ---−-9---|
(75)

which agrees exactly.

Thus

Cn (ab × bb ) = (Cn ab) × (Cn bb).
 b               b        b
(76)

In matrix form this geometric invariance becomes

|----------------------|
|[Cnb ab]× = Cnb [ab]×Cbn.
-----------------------
(77)

2.9 Solution 9: First-order small angle DCM

For

       ⌊      ⌋
         0.01
   n   ⌈      ⌉
δ 𝜃  =  − 0.02  ,
         0.03
(78)

the skew matrix is

         ⌊                    ⌋
   n        0    − 0.03   − 0.02
[δ𝜃  ]× = ⌈ 0.03    0     − 0.01⌉ .
           0.02   0.01     0
(79)

Hence the first-order DCM is

|------------------------------|
|      ⌊  1   − 0.03  − 0.02 ⌋  |
|  n   ⌈                    ⌉  |
|C b ≈  0.03     1    − 0.01   .|
--------0.02---0.01-----1------|
(80)

Let

S = [δ𝜃]×.
(81)

Because ST = −S,

(I + S)T (I + S) = (I − S)(I + S) (82)
= I − S2. (83)

Since every entry of S2 is quadratic in the small angles,

|--------------------------------|
(I + S )T(I + S) = I + O (∥δ𝜃∥2).|
----------------------------------
(84)

For the numerical vector,

               ⌊                           ⌋
                  0.0013   0.0002  − 0.0003
(Cn)T Cn − I ≈ ⌈  0.0002   0.0010   0.0006 ⌉ .
  b    b         − 0.0003   0.0006   0.0005
(85)

These residuals are of order 10−3, consistent with products of angles of order 10−2 rad.

The first-order matrix is therefore suitable as a local approximation, but it is not an exact element of SO(3). Repeated multiplication without a proper finite-rotation update or re-orthogonalization would accumulate norm and orthogonality errors. This motivates the finite attitude-propagation methods introduced later in the INS series.

2.10 Solution 10: Debugging a matrix that looks almost like a DCM

The reported matrix is

     ⌊√3-    1   ⌋
     | 2   − 2  0|
^C =  ⌈0.6  0.8  0⌉ .
       0    0   1
(86)

Direct multiplication gives

|--------⌊--------------------⌋--|
|           1.11   0.04699   0   |
|^CT ^C ≈  ⌈0.04699    0.89    0⌉ .|
|            0         0     1   |
---------------------------------|
(87)

This is not the identity matrix. The columns are neither perfectly unit length nor mutually orthogonal.

The determinant is

det C = √3--
----
 2(0.8) −(  1 )
 − --
   2 (0.6) (88)
≈ 0.99282. (89)

That number is fairly close to one, but the matrix still fails the orthogonality test. Therefore

|----------------------|
|^C is not a valid DCM. |
------------------------
(90)

For

    ⌊ 1⌋
    ⌈  ⌉
q =   2  ,
      3
(91)

the round trip gives

qrt = CT Cq (92)
≈⌊1.20397 ⌋
⌈        ⌉
 1.82699
    3. (93)

The error is therefore

|------------------------|
|          ⌊          ⌋  |
|            0.20397     |
|qrt − q ≈ ⌈ − 0.17301 ⌉ .
|                0       |
-------------------------
(94)

This example demonstrates why determinant checking alone is insufficient. A valid DCM must satisfy all of the defining rotation-matrix properties, especially

  T
C  C  = I
(95)

and

detC  = +1.
(96)

In practical strapdown software, orthogonality residuals, determinant error, norm preservation, and round-trip tests provide complementary diagnostics.

3 What these exercises prepare us for

The matrix manipulations in this article are not isolated linear-algebra exercises. They are the algebraic foundation of the strapdown mechanization. Later we will repeatedly use expressions such as

fn =  Cnb fb,
(97)

ωbie = Cbnωnie,
(98)

and

ω × v  = [ω]×v.
(99)

INS02 adds the missing ingredient: the bases themselves rotate with time. Differentiating a vector described in a rotating basis will introduce the transport theorem and, after a second differentiation, the Coriolis, centrifugal, and Euler acceleration terms.

4 Summary

The worked examples reinforce several rules that should become automatic before continuing the series:

|----------|
vn-=--Cnb-vb-
(100)

means “take components from b to n.” The columns of Cbn are the body basis vectors resolved in navigation coordinates. A valid DCM satisfies

-------------------------------------------
|  T             −1     T                  |
-C--C-=--I,----C----=-C--,-----detC--=-+1.-|
(101)

Coordinate transformations compose according to matching frame labels,

|-n-----n--b-|
-Ca-=--Cb C-a,
(102)

and cross products transform consistently because they are geometric operations:

|--n--b------n--b----b-|
-[Cb a-]×-=-C-b [a-]×C-n.
(103)

Finally, the small angle approximation

|-n-----------n--|
-Cb-≈--I +-[δ𝜃-]×--
(104)

is orthogonal only to first order. That distinction becomes important when attitude is propagated repeatedly from gyroscope measurements.

References

[1]   David H. Titterton and John L. Weston, Strapdown Inertial Navigation Technology, 2nd ed., Institution of Electrical Engineers, 2004.

[2]   Paul D. Groves, Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems, 2nd ed., Artech House, 2013.

[3]   Christopher Jekeli, Inertial Navigation Systems with Geodetic Applications, Walter de Gruyter, 2001.

[4]   Malcolm D. Shuster, “A Survey of Attitude Representations,” The Journal of the Astronautical Sciences, Vol. 41, No. 4, pp. 439–517, 1993.

[5]   F. Landis Markley and John L. Crassidis, Fundamentals of Spacecraft Attitude Determination and Control, Springer, 2014.


"Strapdown Inertial Navigation Examples: Vectors, Frames, and Direction Cosine Matrices" is owned by bloftin.
(view preamble)
View style:
Other names:  INS01E1
Keywords:  strapdown inertial navigation, direction cosine matrix, DCM, coordinate transformation, body frame, NED, passive rotation, active rotation, orthogonal matrix, skew-symmetric matrix, cross product, small angle attitude

This object's parent.

Cross-references: acceleration, theorem, algebraic, identity, dot product, norm, unit, determinant, operation, cross product, speed, velocity, magnitude, vector, vectors, matrices, INS01

This is version 1 of Strapdown Inertial Navigation Examples: Vectors, Frames, and Direction Cosine Matrices, born on 2026-09-29.
Object id is 1345, canonical name is StrapdownInertialNavigationExamplesVectorsFramesAndDirectionCosineMatrices.
Accessed 13 times total.

Classification:
Physics Classification: 06.30.Gv (Velocity, acceleration, and rotation)
Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:

No messages.

Interact
rate | post | correct | update request | add example | add (any)