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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_VPACK packs three scalar components into a vector.

I/O


   Given:

      x,
      y,
      z        the scalar components of a 3-dimensional vector.

               help, x
                  DOUBLE = Scalar
               help, y
                  DOUBLE = Scalar
               help, z
                  DOUBLE = Scalar

   the call:

      cspice_vpack, x, y, z, v

   returns:

      v        the equivalent vector, such that

                  v = [ x, y, z ]

               help, v
                  DOUBLE = Array[3]

Parameters


   None.

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.

   1) Compute an upward normal of an equilateral triangle lying
      in the x-y plane and centered at the origin.


      Example code begins here.


      PRO vpack_ex1

         s = sqrt(3.D0)/2L

         ;;
         ;; Define the three corners of the triangle.
         ;;
         cspice_vpack,    s, -0.5D0, 0.D0, v1
         cspice_vpack, 0.D0,  1.D0,  0.D0, v2
         cspice_vpack,   -s, -0.5D0, 0.D0, v3

         ;;
         ;; Compute an upward normal of the triangle.
         ;;
         cspice_pltnrm, v1, v2, v3, normal

         print, format='(A,3F17.13)', 'NORMAL = ', normal

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      NORMAL =   0.0000000000000  0.0000000000000  2.5980762113533


Particulars


   Native IDL code to perform the same operation:

      v = [ x, y, z ]

Exceptions


   1)  If any of the input arguments, `x', `y' or `z', is undefined,
       an error is signaled by the IDL error handling system.

   2)  If any of the input arguments, `x', `y' or `z', is not of the
       expected type, or it does not have the expected dimensions and
       size, an error is signaled by the Icy interface.

   3)  If the output argument `v' is not a named variable, an error
       is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.2, 10-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added complete
       code example.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections. Moved the
       existing contents of -Examples section to -Particulars.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.1, 09-DEC-2005 (EDW)

       Added -Examples section.

   -Icy Version 1.0.0, 16-JUN-2003 (EDW)

Index_Entries


   pack three scalar components into a vector



Fri Dec 31 18:43:09 2021