RPY angles from a rotation matrix

98 Views Asked by At

I have to calculate Roll, Pitch and Yaw angles from a $3\times3$ rotation matrix (below).

\begin{bmatrix}0&\frac{1}{2}&-{\frac{\sqrt{3}}{2}}\\0&-{\frac{\sqrt{3}}{2}}&-\frac{1}{2}\\-1&0&0\end{bmatrix}

I know how to calculate second angle:

$\theta = \arcsin (N_z) = \arcsin(-(-1)) = 90^{\circ}$

but the other angles seem to be impossible to calculate:

$\phi = \arctan \dfrac{N_y}{N_x} = \arctan \dfrac{0}{0}$

$\psi = \arctan \dfrac{O_z}{A_z} = \arctan \dfrac{0}{0}$

since theta is $90$ degrees I know:

$\psi - \phi = \arctan\dfrac{O_z}{A_z} = \arctan\dfrac{\frac{1}{2}}{\frac{-\sqrt{3}}{2}} = 150^{\circ}$

How to calculate these angles?