Skip to content

Examples

End-to-end Jupyter notebooks that exercise the gmat-run API on stock GMAT sample missions. Each notebook is committed with cell outputs so you can read through it on the docs site without running anything; you can also run them locally after pip install gmat-run[examples].

  • Load, run, and plot — the canonical loop: Mission.load a stock sample, run it, pull the resulting ReportFile back as a DataFrame, derive altitude, plot.
  • Parameter sweep — vary Sat.SMA across a range of values, run the same script for each, and overlay the resulting orbits.
  • Ground track — read an EphemerisFile from Results.ephemerides and plot the spacecraft's ground track on an equirectangular world map.
  • Export to CCSDS-OEM — run a stock GMAT sample that emits an STK ephemeris, convert it to a CCSDS-OEM file with Results.write_oem, re-parse the result, and visualise the trajectory in 3D.
  • Time-scale conversion — propagate across the 2017-01-01 leap-second boundary and convert the resulting ReportFile's epoch columns between A1, TAI, UTC, TT, and TDB with gmat_run.time.convert and the parser-level convert_to= keyword.
  • Solver iterations — target a Hohmann transfer with a DifferentialCorrector, then read the targeter's iteration history back from Results.solver_runs — the Vary variables, the Achieve goal residuals, and a convergence flag — and watch a capped run end without converging.