<< CL_rot_angularVelocity Coordinates and frames CL_rot_defFrameVec >>

CelestLab >> Coordinates and frames > CL_rot_axAng2quat

CL_rot_axAng2quat

Rotation axis and angle to quaternion

Calling Sequence

[q] = CL_rot_axAng2quat(u, alpha)

Description

Parameters

u :

Rotation axis [ux;uy;uz]. ||u|| should be > 0 (3xN or 3x1)

alpha :

Rotation angle [rad] (1xN or 1x1)

q :

Quaternion (with norm equal to 1) (dim N)

Authors

See also

Examples

// 10 degree rotation around Z axis :
alpha = CL_deg2rad(10);
q1 = CL_rot_axAng2quat([0;0;1],alpha)

// same :
q2 = CL_rot_eul2quat(0,0,alpha)

// same :
M = CL_rot_angles2matrix(3,alpha);
q3 = CL_rot_matrix2quat(M)
<< CL_rot_angularVelocity Coordinates and frames CL_rot_defFrameVec >>