Você está na página 1de 62

General Mission Analysis Tool (GMAT)

Training Manual
General Mission Analysis Tool (GMAT): Training Manual
Table of Contents
User Guide Overview and Essential Reading ....................................................................... v
I. Introduction .................................................................................................................. 1
Introduction to GMAT ............................................................................................. 3
Overview ......................................................................................................... 3
Licensing .......................................................................................................... 4
Platforms ......................................................................................................... 4
User Interfaces ................................................................................................. 4
Status ............................................................................................................... 4
Contributors ..................................................................................................... 5
Getting Started ......................................................................................................... 7
Installation ....................................................................................................... 7
Starting and Quitting GMAT ............................................................................. 7
Running the GMAT Demos .............................................................................. 8
User Interfaces Overview .................................................................................. 8
Data and Configuration ................................................................................... 13
Other Resources ............................................................................................. 18
II. Creating Your First Mission ......................................................................................... 19
Simulating an Orbit ................................................................................................. 21
Objective and Overview .................................................................................. 21
Configure the Spacecraft .................................................................................. 21
Configure the Propagator ................................................................................. 22
Configure the Propagate Command .................................................................. 24
Run and Analyze the Results ............................................................................ 25
III. How-tos ................................................................................................................... 27
Setting a Spacecraft's Initial Epoch ........................................................................... 29
Defining a Spacecraft's Orbit ................................................................................... 31
Configuring a Spacecraft's Physical Properties ............................................................ 33
Propagating a Spacecraft .......................................................................................... 35
Configuring a High-Fidelity Propagator ............................................................. 35
Propagating to a Desired Orbit Condition ......................................................... 35
Reporting Data ....................................................................................................... 37
Reporting Data During a Propagation Span ....................................................... 37
Reporting Data at a Specific Mission Event ....................................................... 37
Creating an Orbit View ........................................................................................... 39
Creating a Ground Track Plot .................................................................................. 41
Creating an Ephemeris File ...................................................................................... 43
Creating a CCSDS Ephemeris File .................................................................... 43
Creating a SPICE Ephemeris File ..................................................................... 43
IV. Tutorials ................................................................................................................... 45
Simple Orbit Transfer .............................................................................................. 47
Objective and Overview .................................................................................. 47
Configure Manuever, Differential Corrector, and Graphics .................................. 47
Configure the Targeter ..................................................................................... 48
Running the Mission ....................................................................................... 55

iii
iv
User Guide Overview and Essential
Reading
The GMAT User’s Guide contains material for new and experienced users and is organized into
the following sections:

• Introduction to GMAT
• Getting Started
• Create Your First Mission
• How To
• Tutorials
• Reference

The Introduction to GMAT section contains a brief project and software overview, and discusses
project status, licensing, and contributors.

The Getting Started section of the GMAT User’s Guide describes how to install and start GMAT,
presents an overview of the user interfaces, and provides information on configuring your system.
We consider the user interface overview essential reading. If you read nothing else in the User’s Guide,
at least read the “User Interfaces Overview section” as it will explain the basic philosophy and rules of GMAT’s
user interfaces.

The Creating Your First Mission section walks you through step-by-step to create a spacecraft, a
propagator, and an OrbitView graphical display, and then propagate the spacecraft to orbit perigee.

The How To section of the GMAT documentation contains many articles that each describe a single
area of functionality. The purpose is of the How To documentation is to show you how to use a
specific feature in an analysis context, and these articles often start from the default mission. A How
To doc is designed to take about five minutes to teach you a feature area.

The Tutorials section describes how to use GMAT for end-to-end analysis, and tutorials start from
a blank slate, rather than from a default mission. We’ve included a number of tutorials including a
Hohmann transfer, Optimal Lunar Transfer, Optimal Mars Transfer, and low Earth orbit station
keeping. Individual tutorials are designed to take between 30 minutes and one day to complete,
and teach you how to build and configure all of the models and commands required to perform
real-world analysis.

The Reference section of the User’s Guide describes each GMAT interface, model and command in
detail, including syntax, variable ranges and data types, defaults, and expected behavior.

v
vi
Part I. Introduction
Table of Contents
Introduction to GMAT ..................................................................................................................... 3
Overview ................................................................................................................................. 3
Licensing .................................................................................................................................. 4
Platforms ................................................................................................................................. 4
User Interfaces ......................................................................................................................... 4
Status ....................................................................................................................................... 4
Contributors ............................................................................................................................. 5
Getting Started ................................................................................................................................. 7
Installation ............................................................................................................................... 7
Starting and Quitting GMAT ..................................................................................................... 7
Running the GMAT Demos ...................................................................................................... 8
User Interfaces Overview .......................................................................................................... 8
Data and Configuration ........................................................................................................... 13
Other Resources ..................................................................................................................... 18

This is an intro
This is an introductory paragraph
Introduction

Introduction to GMAT
GMAT is an open source trajectory design and optimization system developed by NASA and private
industry. We use an open source process to maximize tehcnology transfer and permit anyone to
develop and validate new algorithms and to enable new algorithms to quickly transition into the
high fidelity core.

GMAT is designed to model and optimize spacecraft trajectories in flight regimes ranging from
low Earth orbit to lunar applications, interplanetary trajectories, and other deep space missions.
The system supports constrained and unconstrained trajectory optimization and built-in features
make defining cost and constraint functions trivial so analysts can determine how their inclusion or
exclusion effects solutions.

The system also contains initial value solvers (propagation) and boundary value solvers and efficient-
ly propagates spacecraft either singly or coupled. GMAT's propagators naturally synchronize the
epochs of multiple vehicles and shorten run times by avoiding fixed step integration or interpolation
to synchronize epochs of spacecraft.

A user can interact with GMAT using either a graphical user interface (GUI) or script language
that has a syntax similar to the MathWorks' MATLAB®1 system. All of the system elements can be
expressed through either interface and users can configure elements in the GUI and then view the
corresponding script, or write script and load it into GMAT.

Analysts model space missions in GMAT by first creating resources such as spacecraft, propagators,
and optimizers to name a few. These resources can be configured to meet the needs of specific
applications and missions. After the resources are configured they are used in the mission sequence
to model the motion of spacecraft and simulate events in a mission's time evolution. The mission
sequence supports commands such as Nonlinear Constraint, Minimize, Propagate, Function Calls,
Inline Math, and Script Events among others.

The system can display trajectories in space, plot parameters against one another, and save parameters
to files for later processing. The trajectory and plot capabilities are fully interactive, plotting data as
a mission is run and allowing users to zoom into regions of interest. Trajectories and data can be
viewed in any coordinate system defined in GMAT, and GMAT allows users to rotate the view and
set the focus to any object in the display. The trajectory view can be animated so users can watch
the evolution of the trajectory over time.

Overview
The General Mission Analysis Tool (GMAT) is a software system designed to model and optimize
spacecraft trajectories in flight regimes ranging from low Earth orbit to lunar applications, interplan-
etary trajectories, and other deep space missions. You simulate space missions in GMAT by first
creating models of components such as spacecraft, propagators, and optimizers. GMAT contains
an extensive set of available Resources that can be broken down into physical model Resources
and analysis model Resources. Physical Resources include spacecraft, thruster, tank, ground station,
formation, impulsive burn, finite burn, planet, comet, asteroid, to name a few. Analysis model Re-
sources include differential corrector, propagator, optimizer, 3-D graphic, x-y plot, report, among
many others.

3
Introduction Introduction to GMAT

After the resources are configured, they are used in the mission sequence to model spacecraft motion
and simulate events in a mission’s time evolution. Users employ built-in Commands that simulate
trajectory dynamics or apply numerical methods such as estimators, optimizers, and boundary value
solvers. The mission sequence supports many commands including, but not limited to, propagate,
impulsive maneuver, finite maneuver, target, optimize, estimate, simulate measurements, non-linear
constraint, minimize, call functions, inline math, vary parameter and control flow. The system can
display trajectories in space, plot parameters against one another, and save parameters to files for
later processing. The trajectory and plot capabilities are fully interactive, plotting data as a mission is
run and allowing users to zoom in to regions of interest. Trajectories and data can be viewed in any
coordinate system defined in GMAT, and GMAT allows users to rotate the view and set the focus
to any object in the display. The trajectory view can be animated so users can watch the evolution
of the trajectory over time.

Licensing
GMAT is licensed using the NASA Open Source Agreement v1.3. The license file is contained in
the root directory of the GMAT file structure.

Platforms
GMAT is implemented to run on Windows, Linux and Macintosh platforms, using the wxWidgets
cross platform UI Framework, and can be built using either commercial development tools such
as Microsoft Visual Studio or the GNU Compiler Collection (GCC) with your preferred IDE. The
system is implemented in ANSI standard C++ (approximately 380,000 non-comment source lines
of code) using an Object Oriented methodology, with a rich class structure designed to make new
features simple to incorporate. On Windows and Linux, GMAT does not call any operating system
unique functions or methods. Calls to the operating system are standard calls for reading and writing
data files and for writing data to the screen. On the Mac, GMAT makes a call to the operating system
to open X11, which is required to run MATLAB on the Mac.

User Interfaces
GMAT has several user interfaces. The graphical user interface is an interactive GUI and is intro-
duced in more detail in later sections. The script interface is textual and also allows the user to set
up and execute all aspects of GMAT. The MATLAB interface is a secondary textual interface for
running the system via calls from MATLAB to GMAT and allows GMAT to call MATLAB func-
tions from within the GMAT command sequence. An interface currently under development is a C
language API for low level calls into the GMAT engine.

Status
While GMAT has undergone extensive testing and is mature software, at the present time we con-
sider the software to be in Beta form on Windows and Alpha on Linux and Mac. GMAT is not
yet sufficiently verified to be used as a primary operational analysis system. GMAT has been used
to optimize maneuvers for flight projects such as NASA’s LCROSS and ARTEMIS missions, and
the Lunar Reconnaissance Orbiter, and for optimization and analysis for the OSIRIS and MMS mis-
sions. However, for flight planning, we independently verify solutions generated in GMAT in the
primary operational system.

4
Introduction to GMAT Introduction

The GMAT Team is currently working on several activities including maintenance, bug fixes, and
testing along with selected new functionality.

Contributors
The Navigation and Mission Design Branch at NASA’s Goddard Space Flight Center performs
project management activities and is involved in most phases of the development process including
requirements, algorithms, design, and testing. The Ground Software Systems Branch performs de-
sign, implementation, and integration testing. The Flight Software Branch contributes to design and
implementation. GMAT contributors include volunteers and those paid for services they provide.
We welcome new contributors to the project, either as users providing feedback about the features of
the system, or as developers interested in contributing to the implementation of the system. Current
and past contributors include:

• Thinking Systems, Inc. (system architecture and all aspects of development;


• Air Force Research Lab (all aspects of development)
• a.i. solutions (testing);
• Boeing (algorithms and testing);
• The Schafer Corporation (all aspects of development);
• Honeywell Technology Solutions (testing);
• Computer Sciences Corporation (requirements);

The NASA Jet Propulsion Laboratory (JPL) has provided funding for integration of the SPICE
toolkit into GMAT. Additionally , the European Space Agency’s (ESA) Advanced Concepts team
has developed optimizer plug-ins for the Non-Linear Programming (NLP) solvers SNOPT (Sparse
Nonlinear OPTimizer) and IPOPT (Interior Point OPTimizer).

5
6
Introduction

Getting Started
Installation
Installers and files for all platforms are located on the GMAT SourceForge page at the following link:
https://sourceforge.net/projects/gmat/files/GMAT/. GMAT releases are listed in chronological
order with the most recent release at the top of the list. As of this writing the latest release is 2011a.

Installing on Windows
The GMAT windows distribution contains an installer that will install and configure GMAT for
you automatically. After installation is completed, if you have MATLAB®, add all folders under the
"matlab" folder in the GMAT root directory, to your MATLAB® path.

Installing on Mac
GMAT for Mac is released as a g-zipped tarball archive. The tarball is uncompressed and installed
by either double-clicking on it or by opening a Terminal window and running the command:
tar -xvf gmat-snowleopard-x86-R2011a-Alpha.tar.gz

The command extracts the GMAT system into a folder named GMAT-R2011a - this is the GMAT
root directory. You may move this folder in its entirety to your desired installation directory.

Installing on Linux
GMAT for Linux is released as a g-zipped tarball archive. The tarball is installed by running the
command:
tar -zxf gmat-linux-x64-R2011a-Alpha.tar.gz

This command extracts the GMAT system into a folder named GMAT-R2011a. Inside of that folder
you will find two application launchers, RunGmat.sh and RunGmatLauncher.sh. The shell script
RunGmatLauncher.sh contains information about where GMAT is installed on your system as part
of a change directory (cd) command. The default location is ~/GMAT-R2011a; update that location
if you installed GMAT to a different folder. The Linux application is launched by running one of
the RunGmat... shell scripts. Each script file sets GMAT's load library path, and then launches the
application. If you would like to create a desktop shortcut to launch GMAT, set your launcher to
run the "RunGmatLauncher" shell script. You might want to set the icon for the launcher as well;
GMAT's icon images are located in the GMAT-R2011a/data/graphics/icons folder.

Starting and Quitting GMAT


Starting a GMAT Session
On Microsoft Windows platforms there are several ways to start a GMAT session. If you used the
GMAT installer to install GMAT then you can double-click on the GMAT icon on the the desktop.
If you installed GMAT from a zip file, or by compiling the system, locate the bin folder in the GMAT
root directory and double-click on the icon for the file named GMAT.exe

On the Mac, you may use the finder to find the bin folder located in your installation directory, and
double-click on the GMAT.app application. Alternatively, use can open a Terminal window, cd to

7
Introduction Getting Started

your installation directory, then type the command ‘open GMAT.app”. Once GMAT is open, you
may set it up to remain in the dock by selecting its dock icon with the mouse, selecting ‘Options’ ,
then ‘Keep in Dock’. This allows you to open GMAT in the future simply by clicking on its dock icon.

Quitting a GMAT Session


To end a GMAT session on Windows or Linux, in the Menu Bar, select File->Exit. On Mac, select
GMAT->Quit GMAT or use command-Q.

Running the GMAT Demos


We’ve included more than 30 sample missions in the GMAT distribution. The sample missions
show how to apply GMAT to problems ranging from the Hohmann transfer, to Libration point
station-keeping, to trajectory optimization. To locate and run a sample mission:

1. Open GMAT.
2. Click on the Open button in the Toolbar.
3. In the Choose a File browser, navigate to the Samples folder located in the GMAT root directory.
4. Click on a script file of your choice.
5. Click OK.
6. Click the Run button in the toolbar.

To run optimization missions, you need MATLAB®, and the MATLAB® optimization toolbox
and/or the VF13ad plugin based on software in the Harwell Subroutine Library. These are propri-
etary libraries and are not distributed with GMAT. MATLAB® is not yet fully supported in the Mac
and Linux GMAT releases, and therefore you cannot run optimization missions that use MATLAB’s
fmincon optimizer in the current Mac and Linux builds.

User Interfaces Overview


GMAT contains several user interfaces to design and execute your mission. The two primary inter-
faces are the GUI interface and the Script interface. Each of these interfaces supports most func-
tionality available in GMAT. When you work in the Script interface, you are modifying the core files
that GMAT reads and writes. To avoid issues such as circular dependencies in the GUI, there are
some basic rules you must follow when writing scripts, or when working in the GUI. Below, we dis-
cuss these interfaces and then discuss the basic rules and best practices for working in each interface.

GUI Overview
When you start a GMAT session, the GMAT desktop is displayed and the default mission is loaded.
The GMAT desktop has a native look and feel on each platform and most desktop components
are supported on all platforms. The components of the desktop are discussed in detail in the Win-
dows GUI section below and the differences for Mac and Linux platforms are discussed in separate
sections.

Windows GUI
When you open GMAT on Windows and click the Run button in the Toolbar, GMAT executes the
default mission as shown in the figure below. The tools listed below the figure are managed by the
GMAT desktop.

8
Getting Started Introduction

Figure 1. Windows GUI
Menu Bar The menu bar contains File, Edit, Window and Help functionality.

On Windows, the File menu contains standard Open, Save, Save As, and
Exit functionality as well as Open Recent and New Mission. The Edit
menu contains functionality for script editing and is only active when the
Script Editor is selected as the active window. The Window menu con-
tains tools for organizing graphics windows and the script editor within
the GMAT desktop. Examples include the ability to Tile windows, Cas-
cade windows and Close windows. The Help menu contains links to On-
line Help, Tutorials, Forums, and the Report An Issue option links to
GMAT’s defect reporting system, the Welcome Page, and a Provide Feed-
back link.

On Mac, menus are nearly the same, with a few differences: the File menu
does not contain an Exit option - instead, the Quit GMAT menu option is
on the GMAT menu, as discussed before; tiling and cascading windows are
not supported, so those options do not appear under the Window menu;
currently, email is not supported, so Provide Feedback is nonfunctional
under the Help menu.
Tool Bar The Tool Bar provides easy access to frequently used controls such as file
controls, Run, Pause, and Stop for mission execution, and controls for
graphics animation. On Windows and Linux, the toolbar is located at the

9
Introduction Getting Started

top of the GMAT window; on Mac, currently it is located on the left of


the GMAT frame. Because the toolbar is vertical, some toolbar options are
abbreviated.

GMAT allows you to simultaneously edit the raw script file representation
of your mission and the GUI representation of your mission. It is possible
to make inconsistent changes in these mission representations. The GUI/
Script Sync Status window located in the Toolbar shows you the state
of the two mission representations. See further discussion under the GUI/
Script Interactions and Synchronization section below.
Resources Tab When you click on the Resources Tab you bring the Resource Tree to
the foreground of the desktop.
Resources Tree The Resources Tree is a tree structure that organizes GMAT Resources
into logical groups. All objects created in a GMAT script using a Create
command are found in the Resources Tree in the GMAT desktop.
Mission Tab When you click the Mission Tab you bring the Mission Tree to the fore-
ground of the desktop.
Mission Tree The Mission Tree is a tree structure that displays GMAT commands that
control the time-ordered sequence of events in a mission. The Mission
Tree contains all script lines that occur after the BeginMissionSequence
command in a GMAT script. You can undock the Mission Tree in the
desktop as shown in the figure below. To undock the Mission Tree, you
can right-click on the Mission Tab and drag it into the graphics window.
You can also follow these steps:
1. Click on the Mission Tab to bring the Mission Tree to the foreground.
2. Right-click on the Mission Sequence folder in the Mission Tree and
select Undock Mission Tree in the menu.

Output Tab When you click the Output Tab you bring the Output Tree to the fore-
ground of the desktop.
10
Getting Started Introduction

Output Tree The Output Tree is a tree structure that contains GMAT output such as
report files, event reports, and ephemeris files.
Message Window When you run a mission in GMAT, information including warnings, errors,
and progress are written to the message window. For example, If there is a
syntax error in a script file, a detailed error message is written to the Message
Window detailing the error.

Script Interface Overview


The GMAT script editor is a textual interface that supports most functionality in GMAT. In Fig. y
below, the script editor is shown maximized in the Desktop and the items relevant to script editing
are labeled and discussed in more detail below.

Figure 2. GMAT Script Editor


Script Folder The GMAT desktop allows you to have multiple script files open
simultaneously. Open script files are displayed in the Scripts Fold-
er in the Resources Tree. You can double click on a script in the
Scripts Folder to open it the Script Editor. The GMAT desktop
displays each script that is open for view in a separate Script Ed-
itor. GMAT uses bold face font to identify which, if any, of the
scripts in the Scripts Folder are loaded into the GUI. Only one
script can be loaded into the GUI at a time.
Script Status Box The Script Status box indicates whether or not the script being
edited is loaded in the GUI. If the Script Status Box say "Active

11
Introduction Getting Started

Script", then the script is loaded into the GUI. If the Script Status
Box says "Inactive Script", the script is not currently loaded into
the GUI.
Save,Sync Button When you click Save,Sync, GMAT saves script file changes to
disk, and synchronizes the GUI with the script.
Save,Sync,Run Button The you click Save,Sync,Run, GMAT saves script file changes to
disk, synchronizes the GUI with the script, and executes the script.
Save As Button When you click Save As, GMAT brings up the Choose A File
dialog box and allows you to save the script using a new file name.
After saving, GMAT loads the script into the GUI, making the
new file the active script.
Close The Close button closes the script editor.

GUI/Script Interface Interactions and Rules


The GMAT desktop supports a script interface and a GUI interface and these interfaces are designed
to be consistent with each other. You can think of the Script and GUI as different "views" of the
same data: the Resources and Mission Command Sequence. GMAT allows you to switch between
views (Script and GUI) rapidly and even have the same view open in an editable state simultaneously.
Below we describe the behavior, interactions, and rules of the script and GUI interfaces so you can
avoid confusion and potential loss of data.

GUI/Script Interactions and Synchronization


GMAT allows you to simultaneously edit the raw script file representation of your mission and the
GUI representation of your mission. It is possible to make inconsistent changes in these mission
representations and the GUI/Script Sync Status window located in the Toolbar shows you the
state of the two mission representations. [Mac: this is the bottom text box.] Synchronized [Mac:
green ‘S’] means the script and GUI contain the same information. GUI Modified [Mac: yellow
‘g’] means there are changes in the GUI that have not been saved to the script. Script Modified
[Mac: yellow ‘s’] means there are changes in the script that have not been loaded into the GUI.
Unsynchronized [Mac: red ‘U’] means there are changes in both the script and the GUI.

Caution
GMAT will NOT attempt to merge or resolve simultaneous changes in the Script and
GUI and you must choose which representation to save if you have made changes in
both interfaces.

Pressing the Save button in the toolbar saves the GUI representation over the script. Pressing the
Save/Sync button on the script editor saves the script representation and loads it into the GUI.

How the GUI Maps to a Script


Clicking the Save button in the toolbar saves the GUI representation to the script file - this is the
same file you edit when working in the Script Editor. GUI items that appear in the Resources Tree
appear before the BeginMissionSequence in a script file and are written in a predefined order. GUI
items that appear in the Mission Tree appear after the BeginMissionSequence command in a script
file in the same order as they appear in the GUI.

12
Getting Started Introduction

Caution
If you have a script file that has custom formatting such as spacing and data organiza-
tion, you should work exclusively in the script. If you load your script into the GUI,
then click Save in the toolbar, you will lose the formatting of your script. (You will
NOT, however, lose the data.)

How the Script Maps to the GUI


Clicking the Save/Sync button on the script editor saves the script representation and loads it into
the GUI. When you work in a GMAT script, you work in the raw file that GMAT reads and writes.
Each script file must contain a command called BeginMissionSequence. Script lines that appear be-
fore the BeginMissionSequence command create and configure models and this data will appear
in the Resources Tree in the GUI. Script lines that appear after the BeginMissionSequence com-
mand define your mission sequence and appear in the Mission Tree in the GUI. Here is a brief
script example to illustrate:
Create Spacecraft Sat
Sat.X = 3000
BeginMissionSequence
Sat.X = 1000

The line Sat.X = 3000 sets the x-component of the Cartesian state to 3000 and this value would
appear on the Orbit Tab of the Spacecraft dialog box. However, because the line Sat.X = 1000
appears after the BeginMissionSequence command, the line Sat.X = 1000 will appear as an
assignment command in the Mission Tree in the GUI.

Basic GMAT Script/GUI Interface Rules


• Each script file must contain one and only one BeginMissionSequence command.
• GMAT commands are not allowed before the BeginMissionSequence command.
• You cannot use inline math statements (equations) before the BeginMissionSequence command
in a script file. (GMAT considers in-line math statements to be an Assignment Command). (You
cannot use equations in the Resources Tree, so you can also not use equations before the Be-
ginMissionSequence command).
• Similarly, you can only use in-line math statements in an Assignment Command in the Mission
Tree. So, you cannot type “3000 + 4000” or “Sat.Y - 8” in the text box for setting spacecraft
DryMass.
• GMAT’s script language is case sensitive.

Data and Configuration


Below we discuss the files and data distributed with GMAT and that are required for GMAT exe-
cution. GMAT requires many data files such as planetary ephemeris, Earth orientation data, leap
second files and gravity files to name just a few. Below we describe how those files are organized
and describe the controls provided so that you can customize the data files GMAT uses at run time.

File Structure
The default directory structure for GMAT is shown below and is broken down into eight main
directories. These directories organize the files and data used to run GMAT including binary libraries,

13
Introduction Getting Started

data files, texture maps, to 3-D models among many others. The only two files in the GMAT root
directory are the license.txt file and the README.txt file. A summary of the contents of each folder
is described in further detail in the sections below.

GMAT Directory Structure

bin Folder

The bin filder contains all binary files required for the core functionality in GMAT (third-party,
alpha and beta libraries are placed in the plugins folder). These libraries include the executable file
(GMAT.exe on Windows, GMAT.app on Mac, etc.) and libraries for the GUI. The bin folder also
contains two text files: gmat_startup_file.txt, and gmat.ini. The startup file is discussed in detail in a
separate section below. The gmat.ini files is used to configure some GUI panels, set paths to external
web links, and define "tool tip" messages.

data Folder

The data folder contains all data files required to run GMAT and is organized according to data
types as shown in the figure below. The gravity folder contains a folder for each default central body
modeled in GMAT and in those folders are files containing gravitational coefficients. The gui_config
folder contains files for configuring some of the dialog boxes for GMAT Resources and Commands.
These files allow you to custom configure a GUI for a user-provided plugin. Furthermore, some of
the built-in dialog box designs employ an ini file for their configuration.

data Folder Structure

14
Getting Started Introduction

The graphics folder contains four subfolders: splash, stars, icons and texture. The splash folder
contains the GMAT splash screen that is displayed briefly while GMAT is initializing. The stars
folder contains a star catalogue used for displaying stars in 3D graphics. The texture folder contains
texture maps used for 3D graphics. The icons folder contains graphics files for icons and images
loaded at run time. These include the GMAT logo, images used on the about panel and welcome
screen, and icons for the Toolbar, Resource Tree and Mission Tree.

The planetary_coeff folder contains Earth Orientation Parameters (EOP) provided by the Interna-
tional Earth Rotation Service (IERS) and nutation coefficients for different nutation theories. The
planetary_ephem folder contains two folders: de and spk. The de folder contains the binary Digital
Ephemeris DE405 files for the 8 planets, the Moon, and pluto developed and distributed by JPL.
The spk folder contains an spk kernel built from the DE421 file and kernels for selected comets, as-
teroids and moons. All ephemeris files distributed with GMAT are in the little-endian representation.

The last two sub-folders in the data folder are time and vehicle. The time folder contains the JPL leap
second kernel naif0009.tls and the GMAT leap second file tai-utc.dat. The vehicle folder contains
two sub folders: ephem and models. The ephem subfolder contains SPK ephemeris files - including
orbit, attitude, frame, and time kernels - for selected spacecraft. The models folder contains 3D
model files.

docs Folder

Documentation for GMAT is contained in the docs folder and includes PDF versions of the User's
Guide, Mathematical Specification, Design Specification, and Requirements Specification to name a
few. There is also a subfolder named help that contains html help files.

matlab Folder

The matlab folder contains m-files required for GMAT's MATLAB interfaces including the interface
to fmincon, and interfaces for driving GMAT from MATLAB. All files in the matlab folder must be
included in your MATLAB path for the MATLAB interfaces to function properly.

output Folder

The output folder is the default location for file output such as ephemeris files and report files. If no
path information is provided for reports or ephemeris files created during a GMAT session, then
those files will be written to the output folder.

plugins Folder

The plugins folder is for third-party libraries and for functionality that is still in alpha or beta status.
A "proprietary" sub folder within the plugins directory is for third-party libraries that cannot be
distributed as open source files and is an empty folder in the open source distribution.

samples Folder

The samples folder contains many sample missions ranging from Hohmann transfer to Libration
point station-keeping, to Mars B-Plane targetting. These files are intended to demonstrate GMAT's
capabilities and to provide you with potential staring points for building common mission types for
your application and flight regime.

15
Introduction Getting Started

userfunctions Folder
The userfunctions folder contains two subfolders: gmat and matlab. These folders are where gmat
and matlab functions are stored that are called in the GMAT command sequences for sample mis-
sions distributed with GMAT. You can also store your own custom GMAT and MATLAB functions
in these folders.

Configuring GMAT Data Files


You can configure the data files GMAT loads at run time by editing the file named
gmat_startup_file.txt located in the bin directory. The startup file contains path information to files
such as ephemeris, earth orientation data and graphics files among others. By editing the startup
file, you can customize which files are loaded and used during a GMAT session. Below we describe
the customization features available in the startup file. The order of lines in the startup file does
not matter.

Leap Second and EOP files


GMAT reads several files that are used for high fidelity modelling of time and coordinate systems.
These files are the leap second files and the Earth Orientation Parameters (EOP) provided by the
IERS. The EOP file is updated daily by the IERS. To update your local file with the latest data,
simply replace the data in file eopc04.62-now, (located in the directory ./data/planetary_coeff/ )
with the data provided by the IERS in the link here [http://data.iers.org/products/177/11221/orig/
eopc04_05_IAU2000.62-now]. There are two leap second files provided with GMAT. The file named
naif0009.tls located in the .\data\time folder is used by the JPL SPICE libraries when computing
ephemeredes. When a new leap seond is added, you can replace your old SPICE leap second file
with the new file located here here [ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/].

GMAT reads the file tai-utc.dat in the .\data\time folder for all time computations requiring leap
seconds that are not performed by the SPICE utilities. You can modify this file if a new leap second
is added by simply duplicating the last row and updating it with the correct information for the new
leap second. For example, if a new leapsecond were added on 01 Jul 2013, then you would add the
following line to the tai-utc.dat file:

2013 JUL 1 =JD 2456474.5 TAI-UTC= 35.0 S + (MJD - 41317.) X 0.0

Loading Custom Plugins


Custom plugins are loaded by adding a line to your startup file describing the name and location of
the plugin library. In order for a plugin to work with GMAT, the plugin library must be placed in the
folder referenced in the startup file. You specify the path to a plugin using the "PLUGIN" keyword
and specify the file by providing its name without the file extension (.dll on Windows). For example,
to load a Windows plugin named libVF13Optimizer.dll located in the \bin\proprietary folder, you
add this line to your startup file:

PLUGIN = ./proprietary/libVF13Optimizer

User-defined Function Paths


If you create custom GMAT or MATLAB functions for your application, you can provide the path
to those files and GMAT will locate them at run time. The default startup file is configured so you

16
Getting Started Introduction

can place GMAT files in the ./userfunctions/gmat folder and place MATLAB functions in the /
userfunctions/matlab folder GMAT automatically searches those locatations at run time. You can
change the location of the search path to your GMAT or MATLAB functions by changing these
lines in your startup file to reflect the location of your files with respect to the GMAT bin folder:

GMAT_FUNCTION_PATH = ../userfunctions/gmat
MATLAB_FUNCTION_PATH = ../userfunctions/matlab

If you wish to organize your custom functions in multiple folders, you can add multiple search paths
to the startup file. For example,

GMAT_FUNCTION_PATH = ../MyFunctions/utils
GMAT_FUNCTION_PATH = ../MyFunctions/StateConversion
GMAT_FUNCTION_PATH = ../MyFunctions/TimeConversion

Configuring the MATLAB Interfaces


GMAT supports several MATLAB interfaces and to use these interfaces the following MATLAB
folders must be added to your system path:

MATLAB/bin/win32
MATLAB/bin
MATLAB/runtime/win32

Caution
The above folders are added to your system path during MATLAB installation. How-
ever, for some versions of MATLAB (2010a for example), MATLAB and Windows
are distributed with libraries that have the same name. This may cause the Windows
libraries to load instead of the MATLAB libraries. As a result, you may need to put the
folders above at the beginning of your system path.

If you have multilple versions of MATLAB installed, GMAT will use the version that appears first in
your system path and that version must be registered as a COM server using the MATLAB regserver
command. To register the desired version of MATLAB, using a command prompt change directory
to the bin folder of the desired MATLAB release and run the following command.

matlab.exe -regserver

Finally you must add to your MATLAB path all files in the matlab directory which is located in the
GMAT root directory.

On Mac platform, to use MATLAB with GMAT, the user must set the MATLABFORGMAT en-
vironment variable in his/her environment.plist, located in the user's .MacOSX subdirectory. This
environment variable should point to the location of the MATLAB installation (application bundle)
on the user's machine. GMAT will not interface with MATLAB without this environment variable
being set.

17
Introduction Getting Started

The current Mac application (Alpha version) includes the ability to make calls to MATLAB-based
functions from GMAT scripts. Calls cannot be made from MATLAB to GMAT with the current
application.

Note that when GMAT opens MATLAB, it will open X11 first (as is required for MATLAB execu-
tion). GMAT currently does not automatically close X11 after quitting MATLAB, so the user will
need to quit X11 manually.

To add the environment variable:

1. if the environment.plist already exists in your .MacOSX directory, edit the plist using the Property
List Editor to add the MATLABFORGMAT variable and set it to point to the location of your
MATLAB application (e.g. /Applications/MATLAB_R2010a/MATLAB_R2010a.app)
2. if you do not have an environment.plist in your .MacOSX directory, using a terminal window:
a. create the .MacOSX directory as a subdirectory in your home folder (if it does not exist)
b. open the Property List Editor, create the MATLABFORGMAT variable (it should point to
your MATLAB application)
c. save the property list as environment.plist in your .MacOSX subfolder

You must logout and log back in for this to take effect.

Other Resources
If you have further questions or help for GMAT, or want to provide feedback, here are some addi-
tional resources:

Provide Feedback [gmat@gsfc.nasa.gov].

Project Forum [http://gmat.ed-pages.com/forum/index.php?].

Wiki [http://gmat.ed-pages.com/wiki/tiki-index.php?].

Web Page [http://gmat.gsfc.nasa.gov/].

Report an Issue [http://pows003.gsfc.nasa.gov/bugzilla/].

18
Part II. Creating Your First Mission
Table of Contents
Simulating an Orbit ......................................................................................................................... 21
Objective and Overview .......................................................................................................... 21
Configure the Spacecraft .......................................................................................................... 21
Configure the Propagator ........................................................................................................ 22
Configure the Propagate Command .......................................................................................... 24
Run and Analyze the Results .................................................................................................... 25
Creating Your First Mission

Simulating an Orbit
Objective and Overview
The most fundamental capability of GMAT is to propagate spacecraft, which said another way is to
model/simulate the motion of spacecraft. The ability to propagate spacecraft is used in nearly every
practical aspect of space mission analysis from simple orbital predictions--when will the International
Space Station be over my house?--to complex analyses that determine the thurster firing sequence
required to send a spacecraft to the Moon or Mars.

This tutorial will teach you how to use GMAT to propagate a spacecraft. You will learn how to
configure a Spacecraft and a Propagator, and then set up a Propagate command to propagate
the spacecraft to orbit perigee, which is the point of minumum distance between a spacecraft and
Earth. The basic steps in this tutorial are:

1. Configure theSpacecraft and define its epoch and orbital elements.


2. Configure the Propagator.
3. Modify the default OrbitView to visualize the spacecraft trajectory.
4. Modify the Propagate command to to propagate the spacecraft to the perigee.
5. Run the mission and analyze the results.

Configure the Spacecraft


In this section, you will rename a Spacecraft and set the Spacecraft's initial epoch and classical
orbital elements. You'll need GMAT open, with the Default Mission loaded. To load the Default
Mission click New Mission in the Toolbar or start a new GMAT session.

Rename the Spacecraft


1. In the Resources Tree, right-click DefaultSC, and select Rename.
2. In the Rename dialog box, type Sat .
3. Click OK.

Set the Spacecraft Epoch


1. In the Resources Tree, double-click on Sat. Click the Orbit tab if it is not already selected.
2. In the Epoch Format box, select UTCGregorian. You'll see the value in the Epoch field change
to the UTC Gregorian epoch format.
3. In in the Epoch field, type 22 Jul 2014 11:29:10.811.
4. Click Apply to save these changes.

Set the Keplerian Orbital Elements


1. In the StateType box select Keplerian . In Elements list you will see the GUI reconfigure to
display to the Keplerian representation.
2. In the SMA box, type 83474.318.
3. In the ECC box, type 0.89652.

21
Creating Your First Mission Simulating an Orbit

4. In the INC box, type 12.4606.


5. In the RAAN box, type 292.8362.
6. In the AOP box, type 218.9805.
7. In the TA box, type 180.
8. Compare your configuration with Figure 3 below and fix any differences, and click OK.

At this point, save your work to the disk: In the Toolbar , click the Save button. If this is the first
time you have saved the mission, you'll be prompted to provide a name and location for the file.

Figure 3. Spacecraft State Setup

Configure the Propagator


In this section you'll rename the Propagator, and configure the force model.

Rename the Propagator


Here you'll rename the propagator with a more descriptive name:

1. In the Resources Tree, double-click DefaultProp, and select Rename.


2. In the Rename dialog box, type LowEarthProp.
3. Click OK.

22
Simulating an Orbit Creating Your First Mission

Configure the Force Model


Now configure the force model. For this tutorial you will use an Earth 10x10 spherical harmonic
model, Jacchia-Roberts atmospheric model, solar radiation pressure, and point mass perturbations
from the Sun and Moon.

1. In the Resources Tree, double-click LowEarthProp,


2. In the Gravity list, type 10 both the Degree box.
3. Type 10 in the Order box.
4. In Atmosphere Model box, select JacchiaRoberts.
5. Click the Select button next to the Point Masses text box. This opens the CelestialBodySelect
dialog box.
6. In the Available Bodies list, click Sun, then click -> to add Sunto the Selected Bodies list.
7. Add Moon (named Luna in GMAT) using the same procedure above.
8. Compare your configuration with the figure below and fix any differences.
9. Click Use SolarRadiation Pressure to toggle it on.
10.Compare your LowEarthProp configuration with Figure 4 below, fix any discrepencies, and click
OK.

Figure 4. Force Model Configuration

Configuring the Orbit View Plot


Below you will configure an Orbit View plot so you can visualize Sat and its trajectory. The orbit
of Sat is highly eccentric. To view the entire orbit in the plot, we need to adjust the settings of
DefaultOrbitView.

1. In the Resources Tree, click on DefaultOrbitView.


2. In the three boxes next to ViewPointVector, type the values -60000, 30000, and 20000 respec-
tively.

23
Creating Your First Mission Simulating an Orbit

3. In the Drawing Options list, uncheck DrawXY Plane.


4. Compare your DefaultOrbitView configuration with Figure 5 below, fix any discrepencies, and
click OK.

Figure 5. DefaultOrbitView Configuration

Configure the Propagate Command


This is the last step in the tutorial before running the mission. Below you will configure a Propagate
command to propagate (model the motion of) Sat to orbit perigee.

1. Click the Mission tab to bring the Mission Tree to the foreground.
2. Double-click on Propagate1.
3. In the Stopping Conditions list, right click the (...) button next to Sat.ElapsedSecs to bring up
the Parameter Select Dialog
4. In the Object list, select Sat if it is not already selected. This directs GMAT to associate the
stopping condition with the spacecraft Sat.
5. In the Object Properties list, double-click Periapsis to add it to the Selected Values list as
shown in Figure 6.
6. Click OK.
7. Compare your Propagate1 configuration with Figure 7 below, fix any discrepencies, and click
OK.

24
Simulating an Orbit Creating Your First Mission

Figure 6. Propagate Command Parameter Select Dialog Configuration

Figure 7. Propagate Command Configuration

Run and Analyze the Results


Congratulations, you have now configured your first GMAT mission and are ready to run the mission
and analyze the results.

1. Click the Save button in the Toolbar to save your mission.

25
Creating Your First Mission Simulating an Orbit

2. Click the Run button in the Toolbar.

You will see GMAT propagate the orbit and stop at orbit periapsis. Figure 8 below illustrates what
you should see after correctly completing this tutorial. Here are a few things you can try to explore
the results of this tutorial:

1. Manipulate the Orbit View plot using your mouse to orient the trajectory so that you can to
verify that at the final location the spacecraft is at perigee.
2. Click the Mission Tab to bring the Mission Tree to the foreground.
3. Left-click on Propagate1 and select Command Summary to see data on the final state of Sat.
4. What values for longitude and latitude do you see for Sat.
5. Are the values for the final longitude and latitude of Sat consistent with the Ground Track plot
Sat?

Figure 8. Orbit View Plot after Mission Run

26
Part III. How-tos
Table of Contents
Setting a Spacecraft's Initial Epoch ................................................................................................... 29
Defining a Spacecraft's Orbit ........................................................................................................... 31
Configuring a Spacecraft's Physical Properties .................................................................................... 33
Propagating a Spacecraft .................................................................................................................. 35
Configuring a High-Fidelity Propagator ..................................................................................... 35
Propagating to a Desired Orbit Condition ................................................................................. 35
Reporting Data ............................................................................................................................... 37
Reporting Data During a Propagation Span ............................................................................... 37
Reporting Data at a Specific Mission Event ............................................................................... 37
Creating an Orbit View ................................................................................................................... 39
Creating a Ground Track Plot .......................................................................................................... 41
Creating an Ephemeris File .............................................................................................................. 43
Creating a CCSDS Ephemeris File ............................................................................................ 43
Creating a SPICE Ephemeris File ............................................................................................. 43
How-tos

Setting a Spacecraft's Initial Epoch


You can configure the initial epoch of a Spacecraft using several time systems (TAI, TDB, UTC, etc)
and in several formats (Gregorian Date, Modified Julian Date). In this How To you’ll learn how to
set a spacecraft’s epoch in UTC Gregorian format. Starting from the default mission:

1. In the Resources tree, double-click on DefaultSC to open it.


2. Make sure the Orbit tab is selected
3. In the EpochFormat list, select UTCGregorian.
4. Type 04 July 2014 09:30:15.235 in the Epoch text box.

The script for the epoch settings configured above is shown below.

Create Spacecraft DefaultSC;


GMAT DefaultSC.DateFormat = UTCGregorian;
GMAT DefaultSC.Epoch = '04 Jul 2014 09:30:15.235';

29
30
How-tos

Defining a Spacecraft's Orbit


To learn how to to define the initial state for a spacecraft orbit, you’ll configure GMAT to propagate
the International Space Station (ISS). Starting from the default mission, first set the initial epoch:

1. In the Resources tree, right-click on DefaultSC, and click Rename.


2. Type ISS in the Rename Dialog Box and then click OK.
3. On the Resources tree, double-click on ISS.
4. Make sure the Orbit tab is selected.
5. Click on the Epoch Format drop-down menu and select UTCGregorian.
6. Type 21 Oct 2011 14:01:29.130 in the Epoch text box.

Now follow the steps below to set the orbital state for ISS:

1. In the Resources tree, double-click on DefaultSC to open it.


2. Make sure the Orbit tab is selected.
3. Click the State Type drop-down menu and select Keplerian.
4. In the Elements parameter list on the Spacecraft dialog box, type 6771.907 in the SMA
text box.
5. Type 0.00103 in the ECC text box.
6. Type 51.597 in the INC text box.
7. Type 244.300 in the RAAN text box.
8. Type 353.735 in the AOP text box.
9. Type 199.683 in the TA text box.
10. Click OK.

The script for the spacecraft state configured above is show below.

Create Spacecraft ISS


ISS.DateFormat=UTCGregorian
ISS.Epoch = 21 Oct 2011 14:01:29.130
ISS.SMA = 6771.907
ISS.ECC = 0.00103
ISS.INC = 51.597
ISS.RAAN = 244.300
ISS.AOP = 353.735
ISS.TA = 199.683

Click Run in the Toolbar and you will see plots like those shown below in the Graphics Window.

31
How-tos Defining a Spacecraft's Orbit

32
How-tos

Configuring a Spacecraft's Physical


Properties
To configure the physical properties of a spacecraft, start from the default mission and perform the
following steps.

1. In the Resources tree, double-click on DefaultSC to open it.


2. Click on the Ballistic/Mass tab in the Spacecraft dialog box.
3. Type 450 in the DryMass text box.
4. Type 2.0 in the Coefficient of Drag text box.
5. Type 1.7 in the Coefficient of Reflectivity text box.
6. Type 10.5 in the Drag Area text box.
7. Type 12.5 in the SRP Area text box.

The script for the physical settings configured above is shown below.

Create Spacecraft DefaultSC


DefaultSC.DryMass = 450
DefaultSC.Cd = 2.0
DefaultSC.Cr = 1.7
DefaultSC.DragArea = 10.5
DefaultSC.SRPArea = 12.5

33
34
How-tos

Propagating a Spacecraft
Configuring a High-Fidelity Propagator
In the example below, you’ll learn how to configure a high fidelity propagator for low Earth orbits.
Starting from the default mission:

1. In the Resources tree, double-click on DefaultProp to open it.


2. In the Gravity section, type 21 in the Degree box.
3. Type 21 in the Order box.
4. Click on the Atmosphere Model drop-down list and select MSISE90 .
5. Click the Select button next to the PointMasses box.
6. Click on Sun and then click the right arrow -> to add the Sun to your force model.
7. Add Moon, and Jupiter using the same steps as above.
8. Click OK on the CelestialBodySelect dialog box.
9. Click on the UseSolarRadiationPressure check box. The box should be checked now.
10. Click OK on the PropSetup dialog box.

The script for the force model configured above is shown below.

Create ForceModel DefaultProp_ForceModel;


DefaultProp_ForceModel.CentralBody = Earth;
DefaultProp_ForceModel.PrimaryBodies = {Earth};
DefaultProp_ForceModel.PointMasses = {Jupiter, Luna};
DefaultProp_ForceModel.Drag = MSISE90;
DefaultProp_ForceModel.SRP = On;
DefaultProp_ForceModel.ErrorControl = RSSStep;
DefaultProp_ForceModel.GravityField.Earth.Degree = 21;
DefaultProp_ForceModel.GravityField.Earth.Order = 21;
DefaultProp_ForceModel.GravityField.Earth.PotentialFile = 'JGM2.cof';

Propagating to a Desired Orbit Condition

35
36
How-tos

Reporting Data
GMAT provides several ways to report mission data (such as altitude or delta-V values) to plain
text files. GMAT can report data at each integration time step in the mission or at specific mission
events, such as periapsis passage. The report functionality is controlled via the ReportFile resource
and the Report and Toggle commands.

Reporting Data During a Propagation Span


You can report data at each integration step in the mission sequence by creating a ReportFile re-
source and adding data to it. Starting from the default mission:

1. On the Resources tree, right-click the Output folder, point to Add, and click ReportFile.
2. Double-click the ReportFile1 resource.
3. In the Parameter List area, click Edit.
4. In the Selected Value(s) list, click DefaultSC.EarthMJ2000.X and click <- to remove it from
the list.
5. In the Object Properties list, click Altitude and click -> to add it to the Selected Value(s) list.
6. Add DefaultSC.A1ModJulian to the Selected Value(s) list if it doesn’t already exist.
7. Click OK, then in the ReportFile - ReportFile1 dialog box, click OK again.
8. Click Run. To view the generated report, on the Output tree, double-click ReportFile1.

The script for the report data configured above is shown below.

Create ReportFile ReportFile1;


GMAT ReportFile1.Add = {DefaultSC.A1ModJulian, DefaultSC.Earth.Altitude};

Reporting Data at a Specific Mission Event


You can report data to a ReportFile at a desired location in the mission sequence using the Report
command. In this How To, you’ll learn how to report spacecraft altitude at orbit apogee. Starting
from the default mission:

1. In the Resources tree, right-click on the Output folder, point to Add, and click ReportFile.
2. In the Output folder, double-click on ReportFile1 to open it.
3. In the Parameter List area, click the Edit button.
4. In the Selected Values list, click on DefaultSC.EarthMJ2000Eq.X and click the left arrow
<- to remove it from the list.
5. Remove DefaultSC.A1ModJulian from the Selected Value(s) list using the step above.
6. Click OK to close the ParameterSelectDialog box and then click OK again to close the Re-
portFile1 dialog box.

Now you will configure the Propagate1 command to propagate to periapsis then issue a command
to report to ReportFile1.

1. Click on the Mission tab to bring the mission tree to the foreground.
2. In the Mission tree, double-click on Propagate1 to open it.
3. In the Stopping Conditions list, click on the ellipses ... to the left of DefaultSC.ElapsedSecs.

37
How-tos Reporting Data

4. In the Object Properties list, click on Apoapsis then click on the right arrow -> to add it to
the Selected Value(s) list.
5. Click OK to close the ParameterSelectDialog box and then click OK again to close the Prop-
agate1 dialog box.
6. Right-click on Propagate1, point to Insert After, and then select Report.
7. Double-click Report1 and click on the View button.
8. Click on the remove all button <= to remove all items from the Selected Value(s) list.
9. Click on TA in the Object Properties list then click the right arrow -> to add it to the Selected
Value(s) list.
10. Add Altitude to the Selected Value(s) list using the same step as above.
11. Click OK to close the ParameterSelectDialog box and then click OK again to close the Re-
port1 dialog box.
12. In the Toolbar, click Run.
13. Click the Output tab.
14. In the Reports folder, click ReportFile1 to you will see the requested data.

The script for the report data configured above is shown below.

Create ReportFile ReportFile1;


BeginMissionSequence;
Propagate DefaultProp(DefaultSC) {DefaultSC.Earth.Apoapsis};
Report ReportFile1 DefaultSC.Earth.TA DefaultSC.Earth.Altitude;

38
How-tos

Creating an Orbit View

39
40
How-tos

Creating a Ground Track Plot

41
42
How-tos

Creating an Ephemeris File


Creating a CCSDS Ephemeris File

Creating a SPICE Ephemeris File

43
44
Part IV. Tutorials
Table of Contents
Simple Orbit Transfer ...................................................................................................................... 47
Objective and Overview .......................................................................................................... 47
Configure Manuever, Differential Corrector, and Graphics .......................................................... 47
Configure the Targeter ............................................................................................................ 48
Running the Mission ............................................................................................................... 55
Tutorials

Simple Orbit Transfer


Objective and Overview
Final result: HohmannTransferDesign.script [scripts/HohmannTransferDesign.script]

Note
One of the most common problems in space mission design is to transfer from one
circular orbit to another circular,coplanar orbit. Circular, coplanar transfers are used to
raise low-Earth orbits that have degraded due to the effects of atmospheric drag. They
are also used to transfer from a low-Earth orbit to a Geosychronouse orbit and to send
spacecraft to Mars. There is a well known sequence of maneuvers, called the Hohmann
transfer, that performs a circular, coplanar transfer using the least possible amount of
fuel. A Hohmann transfer employs two maneuvers. The first maneuver raises the orbital
apogee (or lowers orbital perigee) to the desired altitude and places the spacecraft in
an elliptical transfer orbit. At the apogee (or perigee) of the elliptical transfer orbit, a
second maneuver is applied to circularize the orbit

In this tutorial, you will use GMAT to perform a Hohmann transfer from a low-Earth parking orbit
to a Geosynchronous mission orbit. This requires a Target sequence to determine the required ma-
neuver magnitudes to achieve the desired final orbit conditions. In order to focus on the configura-
tion of the Target sequence, you will make extensive use of the default configurations for spacecraft,
propagators, and maneuvers. The Target sequence employs two velocity-dirction maneuvers and
two propagation sequences. The purpose of the first maneuver is to raise orbit apogee to 42165 km.
The purpose of the second maneuver is to nearly circularize the orbit and yield a final eccentricity
of 0.005. The basic steps of this tutorial are:

1. Create and configure a Differential Corrector.


2. Modify the DefaultOrbitView to visualize the trajectory.
3. Create two default ImpulsiveBurns.
4. Create a Target sequence to (1) raise apogee to GEO altitude and (2) circularize the orbit.
5. Run the mission and analyze the results.

Configure Manuever, Differential Corrector, and Graphics


For this tutorial, you'll need GMAT open, with the Default Mission loaded. To load the Default
Mission click New Mission in the Toolbar or start a new GMAT session. We will use the default
configurations for a spaceraft (DefaultSC), a propagator (DefaultProp), and maneuvers. Default-
SC is configured to a near circular orbit and DefaultProp is configured to use Earth as the central
body with a gravity model of degree and order 4. The default impulsive burn model uses the Velocity
Normal Binormal (VNB) coordinate system. You may want to open the dialog boxes for these ob-
jects and inspect them more closely as we will leave the settings of those objects at their default values.

Create the Differential Corrector


You will need a Differential Corrector later in this tutorial so we'll create one now. You can leave
the settings at their defaults.

47
Tutorials Simple Orbit Transfer

1. In the Resource Tree, locate the Solvers folder and expand it if it is minimized.
2. Right-click the Boundary Value Solvers folder, point to Add, and then select Differential
Corrector.

Modify the default Orbit View


We need to make minor modifications to DefaultOrbitView so that the entire final orbit will fit in
the graphics window.

1. In the Resource Tree, double-click the DefaultOrbitView.


2. Set the values shown in the table below.

Table 1. DefaultOrbitView settings
Field Value
Solver Iterations Current
ViewUpDefintion X
ViewPointVector boxes 0,0, and 120000 respectively.
3. Click Ok.

Create the Maneuvers.


We need two ImpulsiveBurn objects for this tutorial. Below, you'll rename the default Impulsive-
Burn and create a new maneuver.

1. In the Burns folder in the Resource Tree, right-click on DefaultIB, select Rename.
2. In the Rename dialog box, type TOI, an abbreviation for Transfer Orbit Insertion.
3. Right-click on the Burns folder, point to Add, and select ImpulsiveBurn.
4. Rename the new ImpulsiveBurn object to GOI, an abbreviation for Geosynchronous Orbit
Insertion.

Configure the Targeter


Now you will configure a Target sequence to solve for the manuever values required to raise the orbit
to Geosynchronous altitude and circularize the orbit. We'll begin by creating the Target sequence
and then discuss the the function of each command. Finally, we'll configure the commands for
our problem. To allow us to focus on the Target sequence, we'll assume you have learned how to
propagate an orbit to a desire condition by taking the Create Your First Mission Tutorial.

Configure the Initial Propagate Sequence


1. Click on the Mission tab to bring the Mission Tree to the foreground.
2. Configure Propagate1 to propagate to Periapsis. The procedures are discussed in Creating
Your First Mission. You can optionally leave Propagate1 with default settings.

Create the Target Sequence


Now create the commands necessary to perform the Target sequence. Figure 9 illustrates the con-
figuration of the Mission Tree after you have complete the steps in this section. We'll discuss the
the Target Sequence after it has been created.

48
Simple Orbit Transfer Tutorials

Figure 9. Target Sequence for the Hohmann Transfer


To create the Target Sequence:

1. In the Mission Tree, right-click on Prop To Perigee, point to Insert After, and select Target.
2. Right-click on Target1 and select Rename.
3. In the Rename dialog box, type Hohmann Transfer, and click OK.
4. Right-click on EndTarget0, point to Insert After, and select Propagate.
5. Right-click on Hohmann Transfer, point to Insert After, and select Vary.
6. Rename Vary1 to Vary TOI.
7. Complete the Target sequence by adding the commands inTable  2 after Vary TOI in the
Target sequence.

Table 2. Additional Target Sequence Commands


Command Name
Maneuver Apply TOI
Propagate Prop to Apogee
Achieve Achieve RMAG = 42165
Vary Vary GOI
Maneuver Apply GOI
Achieve Achieve ECC = 0.005

Note
Let's discuss what the Target sequence does. We know that two maneuvers are required
to peform the Hohmann transfer. We also know that for our current mission, the final
orbit radius must be 42165 and the final orbital eccentricity must be 0.005. However,
we do NOT know the size (delta v magnitudes) of the maneuvers that precisely achieve
the desired orbital conditions. You use the Target seqeunce to solve for those precise
maneuver values. But, you must tell GMAT what controls are available, (in this case two
maneuver values) and what conditions must be satisfied (in this case orbital radius and

49
Tutorials Simple Orbit Transfer

eccentricity). You accomplish this using the Vary and Achieve commands. Using the
Vary commmand, you tell GMAT what you would like it to solve for -- in this case the
Delta V values for TOI and GOI. You use the Achieve command to tell GMAT what
conditions the solution must satisfy-- in this case the final orbital conditions.

Configure the Target Sequence

Let's configure the target sequence.

Configure the Hohmman Transfer Command

1. Double-click on Hohmann Transfer dialog box.and change ExitMode to SaveAndContin-


ue.
2. Change ExitMode to SaveAndContinue. This will save the solution of the targeting problem
after you run it later in the tutorial.
3. Click OK.

Configure the Vary TOI Command

1. Double-click Vary TOI. Notice that the variable in the Variable in the Setup list is
TOI.Element1. Element1 of TOI is the velocity component of TOI in the local VNB system.
That's what we need, so we'll keep it.
2. In the InitialValue box, enter 1.0.
3. In the MaxStep box, enter 0.5.
4. Click OK.

50
Simple Orbit Transfer Tutorials

Figure 10. Vary TOI dialog box.

Cofigure the Apply TOI Command

1. Double-click Apply TOI . Notice that the command is already set to apply TOI to DefaultSC,
so we don't need to change anything here.
2. Click OK.

Configure the Prop to Apogee Command

1. Double-click Prop to Apogee.


2. In the Parameter list, click in the box that says DefaultSC.ElapsedSecs.
3. Type DefaultSC.Apoapsis.
4. Click OK.

51
Tutorials Simple Orbit Transfer

Configure the Achieve RMAG = 42165 Command

1. Double-click Achieve RMAG = 42165.


2. Notice that the goal is set to DefaultSC.Earth.RMAG - which is what we need, so we make
no changes here.
3. In the Value box, enter 42164.169, a more precise number for the radius of a Geostationary
orbit.
4. Click OK.

Configure the Vary GOI Command

1. Double-click Vary GOI Command.


2. Next to the Variable text box, click the Edit button.
3. Under Object List, click on GOI.
4. In the Object Properties list, double-click on Element1. (See the image below for results.)

52
Simple Orbit Transfer Tutorials

5. Click OK to close the Parameter Select dialog box.


6. In the Initial Value box, type 1.0.
7. In the MaxStep text box, type 0.2.
8. Click OK.

Configure the Apply GOI Command

1. Double-click Apply GOI.


2. In the Burn box, select GOI
3. Click OK.

53
Tutorials Simple Orbit Transfer

Figure: Maneuver2 Command

Configure the Achieve ECC = 0.005 Command

1. Double-click Achieve ECC = 0.005.


2. Next to the Goal box, click the Edit button.
3. In the Object Properties list, double-click ECC .
4. Click OK to close the Parameter Select dialog Box.
5. In the Value box, type 0.005.
6. In the Tolerance box, type to 0.0001.
7. Click OK.

Figure: Achieve2 Command

Configure the Prop One Day Command

A Blank subsection.

1. Double-click Prop One Day.


2. In the Condition list, click in the box that says 12000, and then type 86400 .
3. Click OK.

54
Simple Orbit Transfer Tutorials

Running the Mission


Before running the mission, click Save in the Toolbar and save your file to the desired location. Now
click on the Run in the Toolbar. As the mission runs, you will see GMAT solve the targeting problem
and the iterations and perturbations are shown in light blue in the DefaultOrbitView window. After
the mission is complete, the OrbitView should appear similar to the image shown below.

55
Tutorials Simple Orbit Transfer

Figure: Output After Final Propagate Sequence

You can save the resulting solution so that if you make small changes to the problem and retarget,
the initial guess for subsequent runs will use the solution from your work above.

1. Double-click on Hohmann Transfer in the Mission Tree.


2. Left-click on Apply Corrections.
3. Rerun the mission by clicking the Run button in the Toolbar. If you inspect the results in the
message window, you will see that the Target sequence converges in one iteration because you
gave provided the solution as the new initial guess.

56

Você também pode gostar