[Spice_discussion] RE: Cookbook for CSPICE? (Matthew M. Copeland)

Matthew M. Copeland matthewc at sunflower.com
Fri May 21 09:09:29 PDT 2004

	Thanks for the pointers.  In the source directory, I found what I was
looking for in the subpt program.  I've modified it just a little to
accept a kernels text file that lists the files to include, but I'm
getting an error that I can't quite figure out how to solve, and I'm
hoping that someone might be able to give me a hand.

Here is the output:
             Welcome to SUBPT
This program demonstrates the use of CSPICE in computing
the apparent sub-observer point on a target body.   The
computations use light time corrections.
Enter the location of the kernels.txt file:
Working ... Please wait.
Enter the name for the observing body: titan
Enter the name for a target body: cassini
Enter the number of points to calculate: 100
Enter the beginning UTC time: 2004-300T15:00
Enter the ending UTC time: 2004-300T16:00
Planetocentric coordinates for the nearest point
on the target body to the observing body (deg).
Target body: cassini          Observing body: titan
       UTC Time            Lat         Lon
Toolkit version: N0057
SPICE(KERNELVARNOTFOUND) -- The Variable Was not Found in the Kernel
The variable BODY-82_RADII could not be found in the kernel pool.
A traceback follows.  The name of the highest level module is first.
subpt_c --> SUBPT --> BODVAR
Oh, by the way:  The SPICELIB error handling actions are
can choose whether the Toolkit aborts or continues when errors occur,
error messages to output, and where to send the output.  Please read the
"Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRPRT.

It works just fine if I do say Saturn and Titan, but as soon as I throw
Cassini into the mix, it breaks out with the above error message.  So, I
went into the kernels directory for Cassini that I have downloaded, and
I did a grep for BODY-82_RADII.  No luck.  Updated all my files off the
ftp site, and still not there.  This leads me to believe that maybe I
don't understand something about how the library handles things, or I'm
just in general missing something.  I've been using the kernel.txt file
that I had from the code that I was working, and it is listed below.  If
anyone has any pointers, please let me know.  It would be appreciated.

PATH_VALUES  = ( '/home/spice/kernels/cassini',
                 '/home/spice/kernels/generic' )
                 'GEN' )
KERNELS_TO_LOAD = ( '$GEN/lsk/naif0007.tls',

Matthew M. Copeland

On Sat, 2004-05-15 at 14:38, Samuel H. Dupree, Jr. wrote:
> Have you looked at "Program_C" or the "Program_Fortran" documents under 
> the tutorial directories
> for either C or Fortran respectively in either pdf or ppt formats? I 
> believe these may have what you are
> looking for.
> Sam Dupree.

More information about the Spice_discussion mailing list