In this video, we're going to do a simple
orbit tutorial for the General Mission Analysis
Tool (GMAT) software from NASA.
Some of the topics that we'll cover is changing
the properties of spacecraft, of propagators,
of the orbit viewer, adding additional events
to the mission sequence, animating the orbit,
and panning around in the orbit viewer to
get a better shot of the orbit of course.
Let's get to it.
For the first step, let's go ahead and start
the GMAT (General Mission Analysis Tool) application.
So, look for a shortcut like this.
When you start it up, it's going to open up
the welcome page.
You can go ahead and click that “X” in
the top right to close the welcome page.
If this is the first time that you're opening
up GMAT (General Mission Analysis Tool) it'll
have some default objects and default properties
already opened up in the project viewer on
the left.
So, let's start editing some of those objects
for the tutorial that we want to do.
Starting with the spacecraft, right-click
on “DefaultSC” in the spacecraft folder,
and when you right-click on that you'll see
the menu pop up, and we're going to click
“Rename”, and that's going to open up
this window here with an edit text box.
We're going to type in the new name and so
let's just go ahead and call that “Sat1”
for satellite 1.
So, type that in the box and click “Ok”.
Now that we renamed the satellite, let's go
ahead and open up the spacecraft properties window.
You can do that by double-clicking on the
object in the left project viewer window.
We renamed it Sat1 so find Sat1 and double-click
on it.
With the properties window open, you'll notice
that it has a bunch of tabs at the top.
Each of those tabs have a group of different
properties of the spacecraft.
For this tutorial we're going to just focus
on a simple orbit and so we're going to stay
here on the “Orbit” tab and adjust those
parameters only.
In future videos we'll cover some of the other
tabs and properties in those tabs.
Let's get back to the tutorial and entering
in the orbital elements.
As a reminder, we're on the spacecraft properties
window for Sat1.
We're first going to start with specifying
the epoch format and the actual epoch.
On the orbit tab, if you look on the left,
the first selection box gives you the option
to choose the format that you want to specify
the epoch.
For our tutorial, we're going to use “UTCGregorian”
so find that in the list and click on it.
With the format specified, we can go ahead
and actually enter in the epoch time.
Now for UTC Gregorian it's very important
to get the format right.
This basically takes the text entered into
epoch and breaks it up into the different
pieces so if you get format wrong it's going
to have an error and it will tell you if you
entered it incorrectly.
So, go ahead and choose your epoch time.
Moving on to the other orbital parameters
or orbital elements, you'll notice that the
default state type is “Cartesian”.
We're actually wanting to specify our orbit
using “Keplerian” so in the selection
box for state type go ahead and find Keplerian
and select it.
You'll see that the values in the right column
change from Cartesian elements to Keplerian
elements and as you can see they have the
units there on the right of the box so you
know which units to use.
So, go ahead and fill in the orbital parameters
and then when you're done with that click “Ok”.
With that, we're done editing the spacecraft
properties.
Let's move down and start editing the default
propagator’s properties.
We're first going to change the name of the
“DefaultProp” so in the tree on the left
(if the propagators folder is minimized go
ahead and click on the “+” sign next to
it to expand it out so that you can see the
default propagator) right-click on it and
then in the menu that appears go ahead and
click “Rename”.
That will open up a window with a edit text
field where you can type in the new name.
I'm going to go ahead and call this one “EarthPointProp”.
So, when you typed in the new name go ahead
and click “Ok” and you'll notice in the
tree on the left that the name has been updated.
So, now we're going to go ahead and double
click on it in the tree view to open up the
propagator properties window.
This window is split into two columns.
The first column contains different variables
or settings for the integrator of the propagator
and the second column contains the parameters
or variables or settings for the force modeling
that GMAT (General Mission Analysis Tool)
does.
For this tutorial, we're going to leave the
integrator properties alone and just let it
use the default values.
We're also going to leave the central body
on “Earth” because that's what we want
to orbit around.
However, we do need to change the primary
body from “Earth” to “None”.
This is because we are doing a point mass
example and we don't want to have, or rather
we don't care about, a gravity model or a
drag model.
So, when you click “None” you'll notice
that the gravity and drag models get grayed out.
Now, we need to add earth to the list of point
masses that the propagator, or rather force
model, takes into account.
In the right hand column towards the bottom,
you'll notice that there is a button that
has the label “Select” on it next to the
point masses area.
If you click on that, it will open up this
window.
This window is used to specify which of the
available bodies you want to use as a point
mass in your example.
To use something out of the list of available
bodies in the point mass force modeling, we
need to move it from the “Available Bodies”
column to the “Selected Bodies” column.
So, to add a body to the model we need to
find it here in the left column and then click
this top button (which is a right arrow) to
move it from the “Available Bodies” to
the “Selected Bodies”.
If we wanted to remove a point mass from our
force model, we would select it here in the
right column, in the “Selected Bodies”
column, and then click the left arrow to move
it back into the “Available Bodies” list.
In this tutorial, we're just going to have
Earth as our point mass so select “Earth”
and deselect anything else that might already
be in the “Selected Bodies” column and
when you're done with that go ahead and click
“Ok”.
When you do that, you'll notice that the point
masses that are being modeled shows up in
a list next to the button that you clicked
to open the window.
And that's going to be it for the propagator
properties so go ahead and click “Ok”
on this window to save the changes to the
propagator.
The default object has two other output objects
that will appear when we actually run the project.
I show them here on the left.
The orbit view is a 3D modeler that allows
us to zoom in, zoom out, allows us to pan
or rotate to get a better view of the body
we're orbiting, of the body that is being
orbited, of the orbit path.
It also allows us to hit play and see an animation
of our project.
The bottom one is a ground track plot that
allows us to see how our satellite flies over
the earth.
We're going to update some of the properties
of the orbit viewer (the top one here).
So, in the tree on the left under the output
folder if you expand that you should see a
“DefaultOrbitView”.
Go ahead and double-click on that and that
will open up the properties window for that
object and you'll see this window.
There's a lot going on in this window and
it's all about making that orbit viewer.
We have different options for how we plot
things.
We have different options for what objects
we view or where we view from (this would
be adjusting the camera) along with some other
drawing options.
So, let's go ahead and on the left column
we're going to go ahead and turn off the “XY Plane”.
You don't really need to do that.
I just think it looks better with it turned
off, at least for earth.
We're also going to go to the top right and
adjust what objects we view.
Of course, we want to make sure that the spacecraft
that we're actually doing this project for
is shown in this so go ahead and make sure
our spacecraft, or Sat1, gets moved from the
list of “Available Spacecraft” into the
“Selected Spacecraft”.
Likewise, we're going to go ahead and include
“Earth” as a plotted celestial object.
You can add other ones in there if you want
to but we're just going to do earth for right
now and then click “Ok” when you're done
with that.
In a later video, I'm going to go ahead and
talk about the “View Definition” and how
we can move the camera around to see better
shots of the orbit.
So, stay tuned for that video.
Up to this point, we've been working on the
“Resources” tab which allows us to add
objects and modify their properties.
However, now we're going to switch gears and
we're going to work on the “Mission” tab
and start specifying what we want the objects
to actually do but first let's start with
an example.
Right here I have a picture of the Apollo
8 lunar mission sequence.
Apollo 8 was an orbital mission around the
moon.
So, as you can see in this mission sequence,
the first part is launching into the earth
orbit and then from there they’re going
to do a burn to establish the earth orbit
on looks like number 2 there.
Then on number 3 they do a burn to go to a
translunar trajectory, meaning from earth
to the moon.
Then, when they get to the moon, they do another
burn to go into a lunar orbit.
Then they sat there for a bit and did whatever
they need to while they were orbiting it.
When they were done, they went ahead and went
into another burn to leave the lunar orbit
and head back to earth.
That's number 6 there.
And then, when they were getting close to
earth of course, on number 7 is when they
start doing their burns to re-enter the Earth's
atmosphere and land the craft.
So, as you can see by this mission sequence,
really there's multiple different if you want
to call them “orbits”, there's different
burns, there's different actions that are
going on for the entire mission sequence.
And so that's what we are wanting to do here
on the “Mission” tab is we're wanting
to build all of these different actions in
the proper order so that when we simulate
our project we get the correct behavior from
our spacecraft.
And so, from our example, it shows seven different
events in the mission sequence.
If we're transferring that over into GMAT
(General Mission Analysis Tool), we'd have
seven different items here in the mission
sequence in order to try and build out that
Apollo 8 lunar mission and maybe we'll do
that for a future video just as a tutorial.
That'd be pretty fun.
So, go ahead and click on the “Mission”
tab and let's start building out our mission sequence.
So, let's go ahead and start editing the mission
sequence in our simulation.
The default simulation already has an event
in there called “Propagate1”.
Let's go ahead and double-click that to open
up the properties window and when you'll do
that you'll see a couple things in here.
You'll see in the “Spacecraft List” what
object the event is for, and with its propagator
you'll see how it's going to move that object,
and then towards the bottom you'll have the
list of stopping conditions.
The way that it works is that if any of these
become true it will stop that event and move
to the next event in your list.
So, if you have a dozen different stopping
conditions whichever one happens first is
what's going to stop it and move it on to
the next event.
Then if you look at the bottom you have an
option to override what color is plotted in
the orbit view and this is helpful when you
have multiple events you can see what those
events look like compared to other events
in your mission sequence.
So, let's go ahead and start updating this
event for our tutorial and using the “EarthPointProp”
to propagate the Sat1 is what we want but
we're going to go ahead and change the stopping
conditions for this event.
If you look, the initial stopping condition
is “Elapsed Seconds” with a value of looks
like 12,000.
This would cause our satellite to orbit the
earth using the “EarthPointProp” for 12,000
seconds until it would stop and move on to
the next event.
What we're going to do is we're going to change
the stopping condition.
To do that, let's click on these dots to the
left of the parameter we want to use for our
stopping condition and when you click on those
three dots it's going to open up this dialog
here where it will allow us to choose the
object and parameter for the stopping condition.
Some of these parameters you need to specify
what the “Central Body” is.
For instance, periapsis is the closest that
the orbiting object comes to the central body
and so we need to specify what central body
we're talking about.
On this sim, it would be “Earth”.
So, go ahead and make sure you select Sat1
as the object and periapsis as the parameter
that we're wanting to use as the stopping
condition and then use the right arrow to
move it to the “Selected Values” and then
go ahead and click “Ok”.
When you do that you'll notice that the list
of stopping conditions is updated and that
periapsis doesn't have a condition to check
for.
This is because this particular parameter
is a location parameter, right, so that means
that it will stop this event in the mission
sequence when it gets to that location and
then move on to the next event.
So, when you're done changing the stopping
condition click “Ok” on the “Propagate1”
properties window.
For this simulation, we're going to actually
add another event to our mission sequence.
If you right-click on “Propagate1” and
on the pop-up menu if you choose “Insert
After” it will give you a list of different
events that you can choose.
Go ahead and find “Propagate” down there
towards the bottom and click on it.
When you do that, you'll see that in our mission
sequence a second event has been added called
“Propagate2”.
So, the way this mission sequence is going
to work is that it will run “Propagate1”
until it encounters the first stopping condition
that becomes true and then it'll run the “Propagate2”
event until it reaches its first stopping
condition.
So, let's go ahead and double-click on that
“Propagate2” and update its stopping condition
and properties.
When the property window opens for the second
event, again you'll see that it shows the
spacecraft Sat1 and propagator “EarthPointProp”
so it's going to move the Sat1 using the “EarthPointProp”,
which is what we're looking for.
And the default stopping condition again is
elapsed seconds and that's what we want to
change so go ahead and click on those three
dots to the left of “Sat1.ElapsedSecs”
and that will open up this dialog.
For the second event, we're going to choose
the stopping condition as the location of apoapsis.
So, in the “Object List” we're wanting
to create the stopping condition we're going
to choose Sat1.
We're going to scroll down “Object Properties”
to find apoapsis and again since this is a
location of which the satellite is furthest
from the body it's orbiting (the central body)
we need to specify what that “Central Body”
is for the stopping condition which is Earth.
So, make sure that says earth then use the
right arrow to pass that parameter to the
“Selected Values” we want to use as a
stopping condition.
If there's anything else in that “Selected
Values” list use the left arrow to remove
it from the list and when you're done with
that click “Ok” and you'll notice in the
list of stopping conditions that it changed
from “Sat1.ElapsedSecs” to “Sat1.Earth.Apoapsis”.
And since it's a location, there is no stopping
condition just whenever the satellite gets
to that location it's going to stop.
And in this one, just for this tutorial, so
we can see the difference between the two
events and how they work together I went ahead
and chose to override the color for that segment
and make it bright green and then go ahead
and click “Ok” on this “Propagate2”
window to save the changes that we made to
this event in the mission sequence.
Alright, we're done making changes and updating
both the objects and the events that we want
to occur and so now comes the point where
we want to actually run our project to simulate
the mission sequence.
So, to run the simulation you have the buttons
here in the toolbar.
You've got the play button, there's the pause
button, and stop button and so if you hit
play then you'll notice that these two windows
appear inside of the workspace area and those
appear because we had them in the “Outputs”
folder.
We had a default orbit viewer that we just
did the properties for then we had the default
ground track plot.
After the simulation has finished running,
we're actually able to animate the results
to see the satellite travel over the ground
track plot or to see the satellite orbit around
the earth to visualize the mission sequence.
And we'll check that on the next slide but
real quick there's also here on the top right
this “GUI Modified”.
This simply means that you've made changes
to the script file using this GUI but you
haven't saved it yet so before you close out
of any of this, after you're done checking
out the results, make sure that you save it
if that's what you're wanting to do.
So, I went ahead and made the orbit viewer
bigger and I'm going to click the animation
button a couple times here so that you can
see the satellite moving around the earth.
I'll go ahead and pan it and rotate to get
a better view of the orbit and click animation again.
So, as you can see, there's that red loop
around that it does that's the first event
and then when that event hits its stopping
condition at periapsis the second event starts
and that's where we're getting that green
line that goes to apoapsis.
And, of course, I can zoom in closer and I
can zoom out just to get a better shot not
only of the orbiting object but also the object
being orbited.
So, this is pretty cool.
Go ahead and play with it and check it out
and that's where I'm going to end it for this video.
If you liked what you saw and you want to
see some more: Like, Comment, Subscribe.
I'll see you in the next video.
