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 quaternion represents a passive transformation from frame A to
frame B. The resulting rotation angles represent a series of right-hand intrinsic passive
rotations from frame A to frame B.
[
calculates the set of rotation angles rotationAng1
rotationAng2
rotationAng3
] = quat2angle(q
,s
)rotationAng1
,
rotationAng2
, rotationAng3
for a given quaternion,
q
, and a specified rotation sequence, s
.
Aerospace Toolbox uses 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.
Version History
Introduced in R2007b
See Also
angle2dcm
| angle2quat
| dcm2angle
| dcm2quat
| quat2dcm