Name

CL_rot_quat2matrix — Quaternion to matrix

Calling Sequence

   M=CL_rot_quat2matrix(q)
   
   

Description

  • Computes the frame transfer matrix M from quaternion q. Computed matrix M is the transposed of the rotation operator matrix corresponding to q. That is matrix A from Wertz called 'transformation matrix' (so rotation matrix = A'=M', see reference 2 below).

    If q contains N quaternions: size(q)=N -> size(M)=[3 3 N]

    For example: if R is a reference frame and S a satellite frame with attitude quaternion q, then the coordinates of a unique vector v (with coordinates vR in R and vS in S) are linked by:

  • Last update : 27/6/2008

Parameters

q:

quaternion (dim N)

M:

frame transfer hypermatrix (3x3xN)

Bibliography

1 Mecanique Spatiale - CNES Cepadues 1995, Tome I, 7.2.2.3 Les quaternions, eq.15

2 James R. Wertz, Spacecraft attitude determination and control (volume 73 of Astrophyisics and Space Science Library), D. Reidel Publishing Company, 1980, appendix D-E

Authors

CNES - DCT/SB

See also

CL_rot_defQuat, CL_rot_matrix2quat, CL_rot_angles2matrix

Examples

ang = CL_deg2rad(10)
M1 = CL_rot_angles2matrix(3,ang)
q1 = CL_rot_matrix2quat(M1)
q2 = CL_rot_eul2quat(0,0,ang)  //same as q1
M2 = CL_rot_quat2matrix(q2)    //same as M1