Index Page
cspice_bodvcd
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_BODVCD returns from the kernel pool the double precision values
   of an item associated with a body, where the body is specified by an
   integer ID code.

I/O


   Given:

      bodyid   SPICE ID code for a body of interest. For example, if the
               body is the earth, the code is 399.

               [1,1] = size(bodyid); int32 = class(bodyid)

      item     the item name to return.

               [1,c1] = size(item); char = class(item)

                  or

               [1,1] = size(item); cell = class(item)

               Together, the NAIF ID code of the body and the item name
               combine to form a kernel variable name, e.g.,

                    'BODY599_RADII'
                    'BODY401_POLE_RA'

               The values associated with the kernel variable having
               the name constructed as shown are sought.  Below
               we'll take the shortcut of calling this kernel variable
               the "requested kernel variable."

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

      maxn     the maximum number of kernel pool values to returns.

               [1,1] = size(maxn); int32 = class(maxn)

   the call:

      values = cspice_bodvcd(bodyid, item, maxn)

   returns:

     values   an array of at most 'maxn' values associated with the
              requested kernel variable.

              [1,n] = size(values); double = class(values)
              with n <= 'maxn'.

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.

      %
      %  Load a set of kernels: an SPK file, a PCK
      %  file and a leapseconds file. Use a meta
      %  kernel for convenience.
      %
      cspice_furnsh( 'standard.tm' )

      %
      % When the kernel variable
      %
      %    BODY399_RADII
      %
      % is present in the kernel pool---normally because a PCK
      % defining this variable has been loaded (as is the case
      % here)---the call
      %
      values1 = cspice_bodvcd( 399, 'RADII', 3)

      %
      % returns the dimension and values associated with the
      % variable "BODY399_RADII".
      %

      %
      % The 'item' variable possesses case sensitivity.
      %
      try

         %
         % A call with improper case in 'item' will fail.
         %
         values2 = cspice_bodvcd( 399, 'radii', 3)

      catch

         %
         % Catch the error, return the error string to the user.
         %
         disp( 'Expected error signaled:' )
         disp( ' ' )
         disp( lasterr )

      end

      %
      %  It's always good form to unload kernels after use,
      %  particularly in MATLAB due to data persistence.
      %
      cspice_kclear

   MATLAB outputs:

      values1 =

         1.0e+03 *

         6.37814000000000
         6.37814000000000
         6.35675000000000

      Expected error signaled:

      SPICE(KERNELVARNOTFOUND): [bodvrd_c->BODVRD] The variable
      BODY399_radii could not be found in the kernel pool.

Particulars


   None.

Required Reading


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

   MICE.REQ
   KERNEL.REQ
   NAIF_IDS.REQ

Version


   -Mice Version 1.1.1, 29-OCT-2014, EDW (JPL)

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

   -Mice Version 1.1.0, 23-FEB-2009, EDW (JPL)

      Added zzmice_str call on input 'item' to convert string cells to
      character arrays if 'item' has type string cells. Added proper
      markers for usage string variable types.

   -Mice Version 1.0.0, 22-NOV-2005, EDW (JPL)

Index_Entries


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


Wed Apr  5 18:00:30 2017