Table of contents
Deprecated: This routine has been superseded by the Icy routines
cspice_bodvcd and cspice_bodvrd. This routine is supported only for
purposes of backward compatibility.
CSPICE_BODVAR returns a double precision vector containing the values for
some designated body data stored in the kernel pool.
Given:
body the scalar integer NAIF ID of the body for which to return the
value(s) of `item'.
help, body
LONG = Scalar
item the scalar string naming the property of `body' to return, e.g.
RADII, GM, POLE_RA.
help, item
STRING = Scalar
Together, the body and item name combine to form a variable
name, e.g.,
'BODY599_RADII'
'BODY401_POLE_RA'
Note that `item' *is* case-sensitive. This attribute
is inherited from the case-sensitivity of kernel
variable names.
the call:
cspice_bodvar, body, item, values
returns:
values an array of the double precision values associated with the
variable.
help, values
DOUBLE = Array[N]
Note: `values' returns a vector even when `item' refers to a
scalar, i.e. a scalar returns in values[0].
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) Retrieve the Earth's radii values from 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 bodvar_ex1
;;
;; Local constants.
;;
BODYID = 399
;;
;; 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( BODYID, 'RADII' )
;;
;; If found, retrieve the values.
;;
if ( found ) then begin
cspice_bodvar, BODYID, 'RADII', radii
print, format='(I3,A,3F11.3)', BODYID, ' RADII:', radii
endif else begin
print, 'No RADII data found for object ', BODYID
endelse
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
399 RADII: 6378.140 6378.140 6356.750
Note: cspice_bodvar signals an error if the kernel pool
lacks the necessary data. An alternate implementation for this
example would involve a catch handler:
catch, err
if err eq 0 then cspice_bodvar, 399, "RADII", radii
catch, /cancel
None.
1) If the requested item is not found, the error
SPICE(KERNELVARNOTFOUND) is signaled by a routine in the call
tree of this routine.
2) If any of the input arguments, `body' or `item', is undefined,
an error is signaled by the IDL error handling system.
3) 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.
4) If the output argument `values' is not a named variable, an
error is signaled by the Icy interface.
None.
None.
ICY.REQ
KERNEL.REQ
PCK.REQ
None.
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Icy Version 1.0.5, 26-OCT-2021 (JDR)
Edited the header to comply with NAIF standard. Added complete code
example.
Added -Parameters, -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.4, 18-MAY-2010 (BVS)
Index lines now state that this routine is deprecated.
-Icy Version 1.0.3, 07-JAN-2010 (EDW)
Edits to header, corrected typo in deprecation text statement.
-Icy Version 1.0.2, 08-AUG-2008 (EDW)
Minor edits to header text.
-Icy Version 1.0.1, 24-OCT-2005 (EDW)
Added a call example to the -I/O section.
Included notification that NAIF deprecated this routine.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
DEPRECATED fetch constants for a body from the kernel pool
DEPRECATED physical constants for a body
|