Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Direction Cosine Matrix to Rotation Angles

Convert direction cosine matrix to rotation angles

Library

Utilities/Axes Transformations

Description

The Direction Cosine Matrix to Rotation Angles block converts a 3-by-3 direction cosine matrix (DCM) into three rotation angles R1, R2, and R3, respectively the first, second, and third rotation angles. The DCM matrix performs the coordinate transformation of a vector in inertial axes into a vector in body axes. The block Rotation Order parameter specifies the order of the block output rotations. For example, if Rotation Order has a value of ZYX, the block outputs are in the rotation order z-y-x (psi theta phi).

Parameters

Rotation Order

Specifies the output rotation order for three rotation angles. From the list, select ZYX, ZYZ, ZXY, ZXZ, YXZ, YXY, YZX, YZY, XYZ, XYX, XZY, or XZX. The default is ZYX.

Limitation

The 'Default' limitations for the 'ZYX', 'ZXY', 'YXZ', 'YZX', 'XYZ', and 'XZY' implementations generate an R2 angle that lies between ±90 degrees, and R1 and R3 angles that lie between ±180 degrees.

The 'Default' limitations for the 'ZYZ', 'ZXZ', 'YXY', 'YZY', 'XYX', and 'XZX' implementations generate an R2 angle that lies between 0 and 180 degrees, and R1 and R3 angles that lie between ±180 degrees.

The 'ZeroR3' limitations for the 'ZYX', 'ZXY', 'YXZ', 'YZX', 'XYZ', and 'XZY' implementations generate an R2 angle that lies between ±90 degrees, and R1 and R3 angles that lie between ±180 degrees. However, when R2 is ±90 degrees, R3 is set to 0 degrees.

The 'ZeroR3' limitations for the 'ZYZ', 'ZXZ', 'YXY', 'YZY', 'XYX', and 'XZX' implementations generate an R2 angle that lies between 0 and 180 degrees, and R1 and R3 angles that lie between ±180 degrees. However, when R2 is 0 or ±180 degrees, R3 is set to 0 degrees.

Inputs and Outputs

InputDimension TypeDescription

First

3-by-3 matrixContains the direction cosine matrix.

OutputDimension TypeDescription

First

3-by-1 vectorContains the rotation angles, in radians.

Introduced in R2007b

Was this topic helpful?