Direction Cosine Matrix#

Rotations are linear operations preserving vector length. These rotation operators are represented with matrices.

Let us assume there is a linear operator represented by a \(3\times 3\) matrix:

\[\begin{split}\mathbf{R} = \begin{bmatrix} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{bmatrix} \in \mathbb{R}^{3\times 3}\end{split}\]

where

\[\begin{split}\begin{array}{lcr} \mathbf{r}_1 = \begin{bmatrix}r_{11}\\ r_{21} \\ r_{31} \end{bmatrix} \; , & \mathbf{r}_2 = \begin{bmatrix}r_{12}\\ r_{22} \\ r_{32} \end{bmatrix} \; , & \mathbf{r}_3 = \begin{bmatrix}r_{13}\\ r_{23} \\ r_{33} \end{bmatrix} \end{array}\end{split}\]

are unit vectors orthogonal to each other. All matrices satisfying this orthogonality are called orthogonal matrices.

The difference, in three dimensions, between any given orthogonal frame and a base coordinate frame is the orientation or attitude.

A vector \(\mathbf{v}\in\mathbb{R}^3\) is used to represent a point in a three-dimensional euclidean space. When \(\mathbf{v}\) is multiplied with the matrix \(\mathbf{R}\), the result is a new vector \(\mathbf{v}'\in\mathbb{R}^3\):

\[\mathbf{v}' = \mathbf{Rv}\]

We observe that \(\mathbf{RR}^{-1}=\mathbf{RR}^T=\mathbf{R}^T\mathbf{R}=\mathbf{I}\), indicating that the inverse of \(\mathbf{R}\) is its transpose. So,

\[\mathbf{v} = \mathbf{R}^T\mathbf{v}'\]

The determinant of this matrix is always equal to \(+1\). This means, its product with any vector will leave the vector’s length unchanged.

\(3\times 3\) matrices conforming to these properties (orthogonality, \(\mathbf{R}^T=\mathbf{R}^{-1}\), and \(\mathrm{det}(\mathbf{R})= +1\)) belong to the special orthogonal group \(SO(3)\), also known as the rotation group.

Even better, the product of two or more rotation matrices yields another rotation matrix in \(SO(3)\).

Direction cosines are cosines of angles between a vector and a base coordinate frame [WikipediaDCM]. In this case, the direction cosines describe the differences between orthogonal vectors \(\mathbf{r}_i\) and the base frame. The matrix containing these differences is commonly named the Direction Cosine Matrix.

These matrices are used for two main purposes:

  • To describe any frame’s orientation relative to a base frame.

  • To transform vectors (representing points in three dimensions) from one frame to another. This is a rotation operation.

Because of the latter, the DCM is also known as the rotation matrix.

DCMs are, therefore, the most common representation of rotations [WikipediaRotMat], especially in real applications of spacecraft tracking and location.

Throughout this package they will be used to represent the attitudes with respect to the global frame.

References

[Ma]

Yi Ma, Stefano Soatto, Jana Kosecka, and S. Shankar Sastry. An Invitation to 3-D Vision: From Images to Geometric Models. Springer Verlag. 2003. (https://www.eecis.udel.edu/~cer/arv/readings/old_mkss.pdf)

[Huyhn]

Huynh, D.Q. Metrics for 3D Rotations: Comparison and Analysis. J Math Imaging Vis 35, 155–164 (2009).

[Curtis]

Howard D Curtis. Orbital Mechanics for Engineering Students (Third Edition) Butterworth-Heinemann. 2014.

[Kuipers]

Kuipers, Jack B. Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace and Virtual Reality. Princeton; Oxford: Princeton University Press, 1999.

[Diebel]

Diebel, James. Representing Attitude; Euler Angles, Unit Quaternions, and Rotation. Stanford University. 20 October 2006.