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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_SPKUDS unpacks/extracts the contents of an SPK segment descriptor.

   For important details concerning this module's function, please refer to
   the CSPICE routine spkuds_c.

I/O


   Given:

      None.

   the call:

      cspice_spkuds, body , center, frame, type, $
                     first, last  , beg  , final

   returns:

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

      center     is the center of motion for body.

      frame      is the SPICE integer code for the frame to which states
                 for the body are be referenced.

      type       is the type of SPK segment.

      first      is the first epoch for which the segment has
                 ephemeris data.

      last       is the last epoch for which the segment has
                 ephemeris data.

      begin      is the starting address of the data associated
                 with this descriptor.

      end        is the last address of the data associated with
                 this descriptor.

Examples


   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.

   Read the segment descriptor for each segment in an SPK. Output
   the SPK ID for the body and center for the segments.

      PRO spkuds_t, file

         ;;
         ;; Open the SPK file for read.
         ;;
         cspice_dafopr, file, handle

         ;;
         ;; Begin a forward search.
         ;;
         cspice_dafbfs, handle

         ;;
         ;; Find next array (segment) return true if successful.
         ;;
         cspice_daffna, found

         ;;
         ;; Loop while found is TRUE
         ;;
         WHILE ( found ) do begin

            ;;
            ;; Get the segment descxriptor for an SPK file (2,6)
            ;;
            cspice_dafgs, 2, 6, dc, ic

            ;;
            ;; Unpack the segment identifier.
            ;;
            cspice_spkuds, body , center, frame, type, $
                           first, last  , beg  , final

            ;;
            ;; Output the results.
            ;;
            cspice_bodc2n, body  , bod_name, found
            cspice_bodc2n, center, cent_name, found

            print, 'Body   ', body  , ' ' + bod_name
            print, 'Center ', center, ' ' + cent_name

            ;;
            ;; Determine if another segment exists.
            ;;
            cspice_daffna, found

         ENDWHILE

         ;;
         ;; Don't forget to close.
         ;;
         cspice_spkcls, handle

      END

   IDL outputs:

      IDL> spkuds_t, 'de430.bsp'
      Body              1 MERCURY BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              2 VENUS BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              3 EARTH BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              4 MARS BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              5 JUPITER BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              6 SATURN BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              7 URANUS BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              8 NEPTUNE BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body              9 PLUTO BARYCENTER
      Center            0 SOLAR SYSTEM BARYCENTER
      Body             10 SUN
      Center            0 SOLAR SYSTEM BARYCENTER
      Body            301 MOON
      Center            3 EARTH BARYCENTER
      Body            399 EARTH
      Center            3 EARTH BARYCENTER
      Body            199 MERCURY
      Center            1 MERCURY BARYCENTER
      Body            299 VENUS
      Center            2 VENUS BARYCENTER

Particulars


   This routine extracts the contents of an SPK segment
   descriptor. It serves as a macro for expanding the SPK
   segment descriptor.

Required Reading


   ICY.REQ

Version


   -Icy Version 1.0.0, DD-MM-YYY, NNN (JPL)

Index_Entries


   unpack SPK segment descriptor



Wed Apr  5 17:58:03 2017