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_spkuef

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


Abstract


   CSPICE_SPKUEF unloads an ephemeris file from the kernel
   system.

I/O


   Given:

      handle   the integer handle assigned to the file upon loading.

               help, handle
                  LONG = Scalar

   the call:

      cspice_spkuef, handle

   removes from the kernel system all references to the SPK
   kernel referred to by `handle'.

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) Load a planetary ephemeris SPK; then look up a series of
      geometric states of the Earth relative to the solar system
      barycenter, referenced to the J2000 frame.

      Use the SPK kernel below to load the required ephemerides
      for the Earth and the Earth Barycenter relative to the solar
      system barycenter.

         de405.bsp


      Example code begins here.


      PRO spkuef_ex1

         ;;
         ;; Local parameters.
         ;;
         MAXITR = 5
         ET0    = -315576000.0
         STEP   = 3600.0

         ABCORR = 'NONE'
         FRAME  = 'J2000'
         OBSRVR = 'SOLAR SYSTEM BARYCENTER'
         SPK    = 'de405.bsp'
         TARGET = 'EARTH'

         ;;
         ;; Load the SPK file.
         ;;
         cspice_spklef, SPK, handle

         ;;
         ;; Step through a series of epochs, looking up a state vector
         ;; at each one.
         ;;
         for i=0, MAXITR - 1L do begin

            et  =  ET0 + i*STEP

            cspice_spkezr, TARGET, et, FRAME, ABCORR, OBSRVR, state, ltime

            print
            print, format='(A,F21.10)', 'et = ', et
            print
            print, format='(A,F21.10)', 'J2000 x-position (km):  ', state[0]
            print, format='(A,F21.10)', 'J2000 y-position (km):  ', state[1]
            print, format='(A,F21.10)', 'J2000 z-position (km):  ', state[2]
            print, format='(A,F21.10)', 'J2000 x-velocity (km/s):', state[3]
            print, format='(A,F21.10)', 'J2000 y-velocity (km/s):', state[4]
            print, format='(A,F21.10)', 'J2000 z-velocity (km/s):', state[5]
            print

         endfor

         ;;
         ;; Unload the SPK kernel. This isn't necessary in a stand-
         ;; alone program, but it's good practice in procedures
         ;; because it frees program and system resources.
         ;;
         cspice_spkuef, handle

      END


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


      et = -315576000.0000000000

      J2000 x-position (km):   -26772058.9514643848
      J2000 y-position (km):   132760135.1677220613
      J2000 z-position (km):    57557579.2735445350
      J2000 x-velocity (km/s):       -29.7772753957
      J2000 y-velocity (km/s):        -5.0656884328
      J2000 z-velocity (km/s):        -2.1979102802


      et = -315572416.0000000000

      J2000 x-position (km):   -26878773.3732022829
      J2000 y-position (km):   132741944.0943545550
      J2000 z-position (km):    57549686.5114355534
      J2000 x-velocity (km/s):       -29.7731803858
      J2000 y-velocity (km/s):        -5.0855796048
      J2000 z-velocity (km/s):        -2.2065325889


      et = -315568800.0000000000

      J2000 x-position (km):   -26986425.6981768459
      J2000 y-position (km):   132723518.3595090210
      J2000 z-position (km):    57541691.9637668282
      J2000 x-velocity (km/s):       -29.7690319295
      J2000 y-velocity (km/s):        -5.1056448242
      J2000 z-velocity (km/s):        -2.2152302239


      et = -315565184.0000000000

      J2000 x-position (km):   -27094062.9916883670
      J2000 y-position (km):   132705020.0753098428
      J2000 z-position (km):    57533665.9684742540
      J2000 x-velocity (km/s):       -29.7648665253
      J2000 y-velocity (km/s):        -5.1257064565
      J2000 z-velocity (km/s):        -2.2239261848


      et = -315561600.0000000000

      J2000 x-position (km):   -27200732.8499865979
      J2000 y-position (km):   132686613.9163857996
      J2000 z-position (km):    57525679.9742503539
      J2000 x-velocity (km/s):       -29.7607212708
      J2000 y-velocity (km/s):        -5.1455869940
      J2000 z-velocity (km/s):        -2.2325435301


Particulars


   A file is removed from consideration by the readers by a call to
   cspice_spkuef.

   The file table entry corresponding to the file referenced by
   `handle', is removed. Any segment table entry which came from the
   specified file is also deleted.

   If the file specified by `handle' is not currently loaded in the
   SPK system, no action is taken.

   Note: This routine, and all kernel file unload routines requiring
   explicit file handle management has been superseded by
   cspice_unload. Use cspice_unload to unload only those kernels
   loaded with cspice_furnsh.

Exceptions


   1)  Unloading a file that has not been loaded is a no-op.
       No error is signaled.

   2)  If the input argument `handle' is undefined, an error is
       signaled by the IDL error handling system.

   3)  If the input argument `handle' is not of the expected type, or
       it does not have the expected dimensions and size, an error is
       signaled by the Icy interface.

Files


   The file referred to by `handle' is unloaded.

Restrictions


   None.

Required_Reading


   ICY.REQ
   SPK.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.1, 10-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added complete
       code examples.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections, and
       completed -Particulars section. Moved the note present in the -I/O
       section to -Particulars.

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

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

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

Index_Entries


   unload SPK ephemeris file



Fri Dec 31 18:43:07 2021