Reading Time: < 1 minute
NASA’s General Mission Analysis Tool (GMAT) is used for orbital mechanics simulation and mission design. Since version R2022a, it has included a Python API. I’ve often found this tricky to use, though, so am writing my own wrapper for it. You can see all its latest developments in its repo:
An extra wrapper for the GMAT Python API to simplify setting up mission simulations. https://github.com/weasdown/gmatpyplus 3 forks. 25 stars. 18 open issues. Recent commits: feat: update examples for tidier files (#44)* feat: add utils.gmatpy_classes() function for getting names of all classes in gmatpy library* fix: remove basic-propagate.script in examples root folder* fix: fix log and script paths* fix: fix GetState() to use passed spacecraft object* style: clarify print* feat: add run config for basic-propagate.py* feat: add updated log and script in new locations* feat: set interpreter in tutorial run configs to project default* fix: remove top-level script and log files* feat: add useful directories to gmatpyplus.__init__.py* feat: update example.script and GMAT-Log-example.txt* feat: use logs_dir and scripts_dir in Tut01* feat: add log and script for Tut01 in correct directories* fix: fix logs and scripts dirs, thruster access in finite_burn.py* feat: add run config for finite_burn.py* fix: use project default interpreter, fix name for 00_Creating_a_Spacecraft.py run config* fix: only allow SpacecraftHardware tanks, thrusters and imagers to be lists of items* feat: add type hints for SpacecraftHardware.solar_power_system and nuclear_power_system attributes* style: sort and add imports* refactor: represent a Spacecraft having none of a hardware item with an empty list instead of None* fix: remove load_gmat import, sort imports* fix: fix hardware dict* fix: fix epoch access* feat: add script and log files for finite_burn.py* feat: add example solar power system* fix: PARTIAL fix for minimum_command_propagate.py* feat: add run config for minimum_command_propagate.py* feat: add run config for minimum_propagate_using_defaults.py* style: sort imports* fix: update log path* feat: add log for minimum_command_propagate_using_defaults.py* feat: add run configs for propagate_maneuver.py, use_with_matplotlib.py* style: sort imports* fix: fix log and script paths for propagate_maneuver.py* feat: add log and script for propagate_maneuver.py* feat: simplify log and script paths, remove load_gmat import* feat: simplify log and script paths, remove load_gmat import* feat: add exception type in catch-all RuntimeError* style: simplify and sort imports* feat: add placeholder catch for APIException* feat: add log for use_with_matplotlib.py* fix: fix time printing, satellite name* feat: save script for use_with_matplotlib.py* refactor: move minimum_command_propagate.py and use_with_matplotlib.py to new work_in_progress folder* fix: fix log file name* feat: squash merge updates from main , GitHub feat: add _gmat_py.so for Python 3.14 on Linux x64 , GitHub fix: exclude plugins folder from package builds, to reduce source size, fix whitespace , weasdown fix: fix bug when adding 3 or more tanks or thrusters (#61), fix examples* feat: add hardware_example.py* test: add placeholder test_example.py and run config* feat: add provisional fix for gmat_field_string_to_list()* feat: implement test_example() as run_file()* fix: remove old implementation* feat: implement test_all_examples()* fix: fix spacecraft hardware config and access in finite_burn.py example* fix: fix Propagate argument order in use_with_matplotlib.py example* docs: add/clarify comments to reflect WIP status* feat: add StopCondition._name_mismatch_error() to standardise RuntimeError* fix: use project default interpreter in run configs* fix: fix Tut04_Mars_B-Plane_Targeting.py example for EarthMJ2000Eq coord sys output.- Values approximately match those from GMAT GUI – small variations.* docs: add TODO to get MarsInertial state in Tut04_Mars_B-Plane_Targeting.py example* docs: add TODO to re-implement optional coord_sys argument for Spacecraft.GetState() , GitHub Merge remote-tracking branch 'origin/main' , weasdown