Index Page
cspice_q2m
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_Q2M calculates the rotation matrix corresponding to a
   specified unit quaternion.

I/O


   Given:

      q   an array of unit-length SPICE-style quaternion(s).

          [4,n] = size(q); double = class(q)

          Note that multiple styles of quaternions are in use.
          This routine returns a quaternion that conforms to
          the SPICE convention. See the Particulars section
          for details.

   the call:

      r = cspice_q2m(q)

   returns:

      r   the rotation matrix/matrices corresponding to 'q'

          If [4,1] = size(q) then [3,3]   = size(r)
          If [4,n] = size(q) then [3,3,n] = size(r)
                                   double = class(r)

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

Particulars


   About SPICE quaternions
   =======================

   There are (at least) two popular "styles" of quaternions; these
   differ in the layout of the quaternion elements, the definition
   of the multiplication operation, and the mapping between the set
   of unit quaternions and corresponding rotation matrices.

   SPICE-style quaternions have the scalar part in the first
   component and the vector part in the subsequent components. The
   SPICE convention, along with the multiplication rules for SPICE
   quaternions, are those used by William Rowan Hamilton, the
   inventor of quaternions.

   Another common quaternion style places the scalar component
   last.  This style is often used in engineering applications.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine q2m_c.

   MICE.REQ
   ROTATION.REQ

Version


   -Mice Version 1.0.1, 09-MAR-2015, EDW (JPL)

      Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.0, 10-JAN-2006, EDW (JPL)

Index_Entries


   quaternion to matrix


Wed Apr  5 18:00:34 2017