File: FIDO.metaker Created: 29-JUL-2000 (NJB) This is an example meta-kernel intended to support experimental use of the SPICE Toolkit in the PC/VxWorks environment. This file adheres to the SPICE text kernel format. The file starts out with some (in this case long-winded) comments. The first \begindata token by itself on a line indicates the start of the data area. The data area consists of "keyword=value" assignments. New comment blocks are introduced by the \begintext token alone on a line. The file should contain no non-printing characters and should have no lines over 80 characters in length. Programs linked to CSPICE can load SPICE kernels by listing in this file the file names of the kernels themselves. The ANSI C or C++ code used to load this file could be the following: /* Include CSPICE definitions prior to any references to CSPICE code. The SpiceUsr.h include file referenced below uses the construct #ifdef __cplusplus extern "C" { #endif . . . #ifdef __cplusplus } #endif to suppress name-mangling in C++ code. The C code shown below compiles and links under g++ and should do so under other C++ compilers. If your compiler does not automatically generate the -D__cplusplus flag, this flag would have to be added to your list of compiler options when building code that calls CSPICE. */ #include "SpiceUsr.h" . . . /* Define a symbol for the meta-kernel name. The SPICE system does not require any particular naming convention to be followed, other than that the name should contain only printing, non-blank characters and be a valid name on the host file system. (A symbol is used to centralize the string containing the literal file name.) */ #define METAKER "FIDO.metaker" . . . /* Load the meta-kernel. */ furnsh_c ( METAKER ); . . . [do real work] The code fragment shown above typically would be placed with your program's intialization code: the desired kernels would be loaded once, before any attempts were made to use data from the kernels. For details on metakernels and the related SPICE kernel pool API,see the KERNEL "Required Reading" as well as the "header" comments in the source files furnsh_c.c kinfo_c.c kdata_c.c ktotal_c.c uload_c.c The kernels referenced below are sample SPK (ephemeris data), PCK (orientation and shape models), LSK (leapseconds and constants needed for UTC-ET conversion), and FK (frames) kernel files. For further information, see the SPK, PCK, TIME, and FRAMES Required Reading. The example below uses a "meta-kernel symbol" to reference the fully-qualified path names of the kernel files. This feature is not strictly necessary but allows your program to access kernels that do not reside in your current working directory. All of the above lines are comments and ignored by furnsh_c. Data assignments follow. Note that the string values on the right hand side of the PATH_VALUES assignment should be replaced with the actual, full path names of the kernels. In order, the files referenced below are PCK, LSK, FK, and SPK kernels. \begindata PATH_VALUES = ( '/ftp/pub/naif/FIDO/kernels/pck', '/ftp/pub/naif/FIDO/kernels/lsk', '/ftp/pub/naif/FIDO/kernels/fk', '/ftp/pub/naif/FIDO/kernels/spk' ) PATH_SYMBOLS = ( 'PCK', 'LSK', 'FK', 'SPK' ) KERNELS_TO_LOAD = ( '$PCK/pck00007.tpc', '$LSK/naif0007.tls', '$FK/fido.tf', '$SPK/fido.bsp' ) \begintext The final \begintext token above is not required. It makes it possible to simply concatenate other SPICE text kernels to this one (although one normally wouldn't do that with a metakernel.) It also can be useful to see a comment indicating the end of the kernel, so users can visually check that the kernel has not been truncated. (End of metakernel)