Rotation Matrix to Euler Angles
Calculator for Converting a Rotation Matrix to Euler Angles
This function converts the Euler angles from a rotation matrix
Enter the values of the matrix whose angles are to be calculated. Then click on the "Calculate" button
|
Converting a Rotation Matrix to Euler Angles
The general solution to recovering Euler angles from a rotation matrix is:
Yaw angle: \(\displaystyle w=tan^{-1}\left(\frac{m21}{m11}\right)=atan2(m21,m11)\)
Pitch angle: \(\displaystyle v=-sin^{-1}(m31)= -asin(m31)\)
Roll angle: \(\displaystyle u=tan^{-1}\left(\frac{m32}{m33}\right)=atan2(m32,m33)\)
In the special case when the pitch angle (v) = +/-90°, a condition occurs that is referred to as "gimbal lock". The pitch angle is still valid, but the other angles are undefined. In this case, the following formulas apply:
If the pitch angle v = -90°, (m31 = 1):
Yaw angle: \(\displaystyle w=0\)
Roll angle: \(\displaystyle u=tan^{-1}\left(\frac{-m12}{-m13}\right)=atan2(-m12,-m13)\)
If the pitch angle is v = 90°, (m31 = -1):
Yaw angle: \(\displaystyle w=0\)
Roll angle: \(\displaystyle u=tan^{-1}\left(\frac{m12}{m13}\right)=atan2(m12,m13)\)
Matrix 3x3 Functions
Addition • Subtraction • Multiplication • Scalar Multiplication • Rotation X axis • Rotation Y axis • Rotation Z axis • Y, P, R Rotation quaternion • Y, P, R Rotation Euler angles • Invert • DeterminantMatrix 4x4 Functions
Addition • Subtraction • Multiplication • Scalar Multiplication • Rotation X axis • Rotation Y axis • Rotation Z axis • Y, P, R Rotation • Vector Rotation • Invert • Determinant • interpolation
|