changed to the right quaternion convention of the log jacobian