How STK Automatically Loads SPICE Files

While satellites propagated by the SPICE propagator allow you to read in a specified SPICE file, planets and central bodies do not. Rather than specifying a file, they rely on STK's automatic loading mechanism, which begins when a scenario is created or loaded.

All SPICE files located in <STK install folder>\STKData\Spice are loaded first. Then, the SPICE files located in following folders are loaded:

  • <STK install folder>\STKData\Spice
  • C:\ProgramData\AGI\STK <Version>\Spice
  • <STK user area>\Config\Spice
  • <STK scenario folder>\Spice

When the scenario is closed, all SPICE files are unloaded.

You must be careful concerning the use of multiple SPICE files that contain ephemeris for the object. When an object's ephemeris is not uniquely determined (e.g., there are multiple definitions of the ephemeris of the object at a given time because of multiple files containing overlapping data), SPICE itself resolves the conflict, using the latest file loaded that can handle the ephemeris request. Thus, in these cases the order of file loading is important. Although file ordering can be adjusted through the Spice move Connect command, it is a best practice to resolve these conflicts outside of STK by using SPICE files that do not have overlapping ephemeris.

Care should especially be taken when loading SPICE files to avoid, if possible, loading new ephemeris for objects that have already been loaded by STK at startup. The SPICE BodyList report (available from the scenario) lists all the bodies loaded into SPICE, the files that contain ephemeris for each body, and a status (Active, Superseded, Partially Superseded) indicating whether a segment is used to handle ephemeris requests over its interval.

Consult STKData\Spice\ReadMe\ReadMe.txt located in the STK installation directory for information regarding which ephemerides are loaded by STK at startup. SPICE utilities, provided by NAIF of JPL (the maintainers of the SPICE capability), can be used for this purpose.