# Direction Cosine Matrix Body to Wind

Convert angle of attack and sideslip angle to direction cosine matrix

## Library

Utilities/Axes Transformations

## Description

The Direction Cosine Matrix Body to Wind block converts angle of attack and sideslip angle into a 3-by-3 direction cosine matrix (DCM). The DCM matrix performs the coordinate transformation of a vector in body axes (ox0, oy0, oz0) into a vector in wind axes (ox2, oy2, oz2). The order of the axis rotations required to bring this about is:

1. A rotation about oy0 through the angle of attack (α) to axes (ox1, oy1, oz1)

2. A rotation about oz1 through the sideslip angle (β) to axes (ox2, oy2, oz2)

$\begin{array}{l}\left[\begin{array}{c}o{x}_{2}\\ o{y}_{2}\\ o{z}_{2}\end{array}\right]=DC{M}_{wb}\left[\begin{array}{c}o{x}_{0}\\ o{y}_{0}\\ o{z}_{0}\end{array}\right]\\ \\ \left[\begin{array}{c}o{x}_{2}\\ o{y}_{2}\\ o{z}_{2}\end{array}\right]=\left[\begin{array}{ccc}\mathrm{cos}\beta & \mathrm{sin}\beta & 0\\ -\mathrm{sin}\beta & \mathrm{cos}\beta & 0\\ 0& 0& 1\end{array}\right]\left[\begin{array}{ccc}\mathrm{cos}\alpha & 0& \mathrm{sin}\alpha \\ 0& 1& 0\\ -\mathrm{sin}\alpha & 0& \mathrm{cos}\alpha \end{array}\right]\left[\begin{array}{c}o{x}_{0}\\ o{y}_{0}\\ o{z}_{0}\end{array}\right]\end{array}$

Combining the two axis transformation matrices defines the following DCM.

$DC{M}_{wb}=\left[\begin{array}{ccc}\mathrm{cos}\alpha \mathrm{cos}\beta & \mathrm{sin}\beta & \mathrm{sin}\alpha \mathrm{cos}\beta \\ -\mathrm{cos}\alpha \mathrm{sin}\beta & \mathrm{cos}\beta & -\mathrm{sin}\alpha \mathrm{sin}\beta \\ -\mathrm{sin}\alpha & 0& \mathrm{cos}\alpha \end{array}\right]$

## Inputs and Outputs

InputDimension TypeDescription

First

2-by-1 vectorContains the angle of attack and sideslip angle, in radians.

OutputDimension TypeDescription

First

3-by-3 direction cosine matrixTransforms body-fixed vectors to wind-fixed vectors.

## Reference

Stevens, B. L., and F. L. Lewis, Aircraft Control and Simulation, John Wiley & Sons, New York, 1992.