Index Page bodfnd_c

A B C D E F G H I J K L M N O P Q R S T U V W X

Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

       SpiceBoolean bodfnd_c ( SpiceInt           body,
                               ConstSpiceChar   * item )

#### Abstract

       Determine whether values exist for some item for any body
       in the kernel pool.

#### Required_Reading

       KERNEL
       NAIF_IDS
       PCK

#### Keywords

       CONSTANTS

#### Brief_I/O

       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.

#### Detailed_Input

       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"

#### Detailed_Output

       The function returns the value SPICETRUE if the item is in the
       kernel pool, and is SPICEFALSE if it is not.

#### Parameters

       None.

#### Exceptions

       Error free.

#### Files

       None.

#### Particulars

       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.

#### Examples

       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 );
          }

#### Restrictions

       None.

#### Literature_References

       None.

#### Author_and_Institution

       N.J. Bachman    (JPL)
       H.A. Neilan     (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)
       E.D. Wright     (JPL)

#### Version

       -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)

#### Index_Entries

       find constants for a body in the kernel pool

#### Link to routine bodfnd_c source file bodfnd_c.c

    Wed Apr  5 17:54:28 2017