Name

CL_rot_eul2quat — Euler '123' angles to quaternion

Calling Sequence

   [q] = CL_rot_eul2quat(phi,theta,psi)
   
   

Description

  • Computes the quaternion q given Euler angles (rotation order (123))phi, theta and psi.
  • Last update : 3/6/2008

Parameters

phi:

rotation angle about the X axis [rad] (1xN)

theta:

rotation angle about the Y axis [rad] (1xN)

psi:

rotation angle about the Z axis [rad] (1xN)

q:

quaternion (dim N)

Authors

CNES - DCT/SB

Bibliography

Mecanique spatiale - CNES Cepadues 1995, Tome I, 7.2.2.3 Les quaternions

See also

CL_rot_quat2eul, CL_rot_defQuat

Examples

// Example 1
phi = %pi/8
theta = %pi/3
psi = %pi/2
q = CL_rot_eul2quat(phi,theta,psi);
[phi2,theta2,psi2] = CL_rot_quat2eul(q);
R = [phi;theta;psi]; //reference values
S = [phi2;theta2;psi2];  //solution