EA2Q {RSpincalc}R Documentation

Convert from Euler Angles to rotation Quaternions

Description

EA2Q converts from Euler Angles (EA) to Quaternions (Q).

Usage

EA2Q(EA, EulerOrder='zyx', ichk = FALSE, ignoreAllChk = FALSE)

Arguments

EA

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

EulerOrder

Euler Order (xyx, yzy, zxz, xzx, yxy, zyz, xyz, yzx, zxy, xzy, yxz, zyx)

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

Quaternions (Q) vector [q1, q2, q3, q4].

Author(s)

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

See Also

Q2EA

Examples

EAxyx <- c(-170.6607, 110.937, 136.2344) * (pi/180)
EA2Q(EAxyx,'xyx')

[Package RSpincalc version 1.0.2 Index]