# EA2EA: Convert from Euler Angles to Euler Angles In RSpincalc: Conversion Between Attitude Representations of DCM, Euler Angles, Quaternions, and Euler Vectors

## Description

`EA2EA` converts from Euler Angles (EA) to Euler Angles (EA).

## Usage

 ```1 2``` ```EA2EA(EA, EulerOrder1='zyx', EulerOrder2='zyx', tol = 10 * .Machine\$double.eps, ichk = FALSE, ignoreAllChk = FALSE) ```

## Arguments

 `EA` Euler Angles (EA) vector [psi, theta, phi]. `EulerOrder1` Euler Order 1 (xyx, yzy, zxz, xzx, yxy, zyz, xyz, yzx, zxy, xzy, yxz, zyx) `EulerOrder2` Euler Order 2 (xyx, yzy, zxz, xzx, yxy, zyz, xyz, yzx, zxy, xzy, yxz, zyx) `tol` Tolerance from deviations from unity for the determinant of rotation matrices or the the vector length for unitary vectors. `ichk` Logical, FALSE=disables near-singularity warnings. `ignoreAllChk` Logical, TRUE=disables all warnings and error checks (use with caution!).

## Details

Euler Angles (EA) xyz <=> x(roll) y(pitch) z(yaw) Type 1 Rotations (Tait-Bryan angles): xyz - xzy - yxz - yzx - zyx - zxy Singular if second rotation angle is -90 or 90 degrees. Type 2 Rotations (proper Euler angles): xyx - xzx - yxy - yzy - zxz - zyz Singular if second rotation angle is 0 or 180 degrees.

Euler angles [psi, theta, phi] range from -90 to 90 degrees. Tait-Bryan angles [psi, theta, phi] range from 0 to 180 degrees. Angles about Euler vectors range from 0 to 180 degrees.

## Value

Euler Angles (EA) vector [psi, theta, phi].

Jose Gama

## References

by John Fuller, 14 Jul 2008 SpinCalc, Function to Convert between DCM, Euler angles, Quaternions, and Euler vectors. http://www.mathworks.com/matlabcentral/fileexchange/20696-function-to-convert-between-dcm–euler-angles–quaternions–and-euler-vectors

Paolo de Leva, 01 May 2013 SpinConv, Conversion from a rotation representation type to another. http://www.mathworks.com/matlabcentral/fileexchange/41562-spinconv

`EA2DCM`, `EA2Q`, `EA2EV`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```## Not run: EAxyx <- c(-170.6607, 110.937, 136.2344) EA2EA(EAxyx,'xyx','xyz') EA2EA(EAxyx,'xyx','xzy') EA2EA(EAxyx,'xyx','yzx') EA2EA(EAxyx,'xyx','yxz') EA2EA(EAxyx,'xyx','zxy') EA2EA(EAxyx,'xyx','zyx') EA2EA(EAxyx,'xyx','xzx') EA2EA(EAxyx,'xyx','yxy') EA2EA(EAxyx,'xyx','yzy') EA2EA(EAxyx,'xyx','zxz') EA2EA(EAxyx,'xyx','zyz') ## End(Not run) ```