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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_DAFGS returns the summary of the current DAF array,
   i.e. the array found by the previous call to cspice_daffna
   or cspice_daffpa.

I/O


   Given:

      nd       a scalar integer defining the size of the return double
               precision array.

               help, nd
                  LONG = Scalar

      ni       a scalar integer defining the size of the return integer array.

               help, ni
                  LONG = Scalar

               For an SPK file, `nd' always equals 2, `ni' always equals 6.
               The precise contents of the vectors depend on the type of DAF
               but the final two elements of the `ic' (integer) vector always
               contains the initial and final addresses respectively of the
               array.

   the call:

      cspice_dafgs, nd, ni, dc, ic

   returns:

      dc       the array of double precision components of the summary.

               help, dc
                  DOUBLE = Array[nd]

      ic       the array of integer components of the summary.

               help, ic
                  LONG = Array[ni]

Parameters


   None.

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.

   1) Create a simple program to output the double precision and integer
      values stored in an SPK's segments' descriptors. This program opens
      a DAF for read, performs a forward search for the DAF arrays,
      prints the segment descriptor for each array found, then closes
      the DAF.

      Use the SPK kernel below as input DAF file for the program.

         de421.bsp


      Example code begins here.


      PRO dafgs_ex1

         ;;
         ;; Local constants
         ;;
         kernel = 'de421.bsp'

         ;;
         ;; Open a DAF file for read. Return a `handle' referring
         ;; to the file.
         ;;
         cspice_dafopr, kernel, handle

         ;;
         ;; Define the summary parameters appropriate
         ;; for an SPK file.
         ;;
         ND = 2L
         NI = 6L

         ;;
         ;; Begin a forward search on the file.
         ;;
         cspice_dafbfs, handle

         ;;
         ;; Search until a DAF array is found.
         ;;
         cspice_daffna, found

         ;;
         ;; Loop while the search finds subsequent DAF arrays.
         ;;
         while found do begin

            cspice_dafgs, ND, NI, dc, ic

            print, 'Doubles:  ', dc

            print, FORMAT='(A,6I8)', 'Integers: ', ic
            print, ' '


            ;;
            ;; Check for another segment.
            ;;
            cspice_daffna, found

         endwhile

         ;;
         ;; Safely close the DAF file.
         ;;
         cspice_dafcls, handle

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        1       0       1       2     641  310404

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        2       0       1       2  310405  423048

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        3       0       1       2  423049  567372

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        4       0       1       2  567373  628976

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        5       0       1       2  628977  674740

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        6       0       1       2  674741  715224

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        7       0       1       2  715225  750428

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        8       0       1       2  750429  785632

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:        9       0       1       2  785633  820836

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:       10       0       1       2  820837  944040

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:      301       3       1       2  944041 1521324

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:      399       3       1       2 1521325 2098608

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:      199       1       1       2 2098609 2098620

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:      299       2       1       2 2098621 2098632

      Doubles:    -3.1691952e+09   1.6968528e+09
      Integers:      499       4       1       2 2098633 2098644


      Note, the specific contents of `ic' and `dc' depend on the
      type of DAF.

      Note, the final entries in the integer array contain the segment
      start/end indexes. The output indicates the search proceeded
      from the start of the file (low value index) towards the end
      (high value index).

Particulars


   A single call to cspice_dafgs equates to the C calls:

      dafgs_c( sum );
      dafus_c( sum, nd, ni, dc, ic );

   without use of the `sum' variable.

Exceptions


   1)  If this routine is called when no search is in progress in the
       the current DAF, the error SPICE(DAFNOSEARCH) is signaled by a
       routine in the call tree of this routine.

   2)  If the DAF for which the "current" array's summary is to be
       returned has actually been closed, an error is signaled by a
       routine in the call tree of this routine.

   3)  If no array is current in the current DAF, the error
       SPICE(NOCURRENTARRAY) is signaled by a routine in the call tree
       of this routine. There is no current array when a search is
       started by cspice_dafbfs or cspice_dafbbs, but no calls to
       cspice_daffna or cspice_daffpa have been made yet, or whenever
       cspice_daffna or cspice_daffpa return the value False.

   4)  If `nd' is zero or negative, no double precision components
       are returned.

   5)  If `ni' is zero or negative, no integer components are returned.

   6)  If any of the input arguments, `nd' or `ni', is undefined, an
       error is signaled by the IDL error handling system.

   7)  If any of the input arguments, `nd' or `ni', is not of the
       expected type, or it does not have the expected dimensions and
       size, an error is signaled by the Icy interface.

   8)  If any of the output arguments, `dc' or `ic', is not a named
       variable, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   DAF.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.2, 09-JUL-2021 (JDR)

       Edited the header to comply with NAIF standard.
       Modified code example to hardcode the input DAF file.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.1, 11-NOV-2013 (EDW)

       Edits and clean up to header text.

   -Icy Version 1.0.0, 16-JUN-2003 (EDW)

Index_Entries


   get DAF summary



Fri Dec 31 18:43:02 2021