#include <quaternion.hpp>
Public Types | |
enum | EulerAnglesType { INT_XYZ , INT_XZY , INT_YXZ , INT_YZX , INT_ZXY , INT_ZYX , INT_XYX , INT_XZX , INT_YXY , INT_YZY , INT_ZXZ , INT_ZYZ , EXT_XYZ , EXT_XZY , EXT_YXZ , EXT_YZX , EXT_ZXY , EXT_ZYX , EXT_XYX , EXT_XZX , EXT_YXY , EXT_YZY , EXT_ZXZ , EXT_ZYZ , EULER_ANGLES_MAX_VALUE } |
Enum of Euler angles type. More... | |
Enum of Euler angles type.
Without considering the possibility of using two different convertions for the definition of the rotation axes , there exists twelve possible sequences of rotation axes, divided into two groups:
The three elemental rotations may be extrinsic (rotations about the axes xyz of the original coordinate system, which is assumed to remain motionless), or intrinsic(rotations about the axes of the rotating coordinate system XYZ, solidary with the moving body, which changes its orientation after each elemental rotation).
Extrinsic and intrinsic rotations are relevant.
The definition of the Euler angles is as following,
For intrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:
For extrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:
where
The function is designed according to this set of conventions:
For and , the valid range is (−π, π].
For , the valid range is [−π/2, π/2] or [0, π].
For Tait–Bryan angles, the valid range of is [−π/2, π/2]. When transforming a quaternion to Euler angles, the solution of Euler angles is unique in condition of . If or , there are infinite solutions. The common name for this situation is gimbal lock. For Proper Euler angles,the valid range of is in [0, π]. The solutions of Euler angles are unique in condition of . If or , there are infinite solutions and gimbal lock will occur.