$LastChangedDate: 27-Juil-2011 $

# CL_rot_quat2eul

Quaternion to Euler '123' angles - DEPRECATED

## Calling Sequence

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

## Description

- Computes the Euler angles (rotation order: 1,2,3) that corresponds to a given quaternion.

- Notes:

  - One should be aware of singularities in the Euler angles when the second angle (theta) approaches +pi, -pi, +pi/2 or -pi/2. These cases should be handled specifically or results might not be accurate!

  - See Conventions or CL_rot_defQuat for more details on quaternions.

## Parameters

q :

  Quaternion (dim N)

phi :

  Rotation angle around X axis [rad] (1xN)

theta :

  Rotation angle around Y axis [rad] (1xN)

psi :

  Rotation angle around Z axis [rad] (1xN)

## Authors

- CNES - DCT/SB

## Bibliography

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

## See also

- CL_rot_eul2quat

- CL_rot_defQuat

## Examples

    M = CL_rot_angles2matrix([1,2,3], [0.5; 1.1; 2.3]);
    q = CL_rot_matrix2quat(M); // quaternion of this rotation
    [phi,theta,psi] = CL_rot_quat2eul(q)