quat2angle
Convert quaternion to rotation angles
Syntax
Description
[
calculates the set of rotation angles,rotationAng1
rotationAng2
rotationAng3
] = quat2angle(q
)rotationAng1
,rotationAng2
,rotationAng3
, for a given quaternion,q
. The rotation used in this function is a passive transformation between two coordinate systems.
[
calculates the set of rotation anglesrotationAng1
rotationAng2
rotationAng3
] = quat2angle(q
,s
)rotationAng1
,rotationAng2
,rotationAng3
for a given quaternion,q
, and a specified rotation sequence,s
.
Aerospace Toolboxuses quaternions that are defined using the scalar-first convention. This function normalizes all quaternion inputs.
Examples
Input Arguments
Output Arguments
Limitations
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.The
'ZYZ'
,'ZXZ'
,'YXY'
,'YZY'
,'XYX'
, and'XZX'
implementations generate arotationAng2
angle that lies between 0 and 180 degrees, androtationAng1
androtationAng3
angles that lie between ±180 degrees.