quaternion to direction cosine matrix conversion converts direction cosine matrix to quaternion
mat = matrix(q)
mat2quat Euler axis2quat hr2quat