Direction Cosine Matrix to Quaternions
Convert direction cosine matrix to quaternion vector
Libraries:
Aerospace Blockset /
Utilities /
Axes Transformations
Description
The Direction Cosine Matrix to Quaternions block transforms a 3-by-3 direction cosine matrix (DCM) into a four-element unit quaternion vector (q0, q1, q2, q3). Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention. The direction cosine matrix represents a passive transformation from frame A to frame B. The resulting quaternions represent a series of intrinsic right-hand passive transformations from frame A to frame B. For more information on the direction cosine matrix, see Algorithms.
Examples
Ports
Input
Output
Parameters
Algorithms
The DCM is defined as a function of a unit quaternion vector by the following:
Using this representation of the DCM, a number of calculations arrive at the correct quaternion. The first of these is to calculate the trace of the DCM to determine which algorithms are used. If the trace is greater than zero, the quaternion can be automatically calculated. When the trace is less than or equal to zero, the major diagonal element of the DCM with the greatest value must be identified to determine the final algorithm used to calculate the quaternion. Once the major diagonal element is identified, the quaternion is calculated.
Extended Capabilities
Version History
Introduced before R2006a