PlanetPhysics/Direction Cosine Matrix to Quaternions

The fourth quaternion can be found through the definition given for the axis of rotation (see axis angle of rotation), $$\alpha$$

$$ q_4 = +/- \frac{1}{2} \sqrt{A_{11} + A_{22} + A_{33} + 1} $$