Scenario simulation¶
Source: AI/Tools/SimulateScenarioTools.cs
Run a complete, stateless mission scenario in one MCP call:
- Build a spacecraft from
initialState, mass, engine, optional instruments - Optionally chain maneuvers (apogee/perigee/plane/phasing/combined burns, attitude pointings)
- Propagate under a configurable force model (perturbing bodies, drag, SRP, Earth geopotential)
- Sample the trajectory at the requested cadence
- Evaluate geometry constraints against the propagated trajectory
- Return samples, per-maneuver report, constraint windows, and final state/mass
Nothing is persisted; all SPK working state is discarded at the end of the call.
SimulateScenario¶
| Parameter | Type | Description |
|---|---|---|
request |
SimulateScenarioRequest |
The full scenario specification |
SimulateScenarioRequest contains:
| Field | Description |
|---|---|
window |
Scenario time window (start, end) |
integratorStepSizeSeconds |
Integration step (must be > 0) |
outputStepSizeSeconds |
Sampling cadence for the returned trajectory (must be > 0) |
spacecraft |
Initial state, mass, engine, fuel tank, optional instruments |
forceModel |
Central body is implied by spacecraft.initialState.centerOfMotion; specify perturbing bodies, includeAtmosphericDrag, includeSolarRadiationPressure, and optional Earth geopotential degree |
maneuverPlan |
Optional list of maneuver specs to chain |
geometryConstraints |
Optional list of ConstraintSpec to evaluate against the trajectory |
SimulateScenarioResponse returns:
| Field | Description |
|---|---|
trajectorySamples |
List of state vectors at the requested cadence (ICRF, observer = central body) |
maneuverReport |
Per-maneuver kind, maneuver window, thrust window, Δv, fuel burned |
constraintWindows |
Dictionary keyed by ConstraintSpec.id of windows where each constraint holds |
finalState |
State vector at the end of the window |
finalMass |
Spacecraft total mass at the end of the window (kg) |
The supported maneuver kinds in the report are: PlaneAlignment, ApsidalAlignment, Phasing, ApogeeHeight, PerigeeHeight, Combined, plus the attitude modes ZenithAttitude, NadirAttitude, ProgradeAttitude, RetrogradeAttitude, NormalAttitude, AntiNormalAttitude.
The Earth geopotential model EGM2008_to70_TideFree is resolved from the data directory; perturbing-body kernels come from the loaded SPICE generic kernels.
See Tutorials → Mission scenarios for a complete example.