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

Required Reading


   CSPICE_DAFGDA reads the double precision data bounded by two addresses
   within a DAF.

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



      handle   the scalar integer file handle referring to a DAF file.

      end      the scalar integer initial and final addresses of a
               contiguous set of double precision numbers within a DAF.
               Presumably, these make up all or part of a particular

               Note that DAF addresses begin at 1 as in the
               FORTRAN version of the SPICE Toolkit.

   the call:

      cspice_dafgda, handle, begin, end, data


      data     are the double precision data contained between
               the specified addresses within the specified file.


   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.

      ;; Open the type 8 SPK "gda.bsp" for read access then read the
      ;; data from the first segment. The segment contains 100
      ;; 6 element records plus four additional elements.
      cspice_dafopr, 'gda.bsp', handle

      ;; Begin a forward search; find the first segment; read the
      ;; segment summary.
      cspice_dafbfs, handle
      cspice_daffna, found
      cspice_dafgs, 2, 6, dc, ic

      ;; Retrieve the data begin and end addresses.
      baddr = ic[4]
      eaddr = ic[5]

      print, 'Beginning address       : ', baddr
      print, 'Ending address          : ', eaddr
      print, 'Number of data elements : ', eaddr - baddr + 1

      ;; Extract all data bounded by the begin and end addresses.
      cspice_dafgda, handle, baddr, eaddr, data

      ;; Check 'data'. It should show an array of 604 doubles (4 + 6 * 100).
      help, data

      ;; Check the data. Each set of 6 element records should possess the
      ;; property:
      ;;   record(6) = record(6)  + 1000.d
      ;;        i            i-1
      print, data[0:5]
      print, data[6:11]

      ;; Safely close the file
      cspice_dafcls, handle

   IDL outputs:

         Beginning address       :          385
         Ending address          :          988
         Number of data elements :          604

         DATA            DOUBLE    = Array[604]

         0.0000000   1.0000000   2.0000000   3.0000000   4.0000000   5.0000000
         1000.0000   1001.0000   1002.0000   1003.0000   1004.0000   1005.0000

      cspice_dafgda returned 604 double precision data values between DAF
      addresses 385 and 988. The second 6-vector shows the property of 1000
      more than the previous set, as expected.


   The principal reason that DAFs are so easy to use is that
   the data in each DAF are considered to be one long contiguous
   set of double precision numbers. You can grab data from anywhere
   within a DAF without knowing (or caring) about the physical
   records in which they are stored.

Required Reading



   -Icy Version 1.0.2, 13-SEP-2012, EDW (JPL)

      Added a complete Particulars section.
      Minor edits to Example code text.    

   -Icy Version 1.0.2, 08-AUG-2008, EDW (JPL)

      Minor edits to header text.

   -Icy Version 1.0.1, 03-FEB-2006, EDW (JPL)

      Edited header for clarity.

   -Icy Version 1.0.0, 03-OCT-2006, EDW (JPL)


   read data from daf address

Wed Apr  5 17:57:59 2017