CSPICE_PIPOOL provides toolkit programmers a method for
programmatically inserting integer data into the kernel pool.
For important details concerning this module's function, please refer to
the CSPICE routine pipool_c.
name the scalar string name of the kernel pool variable to
associate with the values supplied in the array 'ivals'.
'name' is restricted to a length of 32 characters or less.
ivals an array of integers to load into the kernel pool
sub-system with the assigned variable name 'name'.
cspice_pipool, name, ivals
Inserts the variable 'name' into the kernel pool with values as
defined in 'ivals'.
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.
;; Define array sizes and the kernel variable name.
PIPOOL_DIM = 9
PIPOOL_VAR = 'pipool_array'
NUM_VALS = 50
;; Create an array of longs, 0 to (POOL_DIM-1)
pipool_arr = lindgen( PIPOOL_DIM )
;; Insert the data assigned to 'PIPOOL_VAR' into the kernel pool.
cspice_pipool, PIPOOL_VAR, pipool_arr
;; Retrieve the values associated to 'PIPOOL_VAR' into the
;; variable ivals. Retrieve all values, so set
;; 'START' to zero.
START = 0
cspice_gipool, PIPOOL_VAR, START, NUM_VALS, ivals, found
;; Check we found the expected variable, and ensure
;; the expected values.
if ( found ) then begin
print, 'Found array variable ' + PIPOOL_VAR + ' with entries:'
for i = 0, (n_elements(ivals)-1) do begin
endif else begin
print, 'Variable ' + PIPOOL_VAR + ' not found in kernel pool.'
Found array variable pipool_array with entries:
Kernel pool variable names are restricted to a length of 32
characters or less.
-Icy Version 1.0.1, 10-FEB-2010, EDW (JPL)
Added mention of the length restriction on the kernel pool variable
-Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)
Set the value of a numeric kernel pool variable