Index Page
cspice_twovec
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_TWOVEC calculates the transformation matrix to the 
   right-handed reference frame having an input vector as a 
   specified axis and a second input vector lying in a
   define coordinate plane.

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

I/O

   
   Given:
   
      axdef    a double precision axis 3-vector 
      
      indexa   the integer index signifying 'axdef' (1, 2 or 3)
      
      plndef   a second double precision 3-vector in the 
               same plane as axdef
      
      indexp   the index of the second principle axis, 
               orthogonal to 'axdef' (1, 2 or 3)
  
   the call:
   
      cspice_twovec, axdef, indexa, plndef, indexp, mout
   
   returns
   
      mout    a double precision 3x3-matrix containing a 
              rotation matrix from the frame of the original 
              vectors to the new frame
   

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.

   
      ;;
      ;; A trivial example. Define the reference vectors...
      ;;  
      ;;  The i unit vector
      ;;
      axdef  = [ 1.d, 0.d, 0.d]
      indexa = 1 
   
      ;;  
      ;;  The -j unit vector. For this example, any vector
      ;;  in the x-y plane will suffice.
      ;;
      plndef = [ 0.d, -1.d, 0.d]
      indexp = 2
   
      ;;
      ;; Calculate the transformation matrix. The new frame
      ;; has axdef as axis indexa, with plndef in the same
      ;; plane, the direction axis indexp in that plane
      ;; and orthogonal to axdef. A third direction vector
      ;; completes the right handed frame.
      ;;
      cspice_twovec, axdef, indexa, plndef, indexp, mout
      print, mout
   
   IDL outputs:
   
          1.0000000       0.0000000       0.0000000
          0.0000000      -1.0000000       0.0000000
          0.0000000       0.0000000      -1.0000000

Particulars


   None.

Required Reading


   ICY.REQ

Version


   -Icy Version 1.0.1, 23-SEP-2008, EDW (JPL)

      Eliminated error in English.
   
   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   define an orthonormal frame from two vectors 
 



Wed Apr  5 17:58:04 2017