| eknseg_c | 
| Table of contents Procedureeknseg_c ( EK, number of segments in file ) SpiceInt eknseg_c ( SpiceInt handle ) AbstractReturn the number of segments in a specified EK. Required_ReadingEK KeywordsEK UTILITY Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- handle I EK file handle. The function returns the number of segments in the specified E-kernel. Detailed_Inputhandle is the handle of an EK file opened for read access. Detailed_OutputThe function returns the number of segments in the EK identified by `handle'. ParametersNone. Exceptions
   1)  If `handle' is invalid, an error is signaled by a routine in the
       call tree of this routine. eknseg_c will return the value zero.
   2)  If an I/O error occurs while trying to read the EK, the error
       is signaled by a routine in the call tree of this routine.
       eknseg_c will return the value zero.
FilesSee the description of handle in -Detailed_Input. ParticularsThis routine is used to support the function of summarizing an EK file. Given the number of segments in the file, a program can use ekssum_c in a loop to summarize each of them. Examples
   The numerical results shown for this example 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.
   1) Find the number of segments on an EK.
      Use the EK kernel below as test input file for loading the
      experiment database. This kernel contains the Deep
      Impact spacecraft sequence data based on the integrated
      Predicted Events File covering the whole primary mission.
         dif_seq_050112_050729.bes
      Example code begins here.
      /.
         Program eknseg_ex1
      ./
      #include <stdio.h>
      #include "SpiceUsr.h"
      int main( )
      {
         /.
         Local variables.
         ./
         SpiceInt             handle;
         SpiceInt             nseg;
         /.
         Open the EK file, returning the file handle
         associated with the open file to the variable named
         `handle'.
         ./
         ekopr_c ( "dif_seq_050112_050729.bes", &handle );
         /.
         Return the number of segments in the EK.
         ./
         nseg = eknseg_c ( handle );
         printf( "Number of segments =  %d\n", nseg );
         /.
         Close the file.
         ./
         ekcls_c ( handle );
         return ( 0 );
      }
      When this program was executed on a Mac/Intel/cc/64-bit
      platform, the output was:
      Number of segments =  2
RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) Version
   -CSPICE Version 1.0.1, 10-AUG-2021 (JDR)
       Edited the header to comply with NAIF standard. Added
       complete code example.
   -CSPICE Version 1.0.0, 24-FEB-1999 (NJB)
Index_Entriesreturn number of segments in an E-kernel | 
Fri Dec 31 18:41:06 2021