Index Page
cspice_dafus
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_DAFUS unpacks an array summary into its double precision and
   integer components.

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

I/O


   Given:

      sum         a double precision array containing the DAF array summary.
                  This identifies the contents and location of a single array
                  within a DAF.

      nd          the scalar integer number of double precision components in
                  the summary.

      ni          the scalar integer number of integer components in the
                  summary.

   the call:

      cspice_dafus, sum, nd, ni, dc, ic

   returns:

      dc          a double precision nd-array containing the double precision
                  components of the summary.

      ic          an integer ni-array containing the integer components of
                  the summary.

Examples


   The numerical results shown for these examples may differ across
   platforms. The results depend on the SPICE kernels used as
   input, the compiler and supporting libraries, and the machine
   specific arithmetic implementation.

      Use the meta-kernel shown below to load the required SPICE
      kernels.

         KPL/MK

         File name: standard.tm

         This meta-kernel is intended to support operation of SPICE
         example programs. The kernels shown here should not be
         assumed to contain adequate or correct versions of data
         required by SPICE-based user applications.

         In order for an application to use this meta-kernel, the
         kernels referenced here must be present in the user's
         current working directory.

         The names and contents of the kernels referenced
         by this meta-kernel are as follows:

            File name                     Contents
            ---------                     --------
            de421.bsp                     Planetary ephemeris
            pck00010.tpc                  Planet orientation and
                                          radii
            naif0010.tls                  Leapseconds

         \begindata

            KERNELS_TO_LOAD = ( 'de421.bsp',
                                'pck00010.tpc',
                                'naif0010.tls'  )

         \begintext

   Example:

      ;;
      ;; Local constants
      ;;
      META   =  'standard.tm'
      ND     =  2
      NI     =  6

      ;;
      ;; Load a meta-kernel that specifies a planetary SPK file
      ;; and leapseconds kernel. The contents of this meta-kernel
      ;; are displayed above.
      ;;
      cspice_furnsh, META

      ;;
      ;; Get the NAIF ID code for the Pluto system barycenter.
      ;; This is a built-in ID code, so something's seriously
      ;; wrong if we can't find the code.
      ;;
      cspice_bodn2c, 'PLUTO BARYCENTER', idcode, found

      if ( ~found ) then begin
         cspice_kclear
         print, 'SPICE(BUG)'
         return
      endif

      ;;
      ;; Pick a request time; convert to seconds past J2000 TDB.
      ;;
      reqtim = '2011 FEB 18 UTC'

      cspice_str2et, reqtim, et

      ;;
      ;; Find a loaded segment for the specified body and time.
      ;;

      cspice_spksfs, idcode, et, handle, descr, segid, found

      if ( ~found ) then begin
         cspice_kclear
         print, 'Body : ', idcode
         print, 'Time : ', et
         print, 'No descriptor found for the body at time.'
         return
      endif else begin

         ;;
         ;; Display the DAF file handle.
         ;;
         print, format='(A, I10)',   'DAF handle:    ', handle

         ;;
         ;; Display the segment ID.
         ;;
         ;;
         ;; Unpack the descriptor. Display the contents.
         ;;
         cspice_dafus, descr, ND, NI, dc, ic

         print, format='(A, A)',      'Segment ID:       ',segid
         print, format='(A, I10)',    'Body ID code:     ',ic[0]
         print, format='(A, I10)',    'Center ID code:   ',ic[1]
         print, format='(A, I10)',    'Frame ID code:    ',ic[2]
         print, format='(A, I10)',    'SPK data type:    ',ic[3]
         print, format='(A, e24.17)', 'Start time (TDB): ',dc[0]
         print, format='(A, e24.17)', 'Stop time  (TDB): ',dc[1]
         print

      endelse

      ;;
      ;; It's always good form to unload kernels after use,
      ;; particularly in IDL due to data persistence.
      ;;
      cspice_kclear

   IDL outputs:

      DAF handle:             1
      Segment ID:       DE-0421LE-0421
      Body ID code:              9
      Center ID code:            0
      Frame ID code:             1
      SPK data type:             2
      Start time (TDB): -3.16919520000000000e+09
      Stop time  (TDB):  1.69685280000000000e+09

Particulars


   The components of array summaries are packed into double
   precision arrays.

   The total size of the summary is

           (ni - 1)
      nd + -------- + 1
               2

   double precision words (where nd, ni are nonnegative).

Required Reading


   DAF.REQ

Version


   -Icy Version 1.0.0, 24-OCT-2012, EDW (JPL)

Index_Entries


   unpack daf summary



Wed Apr  5 17:57:59 2017