Rotation Matrix to Euler Angles

Calculator for Converting a Rotation Matrix to Euler Angles

Calculate 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

Calculate Euler angles

 Input
Unit of angles
Decimal places
Result
Yaw
Pitch
Roll

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)\)
Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?