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_bodvar

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


Abstract


   Deprecated: This routine has been superseded by the Icy routines 
   cspice_bodvcd and cspice_bodvrd. This routine is supported only for 
   purposes of backward compatibility.

   CSPICE_BODVAR returns a double precision vector containing the values for
   some designated body data stored in the kernel pool.

I/O


   Given:

      body     the scalar integer NAIF ID of the body for which to return the
               value(s) of `item'.

               help, body
                  LONG = Scalar

      item     the scalar string naming the property of `body' to return, e.g.
               RADII, GM, POLE_RA.

               help, item
                  STRING = Scalar

               Together, the body and item name combine to form a variable
               name, e.g.,

                  'BODY599_RADII'
                  'BODY401_POLE_RA'

                Note that `item' *is* case-sensitive. This attribute
                is inherited from the case-sensitivity of kernel
                variable names.

   the call:

      cspice_bodvar, body, item, values

   returns:

      values   an array of the double precision values associated with the
               variable.

               help, values
                  DOUBLE = Array[N]

               Note: `values' returns a vector even when `item' refers to a
               scalar, i.e. a scalar returns in values[0].

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) Retrieve the Earth's radii values from the kernel pool

      Use the PCK kernel below to load the required triaxial
      ellipsoidal shape model for the Earth.

         pck00008.tpc


      Example code begins here.


      PRO bodvar_ex1

         ;;
         ;; Local constants.
         ;;
         BODYID =   399

         ;;
         ;; Load a PCK file.
         ;;
         cspice_furnsh, 'pck00008.tpc'

         ;;
         ;; Test if Earth's radii values exist in the
         ;; kernel pool.
         ;;
         ;; The procedure searches for the kernel variable
         ;; BODY399_RADII.
         ;;
         found  = cspice_bodfnd( BODYID, 'RADII' )

         ;;
         ;; If found, retrieve the values.
         ;;
         if ( found ) then begin

            cspice_bodvar, BODYID, 'RADII', radii

            print, format='(I3,A,3F11.3)', BODYID, ' RADII:', radii

         endif else begin

            print, 'No RADII data found for object ', BODYID

         endelse

      END


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


      399 RADII:   6378.140   6378.140   6356.750


      Note: cspice_bodvar signals an error if the kernel pool
      lacks the necessary data. An alternate implementation for this
      example would involve a catch handler:

         catch, err
            if err eq 0 then cspice_bodvar, 399, "RADII", radii
         catch, /cancel

Particulars


   None.

Exceptions


   1)  If the requested item is not found, the error
       SPICE(KERNELVARNOTFOUND) is signaled by a routine in the call
       tree of this routine.

   2)  If any of the input arguments, `body' or `item', is undefined,
       an error is signaled by the IDL error handling system.

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

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

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   KERNEL.REQ
   PCK.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.5, 26-OCT-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.

       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.4, 18-MAY-2010 (BVS)

       Index lines now state that this routine is deprecated.

   -Icy Version 1.0.3, 07-JAN-2010 (EDW)

       Edits to header, corrected typo in deprecation text statement.

   -Icy Version 1.0.2, 08-AUG-2008 (EDW)

       Minor edits to header text.

   -Icy Version 1.0.1, 24-OCT-2005 (EDW)

       Added a call example to the -I/O section.

       Included notification that NAIF deprecated this routine.

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

Index_Entries


   DEPRECATED fetch constants for a body from the kernel pool
   DEPRECATED physical constants for a body



Fri Dec 31 18:43:02 2021