Overview
SpiceInterface wraps the NASA NAIF CSPICE library and updates a set of output messages with planet and spacecraft states at each simulation time step. It reads UTC epoch, loads kernel files, and writes SpicePlanetStateMsgPayload and SCStatesMsgPayload messages consumed by other modules.
Configuration parameters
Path to the directory containing SPICE kernel files (
.bsp, .tls, .pck, etc.).UTC calendar date-time string that sets the simulation epoch.
SPICE reference frame name for all output state vectors (e.g.,
"J2000").SPICE body name used as the origin for position vectors (e.g.,
"Earth").Optional SPICE time-format picture string for
getCurrentTimeString(). When empty the default SPICE format is used.Kernel management
Registers a single kernel file by absolute or relative path. Call before
InitializeSimulation().Registers a list of kernel paths at once.
Clears the configured kernel list without unloading already-loaded kernels.
Specifies which planets to query from SPICE. Each name must be a valid SPICE body name.
Specifies which spacecraft SPICE IDs to query.
Input messages
(Optional) Subscribe to override the epoch set by
UTCCalInit at runtime.Output messages
Current SPICE time (J2000, Julian date, GPS week/seconds).
One message per body added via
addPlanetNames(), carrying inertial position, velocity, and rotation matrix.One message per body added via
addSpacecraftNames(), carrying inertial position and velocity.