$LastChangedDate: 27-Juil-2011 $

# CL_rot_quat2matrix

Quaternion to transformation matrix

## Calling Sequence

       [M]=CL_rot_quat2matrix(q)

## Description

- Computes the transformation matrix that corresponds to a given quaternion.

- Notes:

  - See CL_rot_angles2matrix for conventions regarding the definition of the transformation matrix.

  - See Conventions or CL_rot_defQuat for more details on quaternions.

## Parameters

q:

  Quaternion (dim N)

M:

  Transformation matrix (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