Index Page spkpds_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

       void spkpds_c ( SpiceInt           body,
                       SpiceInt           center,
                       ConstSpiceChar   * frame,
                       SpiceInt           type,
                       SpiceDouble        first,
                       SpiceDouble        last,
                       SpiceDouble        descr[5] )

#### Abstract

       Perform routine error checks and if all check pass, pack the
       descriptor for an SPK segment

#### Required_Reading

       SPK

#### Keywords

       SPK

#### Brief_I/O

       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       body       I   The NAIF ID code for the body of the segment.
       center     I   The center of motion for body.
       frame      I   The frame for this segment.
       type       I   The type of SPK segment to create.
       first      I   The first epoch for which the segment is valid.
       last       I   The last  epoch for which the segment is valid.
       descr      O   An SPK segment descriptor.

#### Detailed_Input

       body       is the NAIF ID code for the body of the segment.

       center     is the center of motion for BODY.

       frame      is a string that names the frame to which states for
                  the body shall be referenced.

       type       is the type of SPK segment to create.

       first      is the first epoch for which the segment will have
                  ephemeris data.

       last       is the last epoch for which the segment will have
                  ephemeris data.

#### Detailed_Output

       descr       is a valid SPK segment descriptor to use
                   when creating a DAF segment for this body.

#### Parameters

       None.

#### Exceptions

       1) The error SPICE(BARYCENTEREPHEM) is signaled if the
          value of body is 0.

       2) The error SPICE(BODYANDCENTERSAME) is signaled if the
          values of body and center are the same.

       3) The error SPICE(INVALIDREFFRAME) is signaled if frame
          is not one of the known SPICE reference frames.

       4) The error SPICE(BADDESCRTIMES) is signaled if first
          is greater than or equal to LAST

       5) The error SPICE(UNKNOWNSPKTYPE) is signaled if the
          value of type is outside the range 1 to 1000 (inclusive).
          This does not ensure that the type is a legitimate SPK
          segment type, but it is a simple check that helps avoid
          problems that arise from uninitialized values or improperly
          ordered calling arguments.

#### Files

       None.

#### Particulars

       This is a utility routine for validating and creating
       the descriptor for an SPK segment.  It is intended for
       use only by routines that create SPK segments.

#### Examples

       Suppose that you wish to create an SPK segment of type X
       and that you are writing a routine to handle the details
       of the segment creation.  This routine can be used to
       ensure that the descriptor needed for the segment is
       properly formed and that the information in that descriptor
       is reasonable.

       Having collected the needed information you can create the
       descriptor and then begin a new segment as shown below.

          #include "SpiceUsr.h"
               .
               .
               .
          spkpds_c ( body,   center, frame, type, first, last, descr );
          dafbna_c ( handle, descr,  segid );

#### Restrictions

       None.

#### Literature_References

       None.

#### Author_and_Institution

       N.J. Bachman      (JPL)
       K.R. Gehringer    (JPL)
       W.L. Taber        (JPL)

#### Version

       -CSPICE Version 1.0.0, 19-JUL-1999 (NJB) (KRG) (WLT)

#### Index_Entries

       Validate and pack an SPK segment descriptor

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

    Wed Apr  5 17:54:44 2017