Versions Compared

Key

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

...

Introduction

A Command represents sets a member of the set of instruction(s) to that perform a certain task in GMAT. A   Each Command is associated with one or more Resources and describes how the associated Resources will be utilized used and evolved evolve over time. Commands are sequential and they run in sequential order, which scripted order.  That scripted list of commands  is called the Mission Control Sequence. Commands in GMAT are created in order, via script or GUI, for running to run a mission.
The following text shows sample scripting of for a mission sequence:

Code Block
BeginMissionSequence;
Propagate 'Prop To Periapsis' DefaultProp(DefaultSC) {DefaultSC.Earth.Periapsis};
Target 'Hohmann Transfer' DC1 {SolveMode = Solve, ExitMode = SaveAndContinue};
   Vary 'Vary TOI' DC1(TOI.Element1 = 1, {Perturbation = 0.0001, Lower = 0.0, Upper = 3.14159, MaxStep = 0.5});
   Maneuver 'Perform TOI' TOI(DefaultSC);
   Propagate 'Prop To Apoapsis' DefaultProp(DefaultSC) {DefaultSC.Earth.Apoapsis};
   Achieve 'Achieve RMAG = 42165' DC1(DefaultSC.Earth.RMAG = 42164.169, {Tolerance = 0.1});
   Vary 'Vary GOI' DC1(GOI.Element1 = 1, {Perturbation = 0.0001, Lower = 0.0, Upper = 3.14159, MaxStep = 0.2});
   Maneuver 'Perform GOI' GOI(DefaultSC);
   Achieve 'Achieve ECC = 0.005' DC1(DefaultSC.Earth.ECC = 0.005, {Tolerance = 0.0001});
EndTarget;  % For targeter DC1
Propagate 'Prop One Day' DefaultProp(DefaultSC) {DefaultSC.ElapsedSecs = 86400};


The following snapshot shows the mission sequence of the above script in GUI modethis scripting as it is presented in GMAT's GUI.


There are many types of built-in Commands for use used in spacecraft missions. However, new New Commands can be created to extend GMAT and to perform a new desired task. This document will describe a general procedure how to add a new Command to the baseline GMAT code. If you would prefer to add your new Command as a plugin, please see instead the document "Building a GMAT Plug-in: A Walkthrough Using Visual Studio 2010".

Overview

All configurable Command types must be derived from GmatCommand.The GmatCommand class is derived from the base GMAT class, GmatBase. There are often intermediate classes as well, to encapsulate common data and methods for the Command type. For example, there is a PlotCommand class, which derives from GmatCommand, and from which ClearPlot, MarkPoint, PenDown, and PenUp Commands are derived. Data and method implementations that are common to all of these subclasses are placed in the PlotCommand class, and only those that need specific modifications are added or overridden in the subclasses. Only leaf Commands can be created and used in GMAT mission sequence.

Most Commands have one or more associated Resources and options. Though not shown in the above diagram, the associated Resource type of the PlotCommand is the Subscriber/XYPlot, and there are no command options. The example script syntax is

...