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 spkuef_c

Table of contents

Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries

#### Procedure

       spkuef_c ( SPK Kernel, Unload ephemeris file )

       void spkuef_c ( SpiceInt handle )

#### Abstract

       Unload an ephemeris file so that it will no longer be searched by
       the readers.

#### Required_Reading

       SPK

#### Keywords

       EPHEMERIS
       FILES

#### Brief_I/O

       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       handle     I   Handle of file to be unloaded

#### Detailed_Input

       handle      is the integer handle assigned to the file upon loading.

#### Detailed_Output

       None.

#### Parameters

       None.

#### Exceptions

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

#### Files

       The file referred to by `handle' is unloaded.

#### Particulars

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

       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.

#### 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) 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.

          /.
             Program spkuef_ex1
          ./
          #include <stdio.h>
          #include "SpiceUsr.h"

          int main( )
          {
             /.
             Local constants.
             ./
             #define        MAXITR        5
             #define        ET0           -315576000.0
             #define        STEP          3600.0

             #define        ABCORR        "NONE"
             #define        FRAME         "J2000"
             #define        OBSERVER      "SOLAR SYSTEM BARYCENTER"
             #define        SPK           "de405.bsp"
             #define        TARGET        "EARTH"

             /.
             Local variables.
             ./
             SpiceInt       handle;
             SpiceInt       i;

             SpiceDouble    et;
             SpiceDouble    lt;
             SpiceDouble    state [6];

             /.
             Load the SPK file.
             ./
             spklef_c ( SPK, &handle );

             /.
             Step through a series of epochs, looking up a state vector
             at each one.
             ./
             for ( i = 0;  i < MAXITR;  i++ )
             {
                et  =  ET0 + i*STEP;

                spkezr_c ( TARGET,    et,     FRAME,  ABCORR,
                           OBSERVER,  state,  &lt             );

                printf( "\net = %20.10f\n\n",                   et       );
                printf( "J2000 x-position (km):   %20.10f\n",   state[0] );
                printf( "J2000 y-position (km):   %20.10f\n",   state[1] );
                printf( "J2000 z-position (km):   %20.10f\n",   state[2] );
                printf( "J2000 x-velocity (km/s): %20.10f\n",   state[3] );
                printf( "J2000 y-velocity (km/s): %20.10f\n",   state[4] );
                printf( "J2000 z-velocity (km/s): %20.10f\n\n", state[5] );
             }

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

             return ( 0 );

          }

          When this program was executed on a Mac/Intel/cc/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 = -315572400.0000000000

          J2000 x-position (km):   -26879249.7439419106
          J2000 y-position (km):   132741862.7243705541
          J2000 z-position (km):    57549651.2066062242
          J2000 x-velocity (km/s):       -29.7731620671
          J2000 y-velocity (km/s):        -5.0856683968
          J2000 z-velocity (km/s):        -2.2065710777

          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 = -315565200.0000000000

          J2000 x-position (km):   -27093586.7536762133
          J2000 y-position (km):   132705102.0859030634
          J2000 z-position (km):    57533701.5509854183
          J2000 x-velocity (km/s):       -29.7648849936
          J2000 y-velocity (km/s):        -5.1256176961
          J2000 z-velocity (km/s):        -2.2238877108

          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

#### Restrictions

       None.

#### Literature_References

       None.

#### Author_and_Institution

       J. Diaz del Rio     (ODC Space)
       J.M. Lynch          (JPL)
       R.E. Thurman        (JPL)
       I.M. Underwood      (JPL)
       E.D. Wright         (JPL)

#### Version

       -CSPICE Version 1.0.2, 10-AUG-2021 (JDR)

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

           Removed the reference to the SPK required reading from the
           -Literature_References section.

       -CSPICE Version 1.0.1, 02-JUL-2003 (EDW)

           Corrected trivial typo in the Version 1.0.0 line.
           The typo caused an integrity check script to fail.

       -CSPICE Version 1.0.0, 19-OCT-1997 (EDW) (RET) (IMU) (JML)

#### Index_Entries

       unload SPK ephemeris file

#### Link to routine spkuef_c source file spkuef_c.c

    Fri Dec 31 18:41:13 2021