Ephemeris and time
spiceInterface
spiceInterface
Reads planetary body positions and orientations from JPL SPICE kernels. This is the primary way to obtain high-fidelity ephemeris data for planets, moons, and spacecraft.Messages
| Message | Type | Direction | Description |
|---|---|---|---|
spiceTimeOutMsg | SpiceTimeMsgPayload | Output | Current SPICE time |
epochInMsg | EpochMsgPayload | Input (optional) | Simulation epoch |
planetStateOutMsgs | SpicePlanetStateMsgPayload | Output (vector) | Celestial body states |
scStateOutMsgs | SCStatesMsgPayload | Output (vector) | Spacecraft states from kernel |
attRefStateOutMsgs | AttRefMsgPayload | Output (vector) | Spacecraft attitude reference states |
transRefStateOutMsgs | TransRefMsgPayload | Output (vector) | Spacecraft translational reference states |
planetEphemeris
planetEphemeris
A lightweight alternative to
spiceInterface that provides planet ephemeris data using pre-computed Keplerian elements, without requiring SPICE kernels to be installed. Useful for simple simulations where high-fidelity ephemeris is not needed.ephemerisConverter
ephemerisConverter
Converts between different ephemeris message formats. Use this module to bridge
SpicePlanetStateMsgPayload data into other message types expected by downstream modules.Eclipse
eclipse
eclipse
Determines whether each spacecraft in a list is in a solar eclipse and computes the illumination fraction (0.0 = total eclipse, 1.0 = no eclipse). The module uses a conical shadow model with support for umbra, penumbra, and annular eclipse conditions.Messages
Supported occluding bodies: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Neptune, Uranus, and a single custom body.
| Message | Type | Direction | Description |
|---|---|---|---|
sunInMsg | SpicePlanetStateMsgPayload | Input | Sun ephemeris |
planetInMsgs | SpicePlanetStateMsgPayload | Input (vector) | Occulting planet states |
positionInMsgs | SCStatesMsgPayload | Input (vector) | Spacecraft positions |
eclipseOutMsgs | EclipseMsgPayload | Output (vector) | Illumination fraction per spacecraft |
Atmosphere
All atmosphere modules inherit fromatmosphereBase and write AtmoPropsMsgPayload messages consumed by the drag effector and other modules.
ExponentialAtmosphere
ExponentialAtmosphere
Evaluates a simple exponential density model as a function of altitude above a planetary surface. This is the lightest-weight atmosphere model and is appropriate when you need a smooth density profile without space-weather dependence.
MsisAtmosphere
MsisAtmosphere
High-fidelity atmosphere model using the NRLMSISE-00 empirical model. Supports Venus, Earth, and Mars. Requires 23 space weather input messages covering historical geomagnetic and solar flux indices.Space weather inputs (
swDataInMsgs — 23 messages in order):- Index 0:
ap_24_0(24-hour average Ap) - Indices 1–20: 3-hour Ap values from 0 to -57 hours
- Index 21:
f107_1944_0(F10.7 flux) - Index 22:
f107_24_-24(81-day average F10.7)
TabularAtmosphere
TabularAtmosphere
Atmosphere model that interpolates density and temperature from a user-supplied data table as a function of altitude. Use this when you have a custom atmospheric profile (e.g., from a climate model or flight data).
ZeroWindModel
ZeroWindModel
A simple atmosphere model that outputs zero wind velocity. Use it as a placeholder when your drag model requires a wind message but you do not want to model wind effects.
Magnetic field
All magnetic field modules inherit frommagneticFieldBase and write MagneticFieldMsgPayload messages consumed by the magnetometer sensor and magnetic torque bar modules.
magneticFieldCenteredDipole
magneticFieldCenteredDipole
Evaluates a centered dipole approximation of a planetary magnetic field at a given spacecraft location. The dipole parameters for Earth are built in.
magneticFieldWMM
magneticFieldWMM
Evaluates the World Magnetic Model (WMM) for a higher-fidelity Earth magnetic field. The WMM coefficients are loaded from a data file included with Basilisk.
Ground location
groundLocation
groundLocation
Defines a fixed location on a planetary surface and computes the spacecraft position relative to it in spherical coordinates (range, azimuth, elevation) and South-East-Zenith (SEZ) components. The access output message indicates whether the spacecraft is above the minimum elevation angle.Messages
| Message | Type | Direction | Description |
|---|---|---|---|
planetInMsg | SpicePlanetStateMsgPayload | Input (optional) | Planet state for frame conversion |
scStateInMsgs | SCStatesMsgPayload | Input (vector) | Spacecraft state messages |
currentGroundStateOutMsg | GroundStateMsgPayload | Output | Ground location inertial state |
accessOutMsgs | AccessMsgPayload | Output (vector) | Visibility and range data per spacecraft |
groundMapping
groundMapping
Similar to
groundLocation but maps the spacecraft ground track against a list of target locations, computing per-target access windows and viewing geometry.spacecraftLocation
spacecraftLocation
Computes the relative position between two spacecraft, analogous to
groundLocation but for space-to-space proximity operations.Other environment modules
albedo
Computes the Earth albedo flux seen by a spacecraft, reading planet state and spacecraft state messages to produce an
AlbedoMsgPayload consumed by the coarse sun sensor.solarFlux
Computes solar flux (irradiance) at the spacecraft’s current distance from the sun. Outputs a
SolarFluxMsgPayload used by solar panel and SRP models.spacecraftChargingEquilibrium
Computes the electrostatic charge equilibrium of a spacecraft in a given plasma environment. Consumes plasma density and energy inputs to output a surface potential message.
dentonFluxModel
Provides geosynchronous-orbit plasma flux data using the Denton empirical model. Outputs electron and ion flux messages for charging and plasma interaction modules.