You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

*** DRAFT ***


How to Add an Orbit State Type to GMAT

Wendy C. Shoan
Goddard Space Flight Center


GMAT provides the capability to model spacecraft orbits.  As of R2013a, there are six orbit state representations allowed in GMAT: Cartesian, Keplerian, Modified Keplerian, SphericalAZFPA, SphericalRADEC, and Equinoctial.  

This document will first give a brief overview of how GMAT handles these state types.  Then it will explain how to add a new orbit state type to GMAT.  Due to current design, new state types cannot be added by plugins and so GMAT base code must be modified.  The implementation of a new orbit state type will involve, at a high level:

  • Modifying the Spacecraft class to handle the new type
  • Adding conversions methods in StateConversionUtil
  • Adding new parameters to GMAT for the fields associated with your new state type
  • Modifying the Orbit tab of the Spacecraft panel 

State Type Overview

The user can set a spacecraft's orbital state in any of the above-mentioned representations via the script or the Orbit tab of the Spacecraft panel.  Internal computations are done in Cartesian.  The StateConversionUtil static class provides conversion methods between the available representations, usually going through the Cartesian state.  Uses can plot or report state data in any of the allowed representations.

Adding a State Type 

Step 1: Modify Spacecraft.hpp

There are minimal changes needed for the header file when adding a new state type.  The new elements must be added to the end of the MultipleReps enum, and the state type must be added to the end of the STATE_REPS enum.  For example, if we were adding the Delaunay type:

Step 2: Modify Spacecraft.cpp

Step 3: Modify StateConversionUtil

Step 4: Add the new parameters

Step 5: Update the Orbit Panel



*** DRAFT ***

  • No labels