| pcpool |
|
Table of contents
Procedure
PCPOOL ( Put character strings into the kernel pool )
ENTRY PCPOOL ( NAME, N, CVALS )
Abstract
Provide toolkit programmers a method for programmatically
inserting character data into the kernel pool.
Required_Reading
None.
Keywords
POOL
Declarations
CHARACTER*(*) NAME
INTEGER N
CHARACTER*(*) CVALS ( * )
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
NAME I The kernel pool name to associate with CVALS.
N I The number of values to insert.
CVALS I An array of strings to insert into the kernel pool.
Detailed_Input
NAME is the name of the kernel pool variable to associate
with the values supplied in the array CVALS
N is the number of values to insert into the kernel pool.
CVALS is an array of strings to insert into the kernel
pool.
Detailed_Output
None.
Parameters
None.
Exceptions
1) If NAME is already present in the kernel pool and there
is sufficient room to hold all values supplied in CVALS,
the old values associated with NAME will be overwritten.
2) If there is not sufficient room to insert a new variable into
the kernel pool and NAME is not already present in the kernel
pool, an error is signaled by a routine in the call tree of
this routine.
3) If there is not sufficient room to insert the values
associated with NAME, the error SPICE(NOMOREROOM) is signaled.
4) If the kernel pool variable name length exceeds its maximum
allowed length (see Kernel Required Reading, kernel.req), the
error SPICE(BADVARNAME) is signaled.
Files
None.
Particulars
This entry point provides a programmatic interface for inserting
character data into the SPICE kernel pool without reading an
external file.
Examples
Suppose that you wish to supply default values for a program
so that it may function even in the absence of the appropriate
text kernels. You can use the entry points PCPOOL, PDPOOL
and PIPOOL to initialize the kernel pool with suitable
values at program initialization. The example below shows
how you might set up various kernel pool variables that might
be required by a program.
Set up the relationship between the EARTH_BODYFIXED frame
and the IAU_EARTH frame.
CALL IDENT ( MATRIX )
CALL PCPOOL ( 'TKFRAME_EARTH_FIXED_SPEC', 1, 'MATRIX' )
CALL PCPOOL ( 'TKFRAME_EARTH_FIXED_RELATIVE', 1, 'IAU_EARTH' )
CALL PDPOOL ( 'TKFRAME_EARTH_FIXED_MATRIX', 9, MATRIX )
Load the IAU model for the earth's rotation and shape.
RA ( 1 ) = 0.0D0
RA ( 2 ) = -0.641D0
RA ( 3 ) = 0.0D0
DEC( 1 ) = 90.0D0
DEC( 2 ) = -0.557D0
DEC( 3 ) = 0.0D0
PM ( 1 ) = 190.16D0
PM ( 2 ) = 360.9856235D0
PM ( 3 ) = 0.0D0
R ( 1 ) = 6378.140D0
R ( 2 ) = 6378.140D0
R ( 3 ) = 6356.75D0
CALL PDPOOL ( 'BODY399_POLE_RA', 3, RA )
CALL PDPOOL ( 'BODY399_POLE_DEC', 3, DEC )
CALL PDPOOL ( 'BODY399_PM', 3, PM )
CALL PDPOOL ( 'BODY399_RADII', 3, R )
Set up a preliminary set of leapsecond values.
CALL PDPOOL ( 'DELTET/DELTA_T_A/',1, 32.184D0 )
CALL PDPOOL ( 'DELTET/K', 1, 1.657D-3 )
CALL PDPOOL ( 'DELTET/EB', 1, 1.671D-2 )
VALUES(1) = 6.23999600D0
VALUES(2) = 1.99096871D-7
CALL PDPOOL ( 'DELTET/M', 2, VALUES )
VALUES( 1 ) = 10
VALUES( 3 ) = 11
VALUES( 5 ) = 12
VALUES( 7 ) = 13
VALUES( 9 ) = 14
VALUES( 11 ) = 15
VALUES( 13 ) = 16
VALUES( 15 ) = 17
VALUES( 17 ) = 18
VALUES( 19 ) = 19
VALUES( 21 ) = 20
VALUES( 23 ) = 21
VALUES( 25 ) = 22
VALUES( 27 ) = 23
VALUES( 29 ) = 24
VALUES( 31 ) = 25
VALUES( 33 ) = 26
VALUES( 35 ) = 27
VALUES( 37 ) = 28
VALUES( 39 ) = 29
VALUES( 41 ) = 30
VALUES( 43 ) = 31
CALL TPARSE ( '1972-JAN-1', VALUES(2), ERROR )
CALL TPARSE ( '1972-JUL-1', VALUES(4), ERROR )
CALL TPARSE ( '1973-JAN-1', VALUES(6), ERROR )
CALL TPARSE ( '1974-JAN-1', VALUES(8), ERROR )
CALL TPARSE ( '1975-JAN-1', VALUES(10), ERROR )
CALL TPARSE ( '1976-JAN-1', VALUES(12), ERROR )
CALL TPARSE ( '1977-JAN-1', VALUES(14), ERROR )
CALL TPARSE ( '1978-JAN-1', VALUES(16), ERROR )
CALL TPARSE ( '1979-JAN-1', VALUES(18), ERROR )
CALL TPARSE ( '1980-JAN-1', VALUES(20), ERROR )
CALL TPARSE ( '1981-JUL-1', VALUES(22), ERROR )
CALL TPARSE ( '1982-JUL-1', VALUES(24), ERROR )
CALL TPARSE ( '1983-JUL-1', VALUES(26), ERROR )
CALL TPARSE ( '1985-JUL-1', VALUES(28), ERROR )
CALL TPARSE ( '1988-JAN-1', VALUES(30), ERROR )
CALL TPARSE ( '1990-JAN-1', VALUES(32), ERROR )
CALL TPARSE ( '1991-JAN-1', VALUES(34), ERROR )
CALL TPARSE ( '1992-JUL-1', VALUES(36), ERROR )
CALL TPARSE ( '1993-JUL-1', VALUES(38), ERROR )
CALL TPARSE ( '1994-JUL-1', VALUES(40), ERROR )
CALL TPARSE ( '1996-JAN-1', VALUES(42), ERROR )
CALL TPARSE ( '1997-JUL-1', VALUES(44), ERROR )
CALL PDPOOL ( 'DELTET/DELTA_AT', 44, VALUES )
Restrictions
None.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
W.L. Taber (JPL)
E.D. Wright (JPL)
Version
SPICELIB Version 9.1.1, 27-AUG-2021 (JDR)
Edited the header to comply with NAIF standard.
SPICELIB Version 9.1.0, 17-JAN-2014 (BVS) (NJB)
Updated to increment POOL state counter.
Updated $Index_Entries section.
SPICELIB Version 9.0.0, 24-MAY-2010 (EDW)
Added an error check on the length of the kernel pool variable
name argument to enforce the variable name length does not
exceed MAXLEN.
SPICELIB Version 8.1.0, 19-MAR-2009 (NJB)
Watcher update code was re-written for compatibility
with new watcher system implementation.
SPICELIB Version 8.0.0, 04-JUN-1999 (WLT)
Added the entry points PCPOOL, PDPOOL and PIPOOL to allow
direct insertion of data into the kernel pool without having
to read an external file.
Added the interface LMPOOL that allows SPICE
programs to load text kernels directly from memory instead
of requiring a text file.
Added the entry point SZPOOL to return kernel pool definition
parameters.
Added the entry point DVPOOL to allow the removal of a variable
from the kernel pool.
Added the entry point GNPOOL to allow users to determine
variables that are present in the kernel pool
|
Fri Dec 31 18:36:38 2021