Remove this section as it's pretty obvious that the rotation matrix is just the multiplication of the components. Proper derivation of Euler angles from the rotation matrix is somewhat more complicated, e.g. tan^-1 in one of the formulas below is generally defined over -pi/2 pi/2 while alpha is in [0,2*pi). Consistency check is actually already there by means of the compass heading example.