scenarioStochasticDragSpacecraft

This scenario mirrors examples/mujoco/scenarioStochasticDrag.py but uses the spacecraft.Spacecraft dynamics model (spacecraft.h based) together with MeanRevertingNoiseStateEffector.

The atmospheric density used by drag is:

\[\rho_{\text{stoch}} = \rho_{\text{exp}}(1 + \delta_\rho)\]

where \(\delta_\rho\) is an Ornstein-Uhlenbeck process implemented as a state in the state effector.

Illustration of Simulation Results

The following images illustrate a possible simulation result.

The orbit is plotted in the orbital plane:

../_images/scenarioStochasticDragSpacecraft_orbit.svg

The altitude as a function of time is plotted.

../_images/scenarioStochasticDragSpacecraft_altitude.svg

The atmospheric density as a function of altitude is plotted in lin-log space. This shows two lines: the deterministic, exponential density (should appear linear); and the stochastic density.

../_images/scenarioStochasticDragSpacecraft_density.svg

The atmospheric density correction, which should have a standard deviation of 0.15.

../_images/scenarioStochasticDragSpacecraft_densityDiff.svg

The magnitude of drag force over time is plotted in lin-log space.

../_images/scenarioStochasticDragSpacecraft_drag.svg
scenarioStochasticDragSpacecraft.plotOrbits(timeAxis, posData, velData, dragForce, deterministicDenseData, oe, mu, planetRadius, dragCoeff, dragArea)[source]

Plot orbit, altitude, atmosphere, correction, and drag.

scenarioStochasticDragSpacecraft.run(showPlots: bool = False, rngSeed: int | None = None)[source]

Run the spacecraft-based stochastic drag scenario.

Parameters:
  • showPlots – If True, display figures.

  • rngSeed – Optional stochastic integrator seed for reproducibility.

Returns:

Dict of matplotlib figure handles.