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_gdpool

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


Abstract


   CSPICE_GDPOOL returns the value of a double precision kernel
   variable (scalar or array) from the kernel pool.

I/O


   Given:

      name     the scalar string name of a pool variable associated to double
               precision values.

               help, name
                  STRING = Scalar

      start    a scalar integer value for the index indicating the first
               component of the data vector assigned to `name' for return
               (index 0 for all elements).

               help, start
                  LONG = Scalar

      room     the scalar integer specifying the maximum number of components
               that can return for `name'.

               help, room
                  LONG = Scalar

   the call:

      cspice_gdpool, name, start, room, values, found

   returns:

      values   a double precision array of the values copied from the kernel
               pool data assigned to `name' beginning at index `start'.

               help, values
                  DOUBLE = Array[N]

      found    a scalar boolean that flags whether `name' exists in the kernel
               pool and has double precision type.

               help, found
                  BOOLEAN = Scalar

               `values' has a size of `room' or less.

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) The following code example demonstrates how the data stored
      in a kernel pool variable can be retrieved in pieces.

      Use the kernel shown below to load the kernel pool with the
      variables used within the example.


         KPL/MK

         File name: gdpool_ex1.tm

         This kernel is intended to support operation of SPICE
         example programs.

         \begindata

            CTEST_VAL = ('LARRY', 'MOE', 'CURLY' )

            ITEST_VAL = ( 3141, 186, 282 )

            DTEST_VAL = ( 3.1415, 186. , 282.397 )

         \begintext

         End of meta-kernel


      Example code begins here.


      PRO gdpool_ex1

         ;;
         ;; Load the test data.
         ;;
         cspice_furnsh, 'gdpool_ex1.tm'

         ;;
         ;; Retrieve up-to 'ROOM' character entries for
         ;; kernel pool variable named 'DTEST_VAL' to
         ;; the array named 'cvals'. The first index to return,
         ;; 'START', has value 0 (this returns all components).
         ;;
         VAR    = 'DTEST_VAL'
         ROOM   = 25
         START  = 0

         cspice_gdpool, VAR, START, ROOM, values, found

         if (found) then begin

            print, 'Found ' + VAR + ' in the kernel pool'

            for i=0, n_elements(values)-1 do begin
               print, '   Element ' + string(i) + ' of ' + VAR + $
                      ': ', values[i]
            endfor

         endif else begin
            print, 'Failed to find  ' + VAR + ' in the kernel pool'
         endelse

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

      END


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


      Found DTEST_VAL in the kernel pool
         Element        0 of DTEST_VAL:        3.1415000
         Element        1 of DTEST_VAL:        186.00000
         Element        2 of DTEST_VAL:        282.39700


Particulars


   This routine provides the user interface to retrieving
   numeric data stored in the kernel pool. This interface
   allows you to retrieve the data associated with a variable
   in multiple accesses. Under some circumstances this alleviates
   the problem of having to know in advance the maximum amount
   of space needed to accommodate all kernel variables.

   However, this method of access does come with a price. It is
   always more efficient to retrieve all of the data associated
   with a kernel pool data in one call than it is to retrieve
   it in sections.

   See also the routines cspice_gipool and cspice_gcpool.

Exceptions


   1)  If the value of `room' is less than one, the error
       SPICE(BADARRAYSIZE) is signaled by a routine in the call tree
       of this routine.

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

   3)  If any of the input arguments, `name', `start' or `room', 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 any of the output arguments, `values' or `found', is not a
       named variable, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   KERNEL.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.3, 25-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       example's meta-kernel and problem statement. Modified example
       to use "cspice_kclear".

       Added -Parameters, -Particulars, -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.2, 26-AUG-2016 (EDW) (JDR)

       Edit to example code. Typos in kernel names; "pool_t.ker"
       and "pool_t.pro" rather than "pool_t.tm."

   -Icy Version 1.0.1, 03-JAN-2007 (EDW)

       Edit to -I/O section for 'room' and 'start' to improve clarity.

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

Index_Entries


   RETURN the d.p. value of a pooled kernel variable
   RETURN the numeric value of a pooled kernel variable



Fri Dec 31 18:43:04 2021