Q2Mat:

Path: Common/Quaternion

% Converts a quaternion to a transformation matrix.
 Does not check to see that m is orthonormal.
 This routine requires 45 floating point operations.
--------------------------------------------------------------------------
   Form:
   m = Q2Mat( q )	
--------------------------------------------------------------------------

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

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

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

Back to the Common Module page