dcm2angle
Create rotation angles from direction cosine matrix
Syntax
Description
Basic Syntax
[
calculates the rotation angles,rotationAng1
rotationAng2
rotationAng3
] = dcm2angle(dcm
)rotationAng1
,rotationAng2
,rotationAng3
, for a direction cosine matrix,dcm
. The rotation used in this function is a passive transformation between two coordinate systems.
[
calculates the rotation angles for a specified rotation sequence,rotationAng1
rotationAng2
rotationAng3
] = dcm2angle(dcm
,rotationSequence
)rotationSequence
.
Constraint, Action, and Tolerance Syntax
[
计算指定的旋转角度和le constraint,rotationAng1
rotationAng2
rotationAng3
] = dcm2angle(dcm
,rotationSequence
,lim
)lim
. Specifylim
after all other input arguments.
[
calculates the rotation angles and performs an action if the direction cosine matrix is not orthogonal. SpecifyrotationAng1
rotationAng2
rotationAng3
] = dcm2angle(dcm
,rotationSequence
,lim
,action
)action
after all other input arguments.
[
calculates the rotation angles and uses arotationAng1
rotationAng2
rotationAng3
] = dcm2angle(dcm
,rotationSequence
,lim
,action
,tolerance
)tolerance
level to evaluate if the direction cosine matrix is orthogonal. Specifytolerance
after all other input arguments.
Examples
Input Arguments
Output Arguments
Limitations
The
'Default'
limitations for the'ZYX'
,'ZXY'
,'YXZ'
,'YZX'
,'XYZ'
, and'XZY'
implementations generate anrotationAng2
angle that lies between ±90 degrees, androtationAng1
androtationAng3
angles that lie between ±180 degrees.The
'Default'
limitations for the'ZYZ'
,'ZXZ'
,'YXY'
,'YZY'
,'XYX'
, and'XZX'
implementations generate arotationAng2
angle that lies between 0–180 degrees, androtationAng1
androtationAng3
angles that lie between ±180 degrees.The
'ZeroR3'
limitations for the'ZYX'
,'ZXY'
,'YXZ'
,'YZX'
,'XYZ'
, and'XZY'
implementations generate arotationAng2
angle that lies between ±90 degrees, androtationAng1
androtationAng3
angles that lie between ±180 degrees. However, whenrotationAng2
is ±90 degrees,rotationAng3
is set to 0 degrees.The
'ZeroR3'
limitations for the'ZYZ'
,'ZXZ'
,'YXY'
,'YZY'
,'XYX'
, and'XZX'
implementations generate arotationAng2
angle that lies between 0–180 degrees, androtationAng1
androtationAng3
angles that lie between ±180 degrees. However, whenrotationAng2
is 0 or ±180 degrees,rotationAng3
is set to 0 degrees.