<< CL_rot_angles2matrix Coordinates and frames CL_rot_axAng2quat >>

CelestLab >> Coordinates and frames > CL_rot_angles2quat

CL_rot_angles2quat

Rotation angles to quaternion

Calling Sequence

q = CL_rot_angles2quat(naxes,angles)

Description

Parameters

naxes :

Axis numbers: 1=x-axis, 2=y-axis or 3=z-axis (1xP or Px1)

angles :

Rotation angles around respective axes [rad] (PxN)

q :

quaternion (that defines the rotation) (4xN).

Authors

See also

Examples

// 40deg rotation around X followed by 60deg around Y:
q = CL_rot_angles2quat([1,2], [40;60] * %pi/180)

// Same considering individual rotations:
q1 = CL_rot_angles2quat(1, 40 * %pi/180);
q2 = CL_rot_angles2quat(2, 60 * %pi/180);
q = q1*q2

Report an issue
<< CL_rot_angles2matrix Coordinates and frames CL_rot_axAng2quat >>