SpiceBoolean bodfnd_c ( SpiceInt body,
ConstSpiceChar * item )
Determine whether values exist for some item for any body
in the kernel pool.
KERNEL
NAIF_IDS
PCK
CONSTANTS
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
body I ID code of body.
item I Item to find ("RADII", "NUT_AMP_RA", etc.).
The function returns the value SPICETRUE if the item is in the
kernel pool, and is SPICEFALSE if it is not.
body is the ID code of the body for which the item is
requested. Bodies are numbered according to the
standard NAIF numbering scheme.
item is the item to be returned. Together, the body and
item name combine to form a variable name, e.g.,
"BODY599_RADII"
"BODY4_POLE_RA"
The function returns the value SPICETRUE if the item is in the
kernel pool, and is SPICEFALSE if it is not.
None.
Error free.
None.
The CSPICE routines bodvcd_c and bodvrd_c, which return values from
the kernel pool, signal an error if the specified item is not found.
In many cases, this is appropriate. However, sometimes the program
may attempt to recover, by providing default values, prompting for
replacements, and so on.
In the following example, default values are substituted for
bodies for which radii are not found.
#include "SpiceUsr.h"
...
SpiceDouble radii[3];
SpiceInt n;
SpiceInt target;
...
if ( bodfnd_c ( target, "RADII" ) )
{
bodvcd_c ( target, "AXES", 3, &n, radii );
}
else
{
vpack_c ( 100.0, 100.0, 100.0, radii );
}
None.
None.
N.J. Bachman (JPL)
H.A. Neilan (JPL)
W.L. Taber (JPL)
I.M. Underwood (JPL)
E.D. Wright (JPL)
-CSPICE Version 2.0.2, 24-OCT-2005 (NJB)
Header updates: reference to bodvar_c was replaced with
reference to bodvcd_c. The string "AXES" and variable `axes'
were replaced with the string "RADII" and variable `radii'
throughout the header. A few other minor header edits were
made.
-CSPICE Version 2.0.1, 08-FEB-1998 (EDW)
Corrected and clarified header entries.
-CSPICE Version 2.0.0, 06-JAN-1998 (NJB)
Input argument item was changed to type ConstSpiceChar *.
References to C2F_CreateStr_Sig were removed; code was
cleaned up accordingly. String checks are now done using
the macro CHKFSTR_VAL.
-CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
find constants for a body in the kernel pool
Link to routine bodfnd_c source file bodfnd_c.c
|