Index Page
cspice_spksfs
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_SPKSFS searches through loaded SPK files to find the
   highest-priority segment applicable to the body and time specified.

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

I/O


   Given:

      body    the scalar integer SPK ID code of an ephemeris object,
              typically a solar system body.

      et      a scalar double precision time, in seconds past the
              epoch J2000 TDB.

   the call:

      cspice_spksfs, body, et, handle, descr, ident, found

   returns:

      handle   the scalar integer handle of the SPK file containing a located
               segment.

      descr    the double precision 5-array descriptor of a located SPK
               segment.

      ident    the scalar string SPK segment identifier of a located
               SPK segment.

      found    indicates whether a requested segment was found or not.
               The other output arguments are valid only if `found'
               is set to true.

Examples


   Find a segment for the Pluto barycenter, with coverage for
   a specified epoch, in a JPL planetary SPK file.

   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


   This routine finds the highest-priority segment, in any loaded
   SPK file, such that the segment provides data for the specified
   body and epoch.

Required Reading


   ICY.REQ
   SPK.REQ

Version


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

Index_Entries


   select spk file and segment



Wed Apr  5 17:58:03 2017