...matrixfaq.[*]
Note the bold-italic (vectors) and bold (matrices) notation. The conversion between vector representations, i.e., Euler angles, and matrix representations is done by algorithms from [8].
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...$ R$.$
If $ \trace {\M R}$ (sum of the diagonal terms) is zero, the above calculation has to be altered: Iff $ r_{1,1} >
r_{2,2}$ and $ r_{1,1} > r_{3,3}$ then,
$\displaystyle \dot {\V q}$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{l}
\frac{1}{2} \frac{r_{2,3} - r_{3,2}}{...
... - r_{1,1} +
r_{2,2} - r_{3,3}}}  [2.5ex]
\end{array}\right),\end{displaymath}  

otherwise the quaternion $ \dot {\V q}$ is calculated as
$\displaystyle \dot {\V q}$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{l}
\frac{1}{2} \frac{r_{1,2} - r_{2,1}}{...
...1 - r_{1,1} - r_{2,2} + r_{3,3}}  [1.5ex]
\end{array}\right).\end{displaymath}  

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.