Index Page
cspice_lmpool
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_LMPOOL loads the variables contained in a text buffer
   into the kernel pool.

I/O


   Given:

      cvals   strings defining SPICE kernel variable assignments
              that could serve as a SPICE text kernel.

              [n,c1] = size(cvals); char = class(cvals)

                 or

              [1,n] = size(cvals); cell = class(cvals)

   the call:

       cspice_lmpool( cvals)

   inserts the variable assignments defined by 'cvals' into the
   kernel pool subsystem. Once inserted, the user can access the
   variables using the cspice_gcpool, cspice_gipool, or cspice_gdpool
   calls.

   returns:

      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.

      lmpoolNames  = {                   ...
                    'DELTET/DELTA_T_A',  ...
                    'DELTET/K',          ...
                    'DELTET/EB',         ...
                    'DELTET/M',          ...
                    'DELTET/DELTA_AT'    ...
                     };

      %
      % Create a kernel in a text buffer.
      %
      textbuf = {                                             ...
             'DELTET/DELTA_T_A = 32.184',                     ...
             'DELTET/K         = 1.657D-3',                   ...
             'DELTET/EB        = 1.671D-2',                   ...
             'DELTET/M         = ( 6.239996 1.99096871D-7 )', ...
             'DELTET/DELTA_AT  = ( 10, @1972-JAN-1',          ...
             '                     11, @1972-JUL-1',          ...
             '                     12, @1973-JAN-1',          ...
             '                     13, @1974-JAN-1',          ...
             '                     14, @1975-JAN-1',          ...
             '                     15, @1976-JAN-1',          ...
             '                     16, @1977-JAN-1',          ...
             '                     17, @1978-JAN-1',          ...
             '                     18, @1979-JAN-1',          ...
             '                     19, @1980-JAN-1',          ...
             '                     20, @1981-JUL-1',          ...
             '                     21, @1982-JUL-1',          ...
             '                     22, @1983-JUL-1',          ...
             '                     23, @1985-JUL-1',          ...
             '                     24, @1988-JAN-1',          ...
             '                     25, @1990-JAN-1',          ...
             '                     26, @1991-JAN-1',          ...
             '                     27, @1992-JUL-1',          ...
             '                     28, @1993-JUL-1',          ...
             '                     29, @1994-JUL-1',          ...
             '                     30, @1996-JAN-1',          ...
             '                     31, @1997-JUL-1',          ...
             '                     32, @1999-JAN-1 )'         ...
                };

      %
      % Load the kernel data into the kernel pool.
      %
      cspice_lmpool( textbuf )

      %
      % Ensure the loaded data exists in the kernel pool.
      % Query the pool for each expected name, size of the
      % variable with that name, and the type of data
      % for that name.
      %

     [found, n, type] = cspice_dtpool( lmpoolNames );

      for i = 1:numel(lmpoolNames)

         if ( found(i) )

            fprintf( ['Found %s, with %i values assigned' ...
                      ' of data type %s.\n\n'],   ...
                      char(lmpoolNames(i)), n(i), type(i) )

         end

      end

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

   MATLAB outputs:

      Found DELTET/DELTA_T_A, with 1 values assigned of data type N.

      Found DELTET/K, with 1 values assigned of data type N.

      Found DELTET/EB, with 1 values assigned of data type N.

      Found DELTET/M, with 2 values assigned of data type N.

      Found DELTET/DELTA_AT, with 46 values assigned of data type N.

Particulars


   This routine allows you to store a text kernel in an internal
   array of your program and load this array into the kernel pool
   without first storing its contents as a text kernel.

   Kernel pool variable names are restricted to a length of 32
   characters or less.

Required Reading


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

   MICE.REQ
   KERNEL.REQ

Version


   -Mice Version 1.0.2, 13-FEB-2015, EDW (JPL)

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

   -Mice Version 1.0.1, 10-FEB-2010, EDW (JPL)

       Added mention of the length restriction on kernel pool variable
       names.

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

Index_Entries


   Load the kernel pool from an internal text buffer


Wed Apr  5 18:00:33 2017