Skip to main content

gmatpyplus

An extra wrapper library for the GMAT Python API to simplify setting up mission simulations. The wrapper aims to align Python commands with GMAT script ones, greatly reducing the number of lines required to model a mission. To do this, it automatically creates relevant subclasses and sets default values, while still allowing the user full control over parameters if they need something specific. The aim is to reduce the time that the user needs to spend thinking about how the API works, so they can instead focus on the orbital mechanics and broader design of their particular mission.

Due to the library's extensive use of classes and methods rather than strings, it also supports full code completion. It has been designed to be as intuitive as possible for the user, while still closely matching GMAT's design philosophy.

Compatibility

The library itself should be compatible with Python 3.9 to 3.14. If you find any incompatibilities, please raise an issue. However, out of the box, GMAT R2025a supports only Python 3.9 to 3.12. This means that without adding extra plugins to your GMAT install, this library can only be used with Python 3.9 to 3.12. You can find the required plugins and instructions on how to install them in the plugins directory. Only plugins for Windows are currently provided, so for use on Linux/Mac with non-default Python versions, you will have to compile the plugins yourself. Plugins for Linux/Mac will be added in a future release.

Getting Started

You can install this library with pip install gmatpyplus.

Then in your Python scripts, import the library:

import gmatpyplus as gp

gp is the recommended abbreviation as is used throughout this documentation.

Specifying GMAT path

For this library to be able to communicate with GMAT, you will also need to specify the path that GMAT is installed in. You can do this either using an environment variable or in a configuration file. As an example, we'll assume that your path to GMAT is C:\Users\joebloggs\Desktop\GMAT\gmat-win-R2025a on Windows, or /home/joebloggs/Desktop/GMAT/gmat-win-R2025a on Linux or macOS.

Environment variable

Create an environment variable called "GMAT" with its value set to the path to the GMAT folder.

Windows You can set the environment variable as either a user variable or system variable - we recommend a user variable.

To set it, open the Start menu, start typing "environment" and click the option for Edit the system environment variables (shown below).

Edit the system environment variables option in Start menu

A window will appear: click the Environment Variables... button at the bottom. Then, either under the user variables section at the top, or system variables section at the bottom, click New... to specify a new variable. Then enter "GMAT" as the name and your path to GMAT's root folder as the value.

"Edit User Variable" window

Linux On Linux, to set the environment variable for just your current session, run the following in the command line:
export GMAT="/path/to/GMAT"

For our example path, this would be:

export GMAT="/home/joebloggs/Desktop/GMAT/gmat-win-R2025a"

To set the variable permanently, add the line above to your ~/.bash_profile or ~/.bashrc file.

Examples

The examples directory gives several example scripts that demonstrate the power of this library (and GMAT generally). GMAT has several tutorials built-in, supplied in its [GMAT root]/samples folder. The scripts in examples/tutorials have exactly the same functionality as these, but have been written using this library rather than GMAT's standard Python API or its scripting language. Tutorials 1 to 4 are currently implemented, with the rest planned to be added in future once the library has the required features.

Metadata

Release files for gmatpyplus 0.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gmatpyplus 0.11.1
File Size Uploaded Provenance Actions
gmatpyplus-0.11.1.tar.gz 133.1 kB Without provenance Details for gmatpyplus-0.11.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gmatpyplus 0.11.1
File Interpreter ABI Platform Actions
gmatpyplus-0.11.1-py3-none-any.whl Python 3 none any Details for gmatpyplus-0.11.1-py3-none-any.whl

Total release size: 216.3 kB

Release files / gmatpyplus-0.11.1.tar.gz

Download URL gmatpyplus-0.11.1.tar.gz
Size 133.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4c8d1ef5cbc540b4e5471c31d48395de3be70307edd5873e7882e876962c465d
BLAKE2b-256 checksum
How to use checksums
76b3aa9efcae4ea5215df0f3c101b813a2ada201eb15308a41d661fc92f9c188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / gmatpyplus-0.11.1-py3-none-any.whl

Download URL gmatpyplus-0.11.1-py3-none-any.whl
Size 83.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a389f2237974cfe0e430c8890c90f82229b258b59f73559e33e8e94175c5427a
BLAKE2b-256 checksum
How to use checksums
6427540e015f14699a9ac974fa0fa2fd625362651048e0c5fa9f31cf4a813690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for gmatpyplus 0.11.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page