Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


*** DRAFT ***

 

How to Add an Orbit State Type to GMAT

...

  • add your new type to the StateType enum
  • add your new type to the STATE_TYPE_TEXT string array
  • add your bool value to the REQUIRES_CB_ORIGIN array - set it to true if your new state type requires that the origin be a CelestialBody; false otherwise
  • you may need to add a constant (e.g. a tolerance value) as well
  • provide conversion methods to/from your new type and Cartesian, e.g. CartesianToDelaunay and DelaunayToCartesian.  See example below - you may need more arguments for your conversions, or you may need a larger Rvector for your state type.  These methods should also include all validation necessary - checking for singularities, disallowed orbits, etc.  You will need to modify ValidateValue to check for range of data, values of coupled data, etc.  For example:
  • you will then need to modify the main Convert methods to call your new methods, as needed

...

Step 5: Update the Orbit Panel

 

 

 

...

Code mods will be needed to OrbitPanel.  You will need to add/modify at least the following:

  • add a Check<state-type> method to validate user input values for your elements, as necessary
  • modify CheckState to call your new method when the user has entered elements in your new state
  • add/modify widgets as needed