| Aerospace Blockset™ | ![]() |
Utilities/Axes Transformations
The Quaternions to Rotation Angles block converts the four-element quaternion vector (q0,q1,q2,q3) into the rotation described by the three rotation angles (R1, R2, R3). The block generates the conversion by comparing elements in the direction cosine matrix (DCM) as a function of the rotation angles. The elements in the DCM are functions of a unit quaternion vector. For example, for the rotation order z-y-x, the DCM is defined as:

The DCM defined by a unit quaternion vector is:

From the preceding equation, you can derive the following relationships between DCM elements and individual rotation angles for a ZYX rotation order:

where Ψ is R1, Θ is R2, and Φ is R3.

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.
| Input | Dimension Type | Description |
|---|---|---|
First | 4-by-1 quaternion vector | Contains the quaternion vector. |
| Output | Dimension Type | Description |
|---|---|---|
First | 3-by-3 vector | Contains the rotation angles. |
The limitations for the 'ZYX', 'ZXY', 'YXZ', 'YZX', 'XYZ', and 'XZY' implementations generate an R2 angle that is between +/-90 degrees, and R1 and R3 angles that are between +/-180 degrees.
The limitations for the 'ZYZ', 'ZXZ', 'YXY', 'YZY', 'XYX', and 'XZX' implementations generate an R2 angle that is between 0 and 180 degrees, and R1 and R3 angles that are between +/-180 degrees.
Direction Cosine Matrix to Rotation Angles
Direction Cosine Matrix to Quaternions
Quaternions to Direction Cosine Matrix
Rotation Angles to Direction Cosine Matrix
Rotation Angles to Quaternions
![]() | Quaternions to Direction Cosine Matrix | Radius at Geocentric Latitude | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |