Index Page
cspice_dafrs
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_DAFRS changes the summary for the current array
   in the current DAF.

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

I/O


   Given:

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

      ni   a scalar integer defining the size of the
           integer array 'ic'.

      dc   the array of double precision components of the summary.

      ic   the array of integer components of the summary.

   the call:

      cspice_dafrs, nd, ni, dc, ic

   writes the contents of 'dc' and 'ic' to the current DAF segment summary.

   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.

   A single call to cspice_dafrs equates to the C calls:

      dafps_c ( nd, ni, dc, ic, sum );
      dafrs_c ( sum );

   without use of the 'sum' variable.

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.

      ;;
      ;; A skeleton algorithm to read each segment summary
      ;; from an SPK file, do something to the summary,
      ;; the write the modified summary back to the segment.
      ;;

      ;;
      ;; Set the size parameters for an SPK summary.
      ;;
      nd = 2
      ni = 6

      ;;
      ;; Open the spk file for writing.
      ;;
      cspice_dafopw, SPK, han

      ;;
      ;; Begin a forward DAF segment search.
      ;;
      cspice_dafbfs, han

      ;;
      ;; 'found' returns true if we found the next
      ;; segment. Loop so long as we find segments.
      ;;
      cspice_daffna, found

      while ( found ) do begin

         ;;
         ;; Read the segment summary.
         ;;
         cspice_dafgs, nd, ni, dc, ic

         ;;
         ;; ... do something to the summary...
         ;;

         ;;
         ;; Write the modified summary to the segment.
         ;;
         cspice_dafrs, nd, ni, dc, ic

         ;;
         ;; Check for a next segment.
         ;;
         cspice_daffna, found

      endwhile

      ;;
      ;; Correctly close the modified DAF.
      ;;
      cspice_dafcls, han

Particulars


   None.

Required Reading


   ICY.REQ
   DAF.REQ

Version


   -Icy Version 1.0.0, 08-DEC-2004, EDW (JPL)

Index_Entries


   replace DAF summary




Wed Apr  5 17:57:59 2017