Mat2Q:

Path: Common/Quaternion

% Converts a transformation matrix to a quaternion.
 Does not check to see that m is orthonormal.

--------------------------------------------------------------------------
   Form:
   q = Mat2Q ( m )		
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   m		(3,3)  Orthonormal transformation matrix

   -------
   Outputs
   -------
   q		(4,1)  Equivalent quaternion

--------------------------------------------------------------------------
  References: Shepperd, S. W., Quaternion from Rotation Matrix,
              J. Guidance, Vol. 1, No. 3, May-June, 1978, pp. 223-224.
--------------------------------------------------------------------------

Back to the Common Module page