$LastChangedDate: 27-Juil-2011 $

# CL_rot_matrix2quat

Transformation matrix to quaternion

## Calling Sequence

       [q]=CL_rot_matrix2quat(M)

## Description

- Computes the quaternion corresponding to a given transformation matrix.

- 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

M :

  Transformation matrix (3x3xN)

q :

  Quaternion (dim N)

## Authors

- CNES - DCT/SB

## Bibliography

- 1) Mecanique Spatiale - CNES Cepadues 1995, Tome I, 7.2.2.3 Les quaternions

- 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

## See also

- CL_rot_defQuat

- CL_rot_quat2matrix

- CL_rot_angles2matrix

## Examples

    ang = CL_deg2rad(10);
    M = CL_rot_angles2matrix(3,ang) // rotation around Z axis
    q = CL_rot_matrix2quat(M)
    M2 = CL_rot_quat2matrix(q)    //same as M1