Gmat User Guide
Gmat User Guide
Gmat User Guide
1 Configuring Objects/Resources
1.0.1 Overview of the Spacecraft Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.2 Spacecraft Orbit Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.3 Spacecraft Attitude Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.4 Spacecraft Ballistic/Mass Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.5 Spacecraft Sensors Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.6 Spacecraft Tanks Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.7 Spacecraft Actiiators Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.8 Overview of the Propagator Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.9 Features of the Propagator Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.10 Fields Associated with a ForceModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.0.11 Fields Associated with an Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Objects/Resources
There are nllnlerolls objects, also called resources, that the user can create and configure in GMAT. Examples include
Spacecraft, Propagators, Coordinate Systems, and Plots. Each of these resources are configllrable from the script
and GUI and this chapter discusses how to configure all objects regardless of your chosen interface.
Each section in this Chapter is devoted to a specific type of object. For each object, we present a screen capture
of the dialogle box used to configire the object from the GUI. Next we present a short explanation of how to use
the dialogue box to configure conlnlon types. Finally, a table is presented that describes in detail each setable field
for the object. The detail incllides default values, allowable inputs and ranges, and a text description of the field.
Let's begin by looking at the Spacecraft object.
The Spacecraft object is one of the most important resources in GMAT and can be configured in numerous ways.
For most mission applications, GMAT's prinlary use and function is to sinllilate and model how an actl~alspacecraft
wollld behave (or behaved) in a flight situation. You do this by creating and configuring spacecraft objects, GMAT's
nlathenlatical model of real-world spacecraft, and by issuing conlnlands such a? Propagate for GMAT to apply to
the spacecraft model.
The types of parameters and settings on the Spacecraft Object fall into several categoris: Orbit, Attitude.
Ballistic/Mass, Sensors, Tanks, and Actuators. Each of these is configired on a separate tab on the Spacecraft
dialog box. For example, you can configire the initial state and epoch on the Orbit tab. and the the nmss and
ballistic properties on the Ballistic/Mass tab. In the following sections we disc~isseach tab in detail.
Possible Coupling with Other Objects
A Spacecraft Requires Other Objects/Comnlands of Type: None.
A Spacecraft has the Potential to Couple with Objects/Conln~anclsof Type: Tank, Thruster, Differential Corrector,
fnlinconOptin~izer,XYPlot? OpenGLPlot, ReportFile, Variables/Arrays, Coordinate System, MATLAB Function,
BeginFiniteBurn, EnclFiniteBlirn, Function Call, Assignment Conmnland, Ma,neuver, Propagate, Report, Save, Script
Event, If, For, While, Vary, Achieve, Minimizel Nonlinearconstraint.
The Spacecraft/Orbit tab is used to set the orbit state and epoch and is illustrated in Fig. 2.1. On this tab, you can
choose the epoch, coordinate system, and the state representation in which to enter initial condition information.
Their are three golips on the Spacecraft/Orbit tab: Epoch, State Configiration, and State Vector. Below, we discliss
each group in cletail.
Epoch Group
The Epoch golip allows you to select the time system and time format in which to enter the initial Space-
craft epoch. Several choices are available inchiding AlModJulian, TAIModJulian, UTCModJulian, TTModJulian,
AiGregorian, TAIGregorian, UTCGregorian, TTGregorian . An epoch can be provided in either the I\;lodified Jli-
lian Date (with reference epoch 05 Jan 1941 12:00:00.000 TAI) or Gregorian Date formats. As an exanlple: the J2000
Epoch should be expressed using the Gregorian date fornlat as 01 Jan 2000 12:00.000 (TDB).
Note that if you change the EpochFormat conlbo box, and have defined the spacecraft state with respect to a
time dependent coordinate system, the state vector representation in the GUI does not change. For example, if you
define a Spacecraft's state with respect to the Earth Fixed system, and then change the epoch, you have not changed
the state vector in the Earth Fixed systenl and therefore the values in the GUI do not change. However, change the
epoch does change the inertial state that results from converting the Earth Fixed state to the inertial state. This
is because the orientation of the Earth Fixed frame is different at the new epoch, and so the transformation to the
inertial frame yields a new results.
This Tab is not currently supported in GMAT. It is inch~dedonly to illustrate look-and-feel of fiit~n-eenhancements.
The BallisticlMass tab, shown in Fig. 2.2is wed to set spacecraft mass and ballistic properties. On this panel,
yo11 can set properties such as DryMass, DragArea, and SRPArea anlong others. GMAT currently only supports a
point-mass spacecraft model. In the future GMAT will support a higher fidelity spacecraft model, and this panel
will allow yo11 to set the spacecraft nlonients of inertia and other properties.
Ballistics Group
The Ballistics group allows the user to specify spacecraft physical properties that are used to calculate properties
such as the ballistic coefficient. A detailed disclission of all fields on the Spacecraft Ballistic/Mass tab is found in
Table 2.3. Now let's look at the Sensors tab.
1i)
1.0.5 Spacecraft Sensors Tab
The Spacecraft/Tanks tab allows you to add nlliltiple tanks to a spacecraft. Tanks are created separately from
spacecraft and if you have not created any tanks, the Available Tanks list will appear empty. Yo11 can add an
existing tank to a spacecraft by selecting the desired tank using a left mowe click and then lising a left mouse click
on the right-arrow icon. If there are no existing tanks, go to the resource tree, right click on the Hardware folder
that appears as a slibfolder to spacecraft, and select Adcl/Fuel Tank.
The spacecraft/Actuators tab allows you to add nniltiple actuators to a spacecraft. Currently the only actuator that
GMAT supports are thrusters. You n111st create a thruster before yo11 can add it to a spacecraft. If you have not
created any thrusters, the Available Thrusters list will appear empty. You can add existing thrusters to a spacecraft
by selecting the desired thruster using a left mouse click and then using a left nlol~seclick on the right-arrow icon.
To create a Thruster, go to the resource tree? right click on the Hardware folder that appears as a slibfolder to
spacecraft, and select Add/ThrlLster.
Figure 1.4: Spacecraft Dialogu~t:B m j Actulattors Tab
AnomalyType Defaullt: TA. Options: [ TA? MA? EA? HA]: The Epoch field allows the
user to specify the to select the AnomalyType needed for the Keplerian
or Modif iedKeplerian spacecraft state. In the scripting environment,
AnomalyType is not wed. Units: N/A.
NOTE: Default values for the remaining state types are obtained through
transfornlations of the default Cartesian spacecraft state valu~es. The
Keplerian, ModifiedKeplerian? and Equinoctial are dependant on the
origin of the CoordinateSystem. becallse the state types require a p valuie.
Table 1.1: (Fields Associated with a Spacecraft Orbit State
(Orbit Tab). continued)
INC Default: 12.850080057. Options: [Real Nlinlber]: The INC field is the
spacecraft orbit's oscullating inclination! in degrees, w/r/t to the selected
coordinate systenl. Units: degrees.
INC See the Keplerian state section for a description on this field.
AOP See the Keplerian state section for a description on this field.
RAAN See the Keplerian state section for a description on this field.
RMAG Default: 7218.03297304. Options: [Real Nlinlber > 01: The RMAG field
allows the user to set the magnit~ideof the spacecrafts position vector.
Units: knl.
RA Defadt: 0. Options: [Real Nunlber]: The RA field allows the user to set
the spacecraft's right ascension. Units: degrees.
DEC Default: 10.3758449200. Options: [Real Nlinlber]: The DEC field allows the
user to set the spacecraft's declination. Units: degrees.
VMAG Defadt: 7.41771528167. Options: [Real Nlinlber > 01: The VMAG field
allows the user to set the magnitude of the spacecraft's velocity. Units:
km/sec.
AZI Default: 82.377421681. Options: [Real N~mnlber]:The AZI field allows the
user to set the spacecraft's azinluth angle. Units: degrees.
FPA Defadt: 88.60870365370. Options: [Real Number]: The FPA allows the
user to set a spacecraft's flight path angle. Units: degrees.
RMAG See the SphericalAZFPA state section for a description on this field.
DEC See the SphericalAZFPA state section for a description on this field.
VMAG See the SphericalAZFPA state section for a description on this field.
Table 1.1: (Fields Associated with a Spacecraft Orbit State
(Orbit Tab). continued)
RAV Defallt: 90. Options: [Real Nunlber]: The RAV field i allows the wser to set
the right ascension of the spacecraft's velocity. Units: degrees.
DECV Default: 7.7477720361. Options: [Real N~mlber]:The DECV field allows the
user to set the declination of the spacecraft's velocity. Units: clegrees.
SMA See the Keplerian state section for a description on this field.
D e f a ~ l t :2.2. Options: [Real Nlinlber > 01: The Cd field allows the user t o
specify the spacecraft's drag coefficient. Units: None.
Default: 1.8. Options: [Real Number > 01: The C r field allows the user t o
specify the spacecraft's coefficient of reflectivity. Units: None.
DragArea Default: 15. Options: [Real Nlinlber > 01: The DragArea is the effective
spacecraft area used in calculate the force due to drag. Units: m2.
SFPArea Defadt: 1. Options: [Real Nlinlber > 01: The SWArea is the effective
spacecraft area used in calclilate the force due to solar radiation pressures.
Units: m2.
DragArea Defadt: 15.0. Options: [Real Nllnlber > 01: The DragArea is the area of
the spacecraft that is wed in calclllating atmospheric drag. DragArea n u ~ t
be greater than 0. Units: n12
SWArea Default: 1.0. Options: [Real Nlmlber > 01: The SFPArea is the area of
the spacecraft that is used in calculating the force due to solar radiation
pressure. SRPArea must be greater than 0. Units: m2
Default: 850.0. Options: [Real Nunlber > 01: The DryMass is the mass of
the spacecraft without the mass of tanks and fuel. DryMass must be greater
than 0. Units: kg
In GMAT? a Propagator is a conhination of an integrator and a force model. Hence, a Propagator contains a
physical model of the space environment that is used to model the motion of a spacecraft as it moves forwards
or backwards in time (VOP fornllilation is not currently supported). You configire a Propagator by selecting
anlong different nlimerical integrators and environment nlodels to create a Propagator appropriate to the flight
1.5: Propi3,gtitor Diii.li)gil~:Box
Fig~~rc:
regime of spacecraft your mission. GMAT supports the following various numerical integrators: RungeKutta89,
RungeKutta68, RungeKutta56, PrinceDormand45, PrinceDormand78, BulirschStoer, AdamsBashforthMoulton.
Force n~odelssupported by GMAT include point mass and non-spherical gravity, atmospheric drag (Earth), and
solar radiation pressure
To propagate spacecraft in GMAT, yo11 first create and configire a Propagator object in the script or in the
Resource Tree. Then, in the nlission sequence, you create a Propagate Event, the topic of Chapter ? ? ? and select
anlong previously existing Propagators and Spacecraft. Hence, a Propagator is different from a Propagate Event: A
Propagator is a resource and is found in the GUI under the resource tree, a Propagate Event is config~iredunder the
klission Tree and is how you instruct GMAT to propagate spacecraft.
The Propagator dialogue box is illustrated in Fig. 1.5 and contains two group boxes: the Integrator group and
the Force Model group. In t h k Chapter, we discuss the items in each gro~ipon the Propagate Panel. We present
how to configure a propagator and disc~lssall possible llser settable fields in detail.
Possible Coupling with Other Objects
A Propagator Requires Other Objects/Cornrnands of Type: Force Model (Script Only). (Note: There are slight
differences in how you configure a Propagator in the script and GUI and we refer you to the script exanlple shown
in the next section for details. Effort has been made to reduce any difference between the script and GUI. Fiiture
versions of GMAT will address this problenl with the Propagator object.
A Propagator has the Potential to Couple with Objects/Comn~andsof Type: Propagate.
The Propagator Dialogue Box contains two groups boxes: Integrator and Force Model. You select and configure a
numerical integrator using the Integrator groiip and a Force Model in the Force Model groiip. Let's begin by looking
at the Integrator group.
Integrator Group
The Integrator group allows you to select and configure a numerical integrator appropriate to your application.
You select the type of numerical integrator in the Type pdl-down menu. After selecting the integrator type, the
fields below the Type plll-down nlenu dynanlically configure to allow you to set relevant parameters for the selected
integrator type. All integrators except for Adams-Bashforth-Mo~llton (ABM) are configured wing the same fields.
The ABI\/I integrator has the following additional fields: MinIntegrationError and NomIntegrationError
Table 2.8 contains a detailed discl~ssionof each ~ser-settablefield for a nlinlerical integrator.
Force Model Group
The Force Model group allows you to configure a force model appropriate to the flight regime of your application.
The central body of propagation and error control method are also defined here. On a Propagator, GMAT classifies
all celestial bodies into two nlutually exclusive categories: Primary Bodies, and Point Masses. Prinlary bodies can
have a conlplex force model that includes non-spherical gravity?drag, and solar radiation pressure. Point mass bodies
only have a spherical point-mass gravitational force.
While the Propagate dialogue box is designed to support nlliltiple primary bodies, GMAT currently only supports
a single prinlary body per propagator. You can add a Prinlary Body by clicking the S e l e c t button in the Prinlary
Bodies group box. Once you have added a Prinlary Body (or nll~litiplebodies in future versions), the pull down
menu allows you to configure the force nloclel for each Prinlary Body. The text box, next to the S e l e c t button
contains a list of all Primary Bodies so you can see which bodies are being treated with conlplex force models. In
filture versions, GMAT will support nlultiple prinlary bodies on a propagator allowing you to use a non-spherical
gravity model for the Earth and Moon sinlultaneollsly.
Configuring certain fields in the Force Model group affects the availability of other fields. For example, if you
remove all bodies from the Prinlary Bodies list, the Gravity Field, Atmosphere Model, and Magnetic Field groups
are disabled. Similarly, in the Gravity Field group, the search button and the Model File field are only active if
"Other" is selected in the Type pull-down. In the Atmosphere Model group, the Setup button is only active when
MSISE-90 or Jachhia-Roberts are selected in the Type plll-down
GMAT allows you to define Solar flux properties if you select either the MSISE-90 or Jachhi;lrRoberts atmosphere
models. By selecting one of these nlodels in the Type pull-down menu in the Atmosphere Model group, the Setup
button is enabled. Clicking on the Setup button brings up the panel illustrated in Fig. 1.6. Here yo11 can input Solar
flux values. GMAT does not currently support flux files though f u t ~ r eversions will.
Table 2.7 contains a detailed disclssion of each ~ser-settablefields for a force model.
Gravity.PrimaryBody.Degree Default: 4. Options: [ Integer >O and < the nlaxinllml specified by
the model? Order 5 Degree 1. This field allows the user to select the
the degree, or n~inlberof zonal terms, in the non-spherical gravity
model. Ex. Gravity. Earth. Degree = 2 tells GMAT to use only
the J2 zonal tern1 for the Earth. The value for Degree nnist be less
than the nlaxinllinl degree specified by the Model. Units: None.
Gravity.PrimaryBody.Order Default: 4. Options: [ Integer >O and < the nlaxinllrnl specified by
the model? Order 5 Degree 1. This field allows the user to select
the the order, or nlinlber of tesseral terms, in the non-spherical
gravity model. Ex. Gravity.Earth.Order = 2 tells GMAT to use
2 tesseral terms. Note: Order nllist be greater than or equal to
Degree. Units: None.
SRP Defa~dt:Off. Options: [ On, Off 1. The SRP field allows the user to
include the force due to solar radiation pressure in the total sun1
of forces. Units: N/A.
PointMasses Default: None. Options [ Sun, Mercury, Venus? Earth, Luna, Mars?
J u p i t e r , Saturn, Uranus? Neptune, P l u t o 1. A PointMass is a
planet or moon that is nlodelled by a point source located at its
center of gravity. A PointMass body can be any planet or moon
not included in the PrinlaryBodies field. Units: N/A.
Accuracy Default: le-11. Options: [ Real Nllniber 2 0 1. The Accuracy field is used
to set the desired acculracy for an integration step. Units: N/A. When yo11
set a value for Accuracy, GMAT umes the nlethocl selected in ErrorControl
field on the Force Model, to determine a metric of the accuracy. For each step,
the integrator ensures that the accuracy, a5 calculate wing the method define
by ErrorControl, is less than the limit defined by Accuracy. If an integrator
exceeds MaxStepAttempts trying to meet the requested accuracy, and error
niessage is thrown and propagation stops.
MinStep Default: .001 (sec). Options: [ Real Nllnlber > 0, MinStep < MaxStep 1. The
MinStep field is used to set the nlininluml allowable step size. Units: sec.
MaxStep Default: 2700.0 (sec.). Options: [ Real Nulnlber > O? MinStep 5 MaxStep 1.
The MaxStep field is wed to set the niaxinlllnl allowable step size. Units: sec.
MaxStepAttempts Default: 50. Options: [ Integer > 01. The MaxStepAttempts field allows the
user to set the number of attempts the integrator takes to meet the tolerance
defined by Accuracy. Units: None.
Script Examples
The Spacecraft object is one of the most inlportant resources in G'IAT and can be configllred in nllnlerolis ways.
For most mission applications, GMAT's prinlary use and function is to simlilate and model how an actual spacecraft
wollld behave (or behaved) in a flight sit~iation.You do this by creating and configuring spacecraft objects, GMAT's
mathenlatical model of real-world spacecraft? and by issuing conlnlands such as Propagate for GMAT to apply to
the spacecraft model.
The types of parameters and settings on the Spacecraft Object fall into several categoris: Orbit? Attitude,
25 ( X A P T E R 2. CISJECT FIELDS: QliZCK LO(IK-LiP TABLES
Ballistic/Mms~ Sensors? Tanks, and Act~iators. Each of these is configured on a separate tab on the Spacecraft
dialog box. For example, you can configure the initial state and epoch on the Orbit tab, and the the mass and
ballistic properties on the Ballistic/Mass tab. In the following sections we discuss each tab in detail.
The Spacecraft/Orbit tab is used to set the orbit state and epoch and is illustrated in Fig. 2.1. On this tab, you can
choose the epoch, coordinate system, and the state representation in which to enter initial condition information.
Their are three golips on the Spacecraft/Orbit tab: Epoch, State Configuration?and State Vector. Below, we discllss
each group in detail.
Epoch Group
The Epoch group allows yo11 to select the time systenl and time fornlat in which to enter the initial Space-
craft epoch. Several choices are available incl~~ding AlModJulian' TAIModJulian, UTCModJulian, TTModJulian,
AIGregorian? TAIGregorian, UTCGregorian, TTGregorian . An epoch can be provided in either the Modified JII-
lian Date (with reference epoch 05 Jan 1941 12:00:00.000 TAI) or Gregorian Date formats. As an example, the 52000
Epoch should be expressed using the Gregorian date fornlat as 01 Jan 2000 12:00.000 (TDB).
Note that if you change the EpochFormat conlbo box, and have defined the spacecraft state with respect to a
time dependent coordinate system, the state vector representation in the GUI does not change. For example, if yo11
define a Spacecraft's state with respect to the Earth Fixed system, and then change the epoch, yo11 have not changed
the state vector in the Earth Fixed systenl and therefore the values in the GUI do not change. However, change the
epoch does change the inertial state that reslilts from converting the Earth Fixed state to the inertial state. This
is because the orientation of the Earth Fixed frame is different at the new epoch, and so the transformation to the
inertial frame yields a new results.
This Tab is not currently supported in GMAT. It is incl~ldedonly to illwtrate look-and-feel of fiit~lreenhancements.
The Ballistic/Mims tab, shown in Fig. 2.2is wed to set spacecraft mass and ballistic properties. On this panel,
you can set properties such as DryMass, DragArea, and SRPArea anlong others. GMAT currently only supports a
point-mass spacecraft model. In the future GkIAT will support a higher fidelity spacecraft model, and this panel
will allow you to set the spacecraft moments of inertia and other properties.
Ballistics Group
The Ballistics group allows the user to specify spacecraft physical properties that are used to calclllate properties
such as the ballistic coefficient. A detailed disc~issionof all fields on the Spacecraft BallBtic/Mass tab is found in
Table 2.3. Now let's look at the Sensors tab.
The Spacecraft/Tanks tab allows you to add nll~ltipletank? to a spacecraft. Tanks are created separately from
spacecraft and if yo11 have not created any tank?? the Available Tanks list will appear empty. You can add an
existing tank to a spacecraft by selecting the desired tank using a left nlolse click and then using a left nlollse click
on the right-arrow icon. If there are no existing tanks, go to the resollrce tree? right click on the Hardware folder
that appears as a subfolder to spacecraft, and select Add/F~ielTank.
The spacecraft/Actllators tab allows yo11 to add nlultiple actuators to a spacecraft. Cllrrently the only actuator that
GMAT supports are thrusters. You must create a thruster before you can add it to a spacecraft. If you have not
created any thrusters, the Available Thrusters list will appear empty. You can acid existing thrusters to a spacecraft
by selecting the desired thruster using a left nlollse click and then using a left niol~seclick on the right-arrow icon.
To create a Thnster, go to the resollrce tree, right click on the Hardware folder that appears a7 a si~bfolderto
spacecraft, and select Add/Thrlmter.
'. . .'
2.1. SPACECRAFT AND HARDTKARE FIELDS
AnomalyType Default: TA. Options: [ TA, MA, EA? HA]: The Epoch field allows the
user to specify the to select the AnomalyType needed for the Keplerian
or Modif iedKeplerian spacecraft state. In the scripting environment,
AnomalyType is not wed. Units: N/A.
NOTE: Default vahies for the renlaining state types are obtained through
transformations of the default Cartesian spacecraft state values. The
Keplerian, Modif iedKeplerian, and Equinoctial are dependant on the
origin of the CoordinateSystem, because the state types require a p vahie.
2.1. SPACECRAFT A8-D HARDitiARE FIELDS 31
Table 2.1: (Fields Associated with a Spacecraft Orbit State
(Orbit Tab). continued)
RMAG Default: 7218.03297304. Options: [Real Nunher > 01: The RMAG field
allows the user to set the magnitude of the spacecrafts position vector.
Units: knl.
RA Default: 0. Options: [Real Nllnlber]: The RA field allows the user to set
the spacecraft's right ascension. Units: degrees.
DEC Default: 10.3758449200. Options: [Real Nlmnlber]: The DEC field allows the
user to set the spacecraft's declination. Units: degrees.
VMAG Default: 7.41771528167. Options: [Real Nunlber 2 01: The VMAG field
allows the user to set the magnitude of the spacecraft's velocity. Units:
knl/sec.
AZI Defadt: 82.377421681. Options: [Real Nunlber]: The AZI field allows the
user to set the spacecraft's azinllith angle. Units: degrees.
FPA Default: 88.60870365370. Options: [Real Nllnlber]: The FPA allows the
user to set a spacecraft's flight path angle. Units: degrees.
VMAG See the SphericalAZFPA state section for a description on this field.
'.. _...'
2.1. SPACECRAFT ,4ND HARD'CTi_ClREFIELDS 33
Table 2.1: (Fields Associated with a Spacecraft Orbit State
(Orbit Tab). continued)
Default: 90. Options: [Real Nllnlber]: The RAV field i allows the user to set
the right ascension of the spacecraft's velocity. Units: degrees.
DECV Default: 7.7477720361. Options: [Real Nllnlber]: The DECV field allows the
user to set the declination of the spacecraft's velocity. Units: degrees.
SMA See the Keplerian state section for a description on this field.
Defadt: 2.2. Options: [Real Nunlber 2 01: The Cd field allows the user to
specify the spacecraft's drag coefficient. Units: None.
Default: 1.8. Option?: [Real Niinlber 2 01: The C r field allows the user to
specify the spacecraft's coefficient of reflectivity. Units: None.
DragArea Defalllt: 15. Options: [Real Nllnlber 2 01: The DragArea is the effective
spacecraft area used in calc~ilatethe force due to drag. Units: m2.
SRPArea Defadt: 1. Options: [Real Nlinlber 2 01: The SRPArea is the effective
spacecraft area used in calculate the force due to solar radiation pressures.
Units: m2.
DragArea Default: 15.0. Options: [Real Nlinlber > 01: The DragArea is the area of
the spacecraft that is used in calclllating atnlospheric drag. DragArea niwt
be greater than 0. Units: n12
SRPArea Default: 1.0. Option?: [Real Number > 01: The SRPArea is the area of
the spacecraft that is wed in calclilating the force due to solar radiation
pressure. SRPArea nlust be greater than 0. Units: m2
DryMass Default: 850.0. Options: [Real Nllnlber > 01: The DryMass is the mass of
the spacecraft without the mass of tanks and fiiel. DryMass must be greater
than 0. Units: kg
'. .. ..'
2.1. SPACECRAFT ,4ND HARDiX,i_AREFIELDS 3.5
Table 2.4: Fields Associated with Spacecraft Attitude State
(Attitude Tab)
Euler Default: 312. Options:[ 123, 132, 121, 131, 213, 231, 212, 232, 312, 321, 313,
Angle 323 1: The EulerAngleSequence field allows the user to define the Euler sequence used in
Sequence rotating from t h i body-fixed to the inertial axes. For exaniple, if EulerAngleSequence is
selected as 321, then the first rotation is a 3 rotation through EulerAnglel, the second
rotation is a 2 rotation through EulerAngle2, ancl the third rotation is a 1 rotation through
EulerAngle3. Units: N/A.
EulerAnglel Default: 0. Options:[Real Nunlber]: EulerAnglel is one of three Euler angles that can be
used to define the initial conditions of a spacecraft. EulerAnglel corresponds to the first
rotation performed in the sequence that goes from the spacecraft body frame to the inertial
frame. For exaniple, if the EulerAngleSequence field is set to 321,the first rotation from
the body to the inertial frame would be a 3-rotation throllghEulerAngle1. Units: degrees.
EulerAngle2 Defadt: 0. Options:[Real Nlmnlber]: EulerAngle2 is one of three Euler angles that can be
11sed to define the initial conditions of a spacecraft. EulerAngle2 corresponds to the second
rotation performed in the sequence that goes from the spacecraft body frame to the inertial
frame. For example? if the EulerAngleSequence field is set to 321,the second rotation from
the body to the inertial frame wolild be a 2-rotation throllghEulerAngle2. Units: degrees.
EulerAngle3 Default: 0. Options:[Real Nllnlber]: EulerAngle3 is one of three Elder angles that can be
used to define the initial conditions of a spacecraft. EulerAngle3 corresponds to the third
rotation performed in the sequence that goes from the spacecraft body franle to the inertial
franie. For example, if the EulerAngleSequence field is set to 321,the third rotation from
the body to the inertial frame would be a 1-rotation throllghEulerAngle3. Units: degrees.
35 CXAPTEPL 2. UB.7ECT F7ELLDS:QUICK LOOK-UP TABLES
Table 2.4: (Fields Associated with Spacecraft Attitude State
(Attitude Tab) ....continued)
q3 Defadt: 0. Options:[Real Nunlber]: The q3 parameter is the third elenlent of the quaternion.
GWIAT nornlalizes the quaternion to he of length 1. Units: degrees.
DCMll Defa~lt:1. Options:[Real N~mlber]:The DCMll parameter is the upper left component of
the direction cosine matrix that rotates from the spacecraft body frame to the inertial franle.
GMAT normalizes the attitude matrix to have a determinant of 1. The default DCM matrix
is the identity matrix. Units: None.
DCM12 Default: 0. Options:[Real Number]: The DCM12 parameter is the Rlz conlponent of the
direction cosine matrix that rotates from the spacecraft body franle to the inertial frame.
GMAT nornlalizes the attitude nlatrix to have a determinant of 1. The default DCWI nlatrix
is the identity matrix. Units: None.
DCM33 Defadt: 1. Options:[Real Numlber]: The DCM33 parameter is the Rg3 conlponent of the
direction cosine matrix that rotates from the spacecraft body franle to the inertial frame.
GMAT nornlalizes the attitude matrix to have a determinant of 1. The default DCM nlatrix
is the identity matrix. Units: None.
Pressure Defallt: 1500. Optiom: [Real Nlmnlber > 01: The Pressure field is the
pressure of the fuel in the tank. Units: kPa.
Temperature Default: 20. Options: [Real Nlmmber]: The Temperature field is the tenl-
perat~mreof the fuel in the tank. Units: C.
Volume Defallt: 0.75. Options: [Real Number > 01: The Volume field is the vollmle
of the tank. Units: m".
FuelDensity Default: 1260. Options: [Real Number > 01: The FuelDensity parameter
is the fuel den~ity.Units: kg/m3
Origin Default: Earth. Options: [Sun, Mercury, Venus, Earth, Luna, Mars,
J u p i t e r , Saturn, Uranus, Neptune, Pluto 1:
The Origin field allows the
user to define a local origin for a thruster. Note that there is a coupling
between the Origin paranleter and the CoordinateSystem parameter for
a thruster. Only one of the two can be specified. Units: N/A.
Tank Default: None. Options: [Tank Name]: The Tank field specifies which tank
the thruster draws propellant from.
Drag.F107 Default: 150. Options: [ Real Nlinlber 2 0 1. The F107 field allows
you to set the F10.7 solar flux value used in computing atmospheric
density. FI0.7 is the solar radiation at a wavelength of 10.7 cm.
Units: W/m2/Hz
SRF' Default: Off. Options: [ On, Off 1. The SRF'field allows the user to
include the force due to solar radiation pressure in the total sun1
of forces. Units: N/A.
Accuracy Defadt: le-11. Options: [ Real Nunher > 0 1. The Accuracy field is used
to set the desired accuracy for an integration step. Units: N/A. When you
set a value for Accuracy, GMAT uses the nlethod selected in ErrorControl
field on the Force Model, to deternline a metric of the accuracy. For each step,
the integrator ensures that the accuracy, as calculate using the method define
by ErrorControl, is less than the limit defined by Accuracy. If an integrator
exceeds MaxStepAttempts trying to meet the requested accuracy, and error
message is thrown and propagation stops.
MinStep Default: .001 (sec). Options: [ Real Nlinlber > 0, MinStep 5 MaxStep 1. The
MinStep field is used to set the nlininllinl allowable step size. Units: sec.
MaxStep Default: 2700.0 (sec.). Options: [ Real Nlinlber > O! MinStep 5 MaxStep 1.
The MaxStep field is wed to set the nlaxinllinl allowable step size. Units: sec.
.. ..
2.2. PROPAGATOR FIELDS
Script Exanlples
$4 CHAPTER 2. CISJECT FIELDS: QIjIC'K LOOK-UP TABLES
Ta,t)le 2.8: FIeltls Assoc.ia,t,edwii.11 a.rl Jt1t;egrai or....(c:)r~t.i~:urd)
2.3 Maneuvers
Axes Default: VNB . Options: [VNB,MJ~OOOE~]: The Axes field, together with
the Origin field, describe the coordinate systenl in which an inlplilsive
nlanellver is applied. If VNB is chosen for Axes, a local coordinate system is
created sllch that the x-axis points in the velocity direction of the spacecraft,
with respect to the point defined by Origin,the y-axis points in the normal
direction of the spacecraft with respect to Origin,and the z-axis completes
the right-handed set. Units: N/A.
Element 1 Default: 0. Options: [Real Nl~mber]:The Elementl field allows the user
to define the first elenlent of the inlpulsive maneuver vector. Elementl is
s if VectorFormat is Cartesian. Elementl is the magnitude of the burn
if VectorFormat is spherical. Units: knl/sec.
.'
.: . . :
2.4. SOLT/rER.FIELDS 45
Default: 0. Options: ]Real Number]: The Element3 field allows the user
to define the second elenlent of the inlp~~lsive
maneuver vector. Element3
is z if VectorFormat is Cartesian. Units: knl/sec.
Axes Default: VNB . Options: [VNB, MJ2000Eq 1: The Axes field, together with
the Origin field, describe the coordinate systenl in which a finite maneuver
is applied. If VNB is chosen for Axes, a local coordinate systenl is created
such that the x-axis points in the velocity direction of the spacecraft. with
respect to the point defined by Origin, the y-axis points in the normal
direction of the spacecraft with respect to Origin, and the z-axis conlpletes
the right-handed set. Units: N/A.
Dif f Min Default: le-8 . Options: [Real Nuniber > 01: The Dif fMinChange parameter sets the lower
Change limit on the perturbation used in MATLAB's finite differencing algorithm. For fnlincon?
you don't specify a single pertlirbation value, but rather give MATLAB a range, and it uses
an adaptive algorithm that attempts to find the optinlal perturbatin. Units: N/A .
MaxFunEvals Default: 1000. Options: [Integer > 01: The MaxFunEvals paranleter allows the user to set
the niaxinlulnl nllniber of cost function evahlations in an attempt to find an optimal sohltion.
This is equivalent to setting the nlaxinlunl nlmiber of passes through an optimization loop
in a GMAT script. If a solution is not foumcl before the n~nxiniunifunction evahiations,
fnlincon outputs an ExitFlag of zero, and GMAT continues. Units: N/A.
MaxIter Default: 400. Options: [Integer > 01: The MaxIter paranieter allows the user to set the
nlaxinlllnl allowable nlmiber of optiniizer iterations. Depending upon the nature of the
problem, and whether gradients are provided, it nlay take many filnction evahiations for
each optimizer iteration. The MaxIter paranleter allows the user to control the nlaxinlum
function evahlations? and nlaxinl~lnliterations independently. Units: N/A .
TolX Defadt: 1e-4. Options: [Real Nllnlber > 01: The TolX parameter is the termination toler-
ance on the vector of independent variables, and is used only if the user sets a value. Units:
N/A.
TolFun Default: le-4. Options: [Real Nunlber > 01: The TolFun parameter is the convergence
tolerance on the cost function value. Units: N/A .
TolCon Default: le-4 . Options: [Real Nlinlber > 01: The TolCon parameter is the convergence
tolerance on the conqtraint fimctions. Units: N/A .
Derivative Defadt: o f f . Options: [on, o f f ] : If the Derivativecheck option is set to on? then fnlincon
Check will calclilate the gradients of the cost and constraints using finite differncing, and compare
the values to the vahles calclilated analytically. Units: N/A .
Diagnostics Default: o f f . Options: [on, off]: The Diagnostics paranleter tells fnlincon to output
general inforniation on the problenl by writing diagnostic inforniation to the MATLAB
prompt. The diagnostic infornlation contains the nuniber of independent variables, the
nlinlber and types of constraints? the sources for derivatives and other information. Units:
N/A .
GradObj Default: o f f . Options: [on? off]: The GradObj parameter allows the user to tell fnlincon
to use finite differencing to calculate the cost function derivative, or to use the cost function
derivative provided by the user. Units: N/A .
GradConstr Default: o f f . Options: [on, off]: The GradConstr paranleter allows the user to tell fnlin-
con to use finite differencing to calculate the constraint function derivatives, or to use the
constraint function derivatives provided by the user. Units: N/A.
".. .. ..'
2.5. PLOTS -43-3 REPORTS 47
Table 2.11: (Fields Associated with the fnlincon
Solver....continued)
UpdatePlotFrequency Defallt: 50. Options: [Integer > 11: The UpdatePlotFrequency field al-
lows the user to specify how often to lipdate an OpenGL plot is lipdated
with new data collected during the process of propagating spacecraft and rum-
ning a mission. Data is collected for a plot according the value defined by
DataCollectFrequency. An OpenGL plot is updated with the new data, ac-
cording to the vahie set in UpdatePlotFrequency. If UpdatePlotFrequency is
set to 10, then the plot is lipdated with new data every ten integration steps.
Units: Integration Steps.
NmPointsToRedraw Default: 0. Options: [Integer > 01: When NmPointsToRedraw is set to zero,
all ephemeris points are drawn. When NmPointsToRedraw is set to a positive
integer, say 10 for example, only the last 10 collected data points are drawn. See
DataCollectFrequency for explanation of how data is collected for an OpenGL
plot. Units: Integration Steps.
WireFrame Default: Off . Options: [ On, Off 1: When the WireFrame field is set to On,
celestial bodies are drawn using a wirefranle model. When the WireFrame field
is set to Off, then celestial bodies are drawn using a full map. Units: N/A.
EclipticPlane Default: Off. Options: [0n,0ff , Note: Only allowed for OpenGL plots with
Coordinate Systems that use the MJ2000Eq axis system]: The EclipticPlane
field allows the user to tell GMAT to draw a g i d representing the ecliptic plane
in an OpenGL plot. Note, the ecliptic plane can currently only be drawn for
plots whose coordinate systenl uses the MJ2000Eq axis system. Units: N/A .
XYPlane Default: On. Options: [On,Off]: The XYPlane flag allows the user to tell GMAT
to draw a grid representing the XY-plane of the coordinate system selected
under the Coordinatesystem field of the OpenGL plot. Units: N/A .
Axes Defallt: On. Options: [On,Off]: The Axis flag allows the user to tell GMAT to
draw the Cartesian axis systenl associated with the coordinate systenl selected
under the Coordinatesystem field of an OpenGL plot. Units: N/A .
Grid Default: On. Options: [On,Off]: The Grid flag allows the user to tell GMAT to
draw a grid representing the longittide and latitude lines celestial bodies added
to an OpenGL plot. Units: N/A .
. .. .'
2.5. PLOTS -4ND REPORTS 49
EarthSunLines Default: On. Options: [On,Off]:The EarthSunLines allows the user to tell
GMAT to draw a line that starts at the center of Earth and points towards the
Slm. Units: N/A .
Remove Defadt: No Default. Options: [Any object included in the Add list 1: The Re-
move subfield renioves a spacecraft,celestial body, libration point, or barycenter
froni a plot. The user can remove any object that has been added to a plot by
using the name wed to add the object. Units: N/A.
ViewUpAxis Default: Z. Options: [X, -X> Y> -Y, Z, -Z]: The ViewUpAxis allows the user to
define which axis of the ViewUpCoordinateSystem that will appear as the up di-
rection in an OpenGL plot. See the conlnients under ViewUpCoordinateSystem
for niore details of fields wed to determine the lip direction in an OpenGL plot.
Units: N/A.
UseInitialView Default: On. Options: [On,Off]: The UseInitialView field allows the user
to control the view of an OpenGL plot between nililtiple runs of a mission
sequence. The first tinie a specific OpenGL plot is created? GMAT will auto-
niatically use the view as defined by the fields associated with View Definition,
View Up Direction, and Field of View. However, if the user changes the view
using the mouse, GMAT will retain this view upon rerunning the mission if
UseInitialView is set to false. If UseInitialView is set to true, the view
for an OpenGL plot will be returned to the view defined by the initial settings.
Units: N/A.
-.. .. ...
2.5. PLOTS ,4ND REPORTS "1
Precision Defadt: 16. Options: [Integer > 01: The Precision field allows the user to set
the precision of the variable written to a report. Units: Same as variable being
reported.
WriteReport Default: On . Options: [On, Off]: The WriteReport field specifies whether to
write data to the report FileName. Units: N/A.
WriteHeaders Default: On . Options: [On, Off]: The WriteHeaders field specifies whether to
include headers that describe the variables in a report. Units: N/A.
LeftJustify Default: On. Options: [On, Off]: When the Left J u s t i f y field is set to On, then
the data is left justified and appears at the left niost side of the coll~nln.If the
Lef t J u s t i f y field is set to Off then the data is centered in the column. Units:
N/A.
Columnwidth Default: 20. Options: [ Integer > 01: The Columnwidth field is used to define
the width of the data cohmlns in a report file. The value for ColumnWidth is
applied to all columns of data. For example, if ColumnWidth is set to 20, then
each data cohmin will be 20 white-spaces wide. Units: Characters.
Table 2.14: Fields Ass!:c.i;3.t.ecl wit 11 R,el):)rt; Files.. ..[c:or~t,in~letl)
Add Default: Def aultSC .EarthMJ2000Eq.X. Options: [Any user variable, array ele-
ment, or spacecraft parameter]:: The Add field allows the user to acld dependent
variables to an xy-plot. All dependent variables are plotted on the y-axis vs the
independent variable defined by IndVar. To define multiple dependent vari-
ables, they sho~lldbe inchlded in curly braces. For example, MyXYPlot .Add
= {Default SC .EarthMJ2000Eq.Y , Def aultSC .EarthMJ2000Eq. Z] ): . The
GUI's Selected field is the equivalent of the script's Add field. In the event
of no Add conlnland or no objects in the Selected field, GMAT sholllcl run
without the XYPlot and a warning message displayed in the message window.
The following warning message is sufficient: XYPlot will be turned off.
No object has been selected for plotting. Units: N/A.
Grid Default: On . Options: [ On, Off 1: When the Grid field is set to On, then a grid
is drawn on an xy-plot. When the Grid field is set to Off then a grid is not
drawn. Units: N/A.
SolverIterations Defadt: Off. Options: [On! Off]: The SolverIterations field determines
whether or not perturbed trajectories are plotted during a solver (Targeter,
Optimize) sequence. When SolverIterations is set to On! solver iterations
are shown on the plot. When SolverIterations is set to Off, solver iterations
are not shown on the plot. Units: N/A.
ShowPlot Default: true. Options: [ true, false]: The ShowPlot field allows the user to
turn off a plot for a particular run?without deleting the plot object, or removing
it from the script. If you select true! then the plot will be shown. If you select
false, then the plot will not be shown. Units: N/A.
EphemerisFile Defa~lt: Same as startup file. Options:[ File path and file name consistent
with operating systenl 1: The EphemerisFile field allows the user to specify
the location and name of the file for each type of ephenleris GMAT supports.
For example, if Ephemeris is set to DE405, you can set the path for a DE405
file wing SolarSystem.EphemerisFi1e = c :/MyPath/MyDE405. f i l e . Units:
N/A.
Secondary Default: Earth. Option?: [ Sun, Mercury, Venus? Earth, Luna, Mars, J u p i t e r ,
Saturn, Uranus? Neptune? Pluto or any Barycenter. ( The Primary and
?
Secondary bodies cannot be the same )]: The Secondary field tells GMAT
which body to consider the secondary body in the calclllation of the location
of a libration point. Units: N/A.
Point Default: L1. Options: [LI? L2, L3? L4? ~ 5 1 :The Point field specifies which
libration point the object corresponds to. Units: N/A.
54 CHAPTER 2. OB.JEC7 -FTELL')S:QIiICK LOOK- UP TABLES
Default: 398600.4414. Options: [Real Nuinher > 01: The Mu field allows the
user to define the gravitational paranlter of a celestial body. Units: km3/sec2.
Equatorial Radius Default: 6378.1363. Options: [Real Nlinlber > 01: The EquatorialRadius field
allows the user to define the equiatorial radius of a celestial bocly. Units: knl.
Flattening Defadt: 0.00335270. Options: [Real Nunlber]: The Flattening field allows
the user to define the mass of a celestial body. Units: None.
SMA Default: 149653978.978377. Options: [Real Nuinlber # 01: The SMA field allows
the user to define the senlinlajor axis of a celestial body's orbit about its central
body. (Only used when the user selects Analytic for the Ephemeris field on
the Solar System.) Units: knl.
ECC Default: 0.017046. Options: [Real Nilnlber 2 01: The ECC field allows the
user to define the eccentricity of a celestial body's'orbit abouit its central body.
(Only used when the user selects Analytic for the Ephemeris field on the Solar
System.) Units: None.
INC Default: 23.439034. Options: [Real Numiber]: The INC field allows the user to
define the inclination of a celestial body's orbit about its central body. in the
FK5 coordinate system. (Only used when the user selects Analytic for the
Ephemeris field on the Solar System.) Units: deg.
RAAN Default: 0.000186. Options: [Real Numiber]: The RAAN field allows the izser
to define the right ascension of the ascending node of a celestial body's orbit
about its central body. in the FK5 coordinate system. (Only used when the
ulser selects Analytic for the Ephemeris field on the Solar Systenl.) Units: deg.
26 5OLAii SYSTEM, CELESTIAL BODIES ,4ND OTHER SP-ACE P(1IIQRITS 53
Default: 358.127085. Options: [Real Number]: The TA field allows the user
to define the true anomaly of a celestial body's orbit about its central body.
(Only wed when the user selects Analytic for the Ephemeris field on the Solar
System.) Units: deg.
Nut a t ionUpdat e Default: 60. Option.: [Real Numlber > 01: The NutationUpdateInterval
Interval field, on the Earth Celestial Body, determines how often GMAT updates the
Nutation matrix wed in FK5 reduction. If NutationUpdateInterval is set to
zero, the Nutation is updated every tinle a request is made to calculate the
orientation of the Earth. If NutationUpdateInterval is set to a real nlinlber
greater than zero? then GMAT only lipdates the Nutation matrix if the number
of seconds defined by Nut a t ionUpdat e I n t e r v a l have elapsed since the last
request for the Earth's orientation data. Units: sec.
r
la.ble 2.20: Fields Associated with a Ci;orilinate S>-steni
7
Primary Default: Earth . Options: [Any celestial body, barycenter, libration point, or
spacecraft, except the object chosen as in the Secondary field 1: The Primary
field is only active when Axes is set to ObjectReferenced. Otherwise, GMAT
ignores the Primary field. Units: N/A .
56 CHAPTER 2. OB,TECT FIELDS: QIJIC'K LOOK-UP TABLES
Table 2.20: (Fields Associated with a Coordinate Sys
tem. ..continued)
Epoch Default: 21545.0. Options: [ Real Nliniber 2 01: The Epoch field is only active
if the Axes field is defined by an epoch referenced axis system: MOEEq, MOEEc?
TOEEq, TOEEc. Units: Days.
XAxis Default: R. Options: [ R, -R, V, -V, N, -N]: The X field is only active if the Axes
field is set to ObjectReferenced. Otherwise, GMAT ignores the X field. Units:
N/A.
YAxis Default: No Default. Options: [R, -R, V ? -V? N, -N]: The Y field is only active
if the Axes field is set to ObjectReferenced. Otherwise, GMAT i ~ o r e thes Y
field. Units: N/A.
ZAxis Default: N . Options: [R, -R, V, -V, N? -N]:The Z field is only active if the Axes
field is set to Obj ectRef erenced. Otherwise, GMAT ignores the Z field. Units:
N/A.
3.1 Propagation
Scriptsyntax
...
Propagate Mode BackProp ~ r o ~ a ~ a t o r ~(~at~istl,{~topCond~istl))
ame
BackPropPropagatorName (SatListN,{~top~ond~ist~))
Mode Default: None. Options: [ Synchronized or None 1: The Mode option allows the
user to set the propagation mode for the propagator that will affect all of the
spacecraft added to the SatListN option. For example, if synchronizecl is selected,
all spacecraft are propagated at the same step size. The Propagate Mode GUI field
stores all the data in Mode. In the script, Mode is left blank for the None option
and the text of the other options available is used for their respective modes. Units:
N/A.
SatListN Default: DefaliltSC. Options: [ Any existing spacecraft or formations, not being
propagated by another propagator in the same Propagate event. Multiple spacecraft
must be expressed in a comnla delimited list format. 1: The SatListN option allows
the user to enter all the satellites and/or fornlations they want to propagate using
the PropngntorNnme propagator settings. The Spacecraft List GUI field stores all
the data in SatListN. Units: N/A.
Table 3.1 : Propagate Conlnland . . . continued
StopCondListN Default: 8640.0. Options: [ Real Nlinlber, Array element, Variable, spacecraft
/Condition paranleter, or any user defined parameter 1. The StopCondListN option allows
the user to enter the propagator stopping condition's value for the StopCondListN
Parameter field. Units: Dependant on the condition selected.
Script Examples
% Single spacecraft propagation with one stopping condition
% Syntax #1
Propagate DefaultProp(DefaultSC, {DefaultSC.ElapsedSecs = 8640.0));
% Multiple spacecraft propagation with nlultiple stopping conditions and propagation settings
% Syntax #1
Propagate P r o p l ( S a t l , S a t 2 , {Satl.ElapsedSecs = 8640.0, Sat2.MA = 90)) ...
Prop2 (Sat3, { ~ a t 3TA . = 0.0)) ;
% Multiple spacecraft propagation with nniltiple stopping conditions and propagation settings
% Syntax #2
Propagate Prop1 ( S a t l , Sat2) {Satl .ElapsedSecs = 8640 .O, Sat2 .MA = 90) ...
Prop2 (Sat31 (Sat3. TA = 0.0) ;
3.2 Control Flow
Script Syntax
(Simple If statement)
If <logical expression>;
<Statements>;
EndIf ;
(Compound If statement)
If <logical expression> 1 <logical expression> & <logical expression>;
<Statements>;
EndIf ;
(If-Else statement)
If <logical expression>;
<Statements>;
Else;
<Statements>;
EndIf ;
Defadt: N/A. Options: [ Any script line that can be in the mission sequence 1.
Units: N/A.
Default: N/A. Options:[N/A]. The I option allows the user to set an OR oper-
ator in between <logical expression>s. Units: N/A.
Defadt: N/A. Options:[N/A]. The I option allows the user to set an AND
operator in between <logical expression>s. Units: N/A.
Script Examples
If DefaultSC.ElapsedDays < 1;
Propagate Defaultprop( DefaultSC , { DefaultSC.ElapsedDays = 0.01 ));
EndIf:
Scrint Svntax
Array, Variable, Spacecraft Parameter or any other user defined parameter. Units:
N/A.
Default: N/A. Options:[ Any script line that can be in the mission sequence 1.
Units: N/A.
Default: N/A. Options:[N/A]. The I option allows the user to set an OR operator
in between <logical expression>s. Units: N/A.
Default: N/A. Options: [N/A]. The I option allows the user to set an AND operator
in between <logical expression>s. Units: N/A.
Script Examples
While Defau1tSC.ElapsedDays < 1;
Propagate Defaultprop( DefaultSC , { DefaultSC.ElapsedDays = 0.01 1);
EndWhile;
Script Syntax
Conlnland Description
The for loop is a control flow statement that allows portions of code to be executed iteratively using an
explicit loop variable (Wikipedia). GMAT for loops are three-expression loops that allow the user to set
the initial value of the loop variable, its increment, and the test to exit the loop. A paranleter nlust be
defined explicitly using a Create Variable statenlent or GUI eqliivalent before it can be used in a for loop
conlmand statement. The only parameter type that can be used as a loop variable is the variable type.
The parameters used to define S t a r t , Increment: and End can be any of the following GMAT parameters:
integer??(real)?variable, array element, spacecraft property.
GMAT allows the for loop variable to be changed inside the loop by the user, and the resulting behavior of
the for loop is equivalent to the behavior defined in ANSI C. If a change is made to the loop variable inside
of the loop, if this change causes the exit test to be violated, GMAT will exit the for loop.
Start Defadt: 1. Options: [ Real Nunlber, Array element, Variable, or any user defined
paranleter 1. The S t a r t option allows the user to set the starting nunleric range
vahie of the For Loop. S t a r t can be equal to End, but the For Loop will not execute.
Units: N/A.
Increment Default: 1. Optiom: [ Real Nlinlber, Array element, Variable, or any user de-
fined paranleter 1. The Increment option allows the user to set the numeric range
increment value of the For Loop. When the Increment option is left out of the
script syntax the default value is used. If an Increment value of 0 is used, the
For Loop sholild not execute b ~ i tGMAT sho~ildcontinue to run. If End>Start
and Increment < O? then the For Loop should not execute. If Start>End and
Increment > O? then the For Loop shodd not execute. Units: N/A.
End Default: 10. Options: [ Real Nunlber, Array, Variable, or any user defined param-
eter 1. The End option allows the user to set the ending numeric range value of the
For Loop. End can be equal to S t a r t : but the For Loop will not execute. Units:
Script Exanlples
% Output the value of the For loop Variable to a file
62 (;HAPTER's."' CORf&IAi"\rDSAND EVENTS
Table 3.4: For Conlnland . . . continued
For I = 1:l:lO;
GMAT testVar = I;
Report DefaultReportFile I;
EndFor ;
3.3. SOLVER-RELATED
Scriat Svntax
Target So lverName ;
<Statements>
EndTarget;
<Statements> Default: None. Options:[ Any non-targeter and non-optimizer command lines used
in the nlission sequence, .cis well as the targeter dependent conlmand lines Achieve
and Vary.]: Units: N/A.
Scrint Exanlnles
% Beginning and ending syntax for the Target command
Target DefaultDC;
EndTarget;
S c r i ~ Svntax
t
Optimize SolverName;
<Statements>
Endoptimize;
Default: None. Options:[ Any non-targeter and non-optimizer conlmand lines ~lsed
in the mission sequence, m well as the optimizer dependent conlnland lines Vary.
NonLinearConstraint, and Minimize. ] : Units: N/A.
Script Examples
% Beginning and ending syntax for the Optinlize conmand
Optimize DefaultDC;
64 ( X A P TEE 3. COA13TAATDSAIL'D EVEYTS
Table 3.6: Optinlize Conlnland . . . continued
Endoptimize;
Argl Default: 42165. Options: [ Real Number, Array element, Variable, or any user
defined paranleter that obeys the conditions of Chapter ?? for the selected Goal ]
The Argl option is the desired value for Goal after the solver ha? converged. Units:
N/A.
Tolerance Default: 0.1. Options: [ Real Nlinlber, Array element, Variable, or any wer de-
fined parameter > 0 1: The Tolerance option sets Arg2. Arg2 is the convergence
tolerance for Argl. Units: N/A.
SolverName Default: Defa~iltDC.Options: [ Any user defined differential corrector 1: The Solver-
Name option allows the user to choose which solver to assign to the Achieve conl-
nland. Units: N/A.
Script Exanlples
SolverName Defadt: DefadtDC. Options: [ Any user defined solver 1: The SolverName option
allows the user to choose which solver to assign to the vary command. Units: N/A.
InitialGuess Defadt: 0.5. Options: [ Real Nlmlber, Array element, Variable? or any user defined
parameter that obeys the conditions of Chapter ?? for the selected Variable]: The
InitialGuess option allows the user to set the initial guess for the selected Variable.
Units: h / s .
Lower Default: 0.0 . Options: [ Real Nunher, Array element, Variable, or any user defined
paranleter (Upper > Lower ) 1: The Lower option allows the user to set Arg3 to the
lower bound of the quantity being varied. Units: N/A.
Default: 3.14159 . Options: [ Real Nunlber, Array element, Variable: or any user
defined paranleter (Upper > Lower ) 1: The Upper option allows the user to set
Arg4 to the upper bound of the quantity being varied. Units: N/A.
Perturbat ion Default: le-4 . Options: [ Real Nlmlber, Array element, Variable, or any user
defined paranleter > 0 1: The Perturbation option is set by specifying a value for
Argl. The value of Argl is the perturbation size in calculating the finite difference
derivative. Units: N/A.
Defadt: 0.2 . Options: [ Real Nuniber, Array element, Variable, or any user defined
parameter > 0 1: The MaxStep option is set by specifying a value for Arg2. The
value of Arg2 limits the size of the step taken during an interaction of the differential
corrector. Units: N/A.
Additive Scale Default: 0 . Options: [ Real Nunher, Array element, Variable, or any user defined
Factor parameter 1: The AdditiveScaleFactor Field is 1isec1 to nondinlensionalize the
independent variable. fnlincon sees only the nondinlensional form of the variable.
The nondinlensionalization is performed using the following equation: z,, = ( z d-
a ) / m . (z,, is the non-dimensional parameter. zd is the dimensional parameter.
a = additive scale factor. m = nlliltiplicative scale factor.) Units: N/A.
Multiplicative Scale Default: 1.0 . Options: [ Real Nlmiber, Array element, Variable, or any user
Factor defined parameter 1: The MultiplicativeScaleFactor Field is used to nondimen-
sionalize the independent variable. fnlincon sees only the nondinlensional form of
the variable. The nondinlensionalization is performed using the following equation:
z,, = ( z d - a ) / m . (z,, is the non-dimensional paranleter. zd is the dinlensional
parameter. a = additive scale factor. m = multiplicative scale factor.) Units: N/A.
Script Exanlples
% InipuLsive Burn Vary Conlmand
Vary DefaultDC(Default1B.V = 0.5, {perturbation = 0.0001, MaxStep = 0.2, .. .
Lower = 0, Upper = 3.14159)) ;
Script Syntax: Minimize Opt imizerName (Arg )
. .
C H A P T E ~'3."' CO&IhfAi"\DS AND ESiEWTS
Table 3.9: IbIininlize Coninland . . . continued
Script Examples
% IbIininlize the eccentricity of Sat, using fminconSQP
Minimize fminconSQP (Sat.ECC) ;
<logical expression> Default: DefaultSC.SMA = 7000. Options:[ Argl 5 Arg2 where 5 can be >=
, <=, = 1. The logical expression field allows the user to specify the constraint to
be satisfied upon convergence of the solver given by OptzmizerName. Argl and
Arg2 can be any of the following: Real Number, a 1-D Array (collinm vector),
Array element, Variable, Spacecraft Parameter or any other numeric user defined
parameter. If Argl is a 1-D Array, then Arg2 n n s t be a 1-D Array with the same
dinlensions and vice-versa. Units: N/A.
Script Examples
% Constrain the SMA of Sat to be 7000 km, using fminconSQP
NonLinearConstraint fminconSqP( Sat.SMA = 7000 ) ;
% Constrain the SMA of Sat to be less than or equal to 7000 km, using fminconSqP
NonLinearConstraint fminconSqP( Sat.SMA <= 7000 ) ;
% Constrain the SMA of Sat to be greater than or equal to 7000 knl, using fminconSqP
NonLinearConstraint fminconSQP( Sat.SMA >= 7000a ) ;
70
3.4 Miscellaneous
BurnName Default: DefaultIB. Options:[ Any iniplilsive burn existing in the resource tree or
created in the script]: The BurnName field allows the user to choose between any
previollsly created iniplllsive burn. As an exaniple, to maneuver Def aultSC 11s-
ing Def aultIB, the script line wollld appear Manevuer Def aultIB(Defau1tSC).
Units: N/A.
Spacecraf tName Default: DefaultSC. Options:[ Any spacecraft existing in the resource tree or cre-
ated in the script]: The Spacecraf tName field allows the mer to select which space-
craft to maneuver using the nianellver selected in the BurnName field.
Units: N/A.
Script Examples
% Inlplllsive Burn
Maneuver DefaultIB(Defau1tSC);
Spacecraf tName Defmllt: DefaultSC. Options:[ Any spacecraft existing in the reso~lrcetree or cre-
ated in the script]: The SpacecraftName option allows the user to select which
spacecraft to maneuver using the maneuver selected in the ManeuwerName option.
Units: N/A.
Script Examples
% Default BeginFiniteBlirn syntax
BeginFiniteBurn DefaultFB(Defau1tSC);
Script Syntax: EndFiniteBurn ManeuverName (Spacecraf tName ) ;
Spacecraf tName Default: Def aultSC. Options:[ Any spacecraft existing in the resource tree or cre-
ated in the script]: The SpacecraftName option allows the user to select which
spacecraft to nianellver using the maneuver selected in the ManeuverName option.
Units: N/A.
Script Examples
% Default EndFiniteBiirn syntax
EndFiniteBurn DefaultFB(Defau1tSC);
Script Syntax
Input List Default: None. Options:[ Variables, Arrays, S/C Paranlters, any other user-defined
parameters, or blank. Multiple inputs nllist be expressed in a conirna delimited list
format. 1: The InputList option allows the mser to set the input of Function to a
user defined parameter. Units: N/A.
Function Default: None. Options:[ GMAT of Matlab Function 1: The Function option allows
the user to set the filnction that will be called in a specific location of the mission
sequence. The filnction has to be defined before it can be used in the CallFllnction
Command. Units: N/A.
Script Exanlples
Table 3.14: CallF~lnctionConlnland . . . continl~ed
Default: On. Options:[ On or Off 1: The Arg option allows the user to turn off or
on the data ol~tplitto a Plot/Report. Units: N/A.
Script Exanlples
% Thrn off Report file for the first day of propagation
Toggle ReportFilel Off
Propagate DefaultProp(DefaultSC, Defau1tSC.ElapsedDays = 1);
Toggle ReportFilel On
Propagate DefaultProp(DefaultSC, DefaultSC.ElapsedDays = 1);
% Turn off XYPlot and Report file for the first day of propagation
Toggle XYPlotl ReportFilel Off
Propagate DefaultProp(DefaultSC, DefaultSC.ElapsedDays = 1);
Toggle XYPlotl ReportFilel On
Propagate DefaultProp(DefaultSC, Defau1tSC.ElapsedDays = 1);
Script Syntax: Report ReportName D a t a L i s t
DataLis t Defadt: N/A. Options: [ Spacecraft parameter, Array, Variable, String, or any other
single user defined parameter 1: The DataList option allows the user to output
data to the Filename specified by the ReportName. Multiple objects can be in the
D a t a L i s t when they are separated by spaces. Units: N/A.
Table 3.16: Report Conlmand . . . continl~ed
Scrint Exanlnles - -
Scrint Svntax
BeginScript ;
<Statements>;
EndScript;
Option Option Description
<Statements> Defadt: N/A. Options: [ Any valid line of GMAT script 1. Units: N/A.
Script Exanlples
% Assignment conlnland inside Script Event
BeginScript;
GMAT testVar = 24 ;
EndScript;
Conlnland Description
The Pause conlnland allows the user to pause a running GMAT script.
Scrint Exanlnles
% Pame between propagation sequences
Propagate DefaultProp(Defau1tSC) Defau1tSC.ElapsedSecs = 8640.0;
Pause ;
Propagate DefaultProp(Defau1tSC) DefaultSC.ElapsedDays = 10.0;
Conlnland Description
The Stop conlnland allows the user to stop a running GMAT script.
Script Examples
% Stop between propagation sequences
Propagate DefaultProp(Defau1tSC) Defau1tSC.ElapsedSecs = 8640.0;
Stop;
Table 3.19: Stop Conlnland . . . continued
Script Examples
% Save DefaultSC data after a 1 day propagation
Propagate DefaultProp(DefaultSC, Defau1tSC.ElapsedDays = 1);
Save DefaultSC;
% Save Inlplilsive Burn and DefaultSC data after a Targeter sequence
EndTarget;
Save DefaultIB DefaultSC;
Index
AAttitudeRateStateType,35 EarthSunLines,49
AOP, 13:31,55 EclipticPlane,48
AZI, 14,32 EndFiniteBurn,71
Accuracy, 21>42 EphemerisFile,53
Add,49,51>52 EphemerisUpdateInterval, 53
AnalyticModel,53 Ephemeris,53
AngularVelocityX,36 Epoch,12,30,56
AngularVelocityY,36 EquatorialRadius,54
AngularVelocityZ,36 Errorcontrol,20,42
AnomalyType,12,30 EulerAnglel,35
Att itudecoordinateSystem,35 EulerAngle2,35
AttitudeMode,35 EulerAngle3,35
AttitudeStateType,35 EulerAngleRatel,36
Axes, 44,45,48,55 EulerAngleSequence,35
Axis, 37 FPA,14>32
Backwards Propagation,57 FileName,51
BeginFiniteBurn,70 FixedFovAngle,51
BodyNames,54 Flattening,54
BurnScaleFactor,45 For,61
CallFunction,71 FuelDensity?37
Cd?16:34 FuelMass,37
CentralBody,18,40 Functionpath,56
Columnwidth,51 GradConstr,46
Coordinatesystem,11>29,49 Gravity.PrimaryBody.Degree, 19,40
Cr,16,34 Gravity.PrimaryBody.Mode1, 19,40
DCM11,36 Gravity.PrimaryBody.Order, 19>40
DCM12>36 Grid,48,52
DCM33>36 HA,13,31
DECV,15,33 INC,13,31,54
DEC?14,32 If,59
DataCollectFrequency,48 IndVar,52
DateFormat,12,30 Initial Value,66
Degree,19,40 InitialEpoch,54
Derivativecheck,46 Initialstepsize,21,42
Diagnostics,46 Integrators
DiffMaxChange,46 Script Fields,21,42
DiffMinChange,46 LeftJustify,51
Display,46 Libration Point,53
Drag.AtmosphereModel,20?41 Lower,66
Drag.F107A?20,41 MA, 13,31
Drag.Fl07,20,41 Maneuver,70
Drag.MagneticIndex, 20,41 MaxFunEvals,46
DragArea,16,34 MaxIter,46
Drag,19>41 MaxStepAttempts,21,43
DrawWireFrame,48 MaxStep,21: 42,66
DryMass,16: 34 Maximum Iterations,47
EA, 13: 31 MeanLongitude, 15:33
ECC? 13,31>54 MinintegrationError,21> 43
MinStep, 21,42 Tolerance,64
Minimize, 66 Type,21>42
MultiplicativeScaleFactor?66 UpdateInterval,56
Mu, 54 UpdatePlotFrequency,48
NomIntegrationError,22,43 Upper, 66
NonLinearConstraint,69 UseCentralDifferences,47
NumPointsToRedraw,48 UseFixedFov,51
Nutat ionUpdateInterva1,55 UseInitialView,50
Optimize,63 UseTTForEphemeris,53
Order, 19,40 VMAG, 14>32
Origin,37,44,45?55 VX, 12,30
Pause,74 VY, 12,30
PerspectiveMode,51 VZ, 12,30
Perturbation,66 VectorFormat,44
PointMasses,20141 ViewDirection,50
Point,53 ViewPointReference,49
Precision,51 ViewPointVector,49
PressureRegulated,37 ViewScaleFactor,50
Pressure,37 ViewUpAxis,50
PrimaryBodies,19?40 ViewUpCoordinateSystem,50
Primary,53,55 Volume,37
Propagation Mode,57 While,60
RAAN, 13,31,54 WriteHeaders,51
RAV, 15,33 XYPlane,48
RA, 14,32 X-Direction,37
RMAG, 14,32 X, 12,30,56
RadApo, 13>31 Y-Direction,38
RadPer, 14,32 Y, 12,30>56
RefTemperature,37 Z-Direction?38
Remove,49 ZeroFill,51
Reportstyle,47 Z,12,30,56
Report,72 h, 15,33
RotationDataSource,55 k,15,33
SMA,13,31,54 P,15,33
SRPArea,16,34 ql,36
SRP,20>41 q2,36
Save,75 q3,36
ScriptEvent,74 q4,36
Secondary,53,56 q,15,33
ShowPlot,47,52
ShowProgress?47
Solar System
Script Fields?53
SolverIterations,48,52
StateType,11,29
Stop,74
TA,13,31,55
Tank,38
TargeterTextFile,47
Target,63
Temperature,37
ThrustScaleFactor,38
Thrusters,45
Toggle,72
TolCon,46
TolFun,46
TolX.46