Table of contents
CSPICE_BODFND returns a boolean to indicate whether a designated
body data item exists in the kernel pool.
Given:
body the ID code of the body for which the item is requested.
help, body
LONG = Scalar
item the item to be returned.
help, item
STRING = Scalar
Together, the body and item name combine to form a variable
name, e.g.,
'BODY599_RADII'
'BODY4_POLE_RA'
the call:
bodfnd = cspice_bodfnd( body, item )
returns:
bodfnd True if `item' is in the kernel pool, and False if it is not.
help, bodfnd
BOOLEAN = Scalar
None.
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.
1) Test if the Earth's radii values exist in the kernel pool.
Use the PCK kernel below to load the required triaxial
ellipsoidal shape model for the Earth.
pck00008.tpc
Example code begins here.
PRO bodfnd_ex1
;;
;; Load a PCK file.
;;
cspice_furnsh, 'pck00008.tpc'
;;
;; Test if Earth's radii values exist in the
;; kernel pool.
;;
;; The procedure searches for the kernel variable
;; BODY399_RADII.
;;
found = cspice_bodfnd( 399, "RADII" )
;;
;; If found, retrieve the values.
;;
if (found) then begin
cspice_bodvcd, 399, 'RADII', 5, radii
print, '399 RADII: ', radii
endif
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
399 RADII: 6378.1400 6378.1400 6356.7500
cspice_bodvcd, which returns values from the kernel pool, causes an
error to be signaled whenever 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.
1) If any of the input arguments, `body' or `item', is undefined,
an error is signaled by the IDL error handling system.
2) If any of the input arguments, `body' or `item', is not of the
expected type, or it does not have the expected dimensions and
size, an error is signaled by the Icy interface.
None.
None.
ICY.REQ
KERNEL.REQ
PCK.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 10-AUG-2021 (JDR)
Edited the header to comply with NAIF standard. Added example's
problem statement and reference to required PCK file.
Added -Parameters, -Particulars, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
Added arguments' type and size information in the -I/O section.
-Icy Version 1.0.1, 10-NOV-2005 (EDW)
Minor edits to -Examples section. Replaced cspice_bodvar
call (deprecated) with cspice_bodvcd.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
find constants for a body in the kernel pool
|