PlanetPhysics/Euler 321 Sequence

For more info on Euler Sequences, notation and convention see the generic entry on Euler angle sequences. \\

$$ R_{321}(\phi, \theta, \psi) = R_1(\phi) R_2(\theta) R_3(\psi) $$ \\

The rotation matrices are

$$ R_1(\phi) = \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & c_{\phi} & s_{\phi} \\ 0 & -s_{\phi} & c_{\phi} \end{matrix} \right] $$

$$ R_2(\theta) = \left[ \begin{matrix} c_{\theta} & 0 & -s_{\theta} \\ 0 & 1 & 0 \\ s_{\theta} & 0 & c_{\theta} \end{matrix} \right] $$

$$ R_3(\psi) = \left[ \begin{matrix} c_{\psi} & s_{\psi} & 0 \\ -s_{\psi} & c_{\psi} & 0 \\ 0 & 0 & 1 \end{matrix} \right] $$

Carrying out the matrix multiplication from right to left \\

$$ R_2(\theta)R_3(\psi) = \left[ \begin{matrix} c_{\theta} & 0 & -s_{\theta} \\ 0 & 1 & 0 \\ s_{\theta} & 0 & c_{\theta} \end{matrix} \right] \left[ \begin{matrix} c_{\psi} & s_{\psi} & 0 \\ -s_{\psi} & c_{\psi} & 0 \\ 0 & 0 & 1 \end{matrix} \right] = \left[ \begin{matrix} c_{\theta} c_{\psi} & c_{\theta} s_{\psi} & -s_{\theta} \\ -s_{\psi} & c_{\psi} & 0 \\ s_{\theta} c_{\psi} & s_{\theta} s_{\psi} & c_{\theta} \end{matrix} \right] $$ \\

Finaly leaving us with the Euler 321 sequence \\

$$ R_1(\phi)R_2(\theta)R_3(\psi) = \left[ \begin{matrix} c_{\theta} c_{\psi} & c_{\theta} s_{\psi} & -s_{\theta}  \\ - c_{\phi} s_{\psi} + s_{\phi} s_{\theta} c_{\psi} & c_{\phi} c_{\psi} + s_{\phi} s_{\theta} s_{\psi} & s_{\phi} c_{\theta} \\ s_{\phi} s_{\psi} + c_{\phi} s_{\theta} c_{\psi} & -s_{\phi} c_{\psi} + c_{\phi} s_{\theta} s_{\psi} & c_{\phi} c_{\theta}  \end{matrix} \right] $$