Exploring GMAT and Orbital Mechanics by Modeling InSight
- Studying the Trajectory
- Data Sources
- MATLAB Analysis
- Comparing Data
- Modeling the Trajectory in GMAT
During winter break, I decided to start learning the basics of NASA GMAT. General Mission Analysis Tool (GMAT) is an open-source software from the NASA Technology Transfer Program that allows the user to develop orbital trajectories and design missions using spaceflight dynamics and various sources of propulsion. I started learning through the GMAT Youtube Channel and through online references from GMAT’s website. Along the way, I was also introduced to various orbital mechanics concepts such as different frames of reference, propagators, and impulsive or finite burns.
The goal of the project is to recreate the InSight mission that recently landed on Mars. The NASA InSight mission is designed to land on the surface of Mars and conduct various experiments to determine seismic activity and other key parameters to the Martian surface and below. I first began by studying the trajectory window in MATLAB, and then using GMAT to model the trajectory. While there is still much to be learned about GMAT and about orbital mechanics, I found this project a useful stepping stone to better my understanding in this field.
2.0 Studying the Trajectory
Finding specific data on the launch orbital elements, insertion burns, trajectory correction maneuvers (TCMs), and times were very challenging. I was not able to find any one source that had all this information organized. Therefore, I used various sources to piece together, to the best of my ability, the details of the mission. For the near Earth operations, I used the JPL Launch Coverage Broadcast video which had telemetry data displayed along with the visualization of the upper stage. For the TCMs and cruise portion, I used the Mars.Nasa.gov website. Finally, for the porkchop plot comparison, ΔV predictions, EDL phase, and possible landing sites, I used the 2016 Insight Mission Design and Navigation AAS 14-363 document. These three sources helped me better understand the various phases of the trajectory and served as a reference when creating the orbital elements to start the mission.
To get an idea for optimal launch and arrival times and have an overview of the trajectory, I referenced my ARO309 project code. The algorithm uses the Lambert transfer method with ephemeris data from the JPL Horizons website to find the orbital elements, impulsive burns, and energies for the transfer orbit. New ephemeris files were prepared for Earth and Mars with a 10 day step in the years of 2016 and 2018. The year 2016 was particularly interesting as I found a JPL mission design document with a similar Earth/Mars transfer porkchop plot to compare my results to. Since ARO309, I have learned quite a bit more about MATLAB and rewrote the algorithm for optimization and further detailed analysis on the trajectory.
Above is the Type 1 trajectory section of the 2018 porkchop plot, and the X and Y axis of the graph is in a ten day step. The optimal launch window from the Lambert Transfer calculations was found to be in the month of May, and the Mars arrival that would yield the lowest arrival C3 was in month of November and early December. Also plotted is the actual Insight mission in the light-blue diamond which represents when it departed Earth and arrived at Mars. For most trajectories, having a low C3 energy is desired as it means there is less thrust required by both the spacecraft and the launch vehicle. It is worth noting that the above porkchop plot does not include TCM, backup TCM, or EDL ΔV’s in its calculation.
To get a better understanding of how my Lambert transfer based porkchop plot compares to researched mission data, I used the JPL mission design document for the 2016 launch year. Below is the JPL 2016 Earth-to-Mars Opportunity porkchop plot (Page 7 in the PDF).
There are various contours of different parameters in the JPL proposal porkchop plot that I have not modeled in mine, but I was able to plot the C3 and TOF. Below is my 2016 Earth-to-Mars Opportunity porkchop plot.
The two describe similar energy and time of flight conditions, but the numerical values differ. This is likely due to the fact that my plot is a simple Lambert transfer that does not account for TCM or EDL ΔV maneuvers or other space environment variables that can affect the trajectory. Despite being different, the same general shape and energies are seen between the two.
The MATLAB analysis was done in order to see how the simplifications in the MATLAB code compare to an actual space mission design code. By comparing the 2016 results, I found that there are similarities, but there are many more environmental and vehicle considerations that have been overlooked in my model. For example, the storm season on Mars was an interesting consideration taken into account by the authors of the JPL document. The trajectory also depends on the EDL phase and landing site. It is worth mentioning that the porkchop plot generated by the team was taking into account a range of latitudes on Mars for the landing, and the communications to the lander. Overall, doing the MATLAB porkchop plot generation to study the variance of my data, and to see the 2018 data was insightful.
3.0 Modeling the Trajectory in GMAT
The scope of the trajectory model would encompass the Centaur upper stage burns, a simplified version of the in flight TCM maneuvers, and a approximation of the trajectory leading up to the EDL phase. Possible inaccuracies in the model are due to a lack of sufficient data and the use of impulsive burns instead of finite burns.
We start with the coordinate frames that we are going to use. The MJ2000Eq frame with centers varying on the propagators was used universally. This helped to simplify the relative motion of the spacecraft through the different propagators. The next crucial part is to set up the propagators. Within the Earth’s SOI, the propagator used the RungeKutta89 integrator with a minimum step size of 0.001 seconds and a maximum of 2700 seconds. The accuracy was set to 9.999e-12 with a condition to stop the propagation if the accuracy was violated. For the gravity modeling, the JGM-2 model was selected and the Sun point mas was included. No atmospheric drag was added. The trajectory modeling process began with setting up coordinate frames for Earth, Mars, and the Sun. An Earth MJ2000Eq and Mars MJ2000eq frame were used for the near planet propagation. For the deep space propagation, the Sun MJ2000eq fame was used with a larger step size to speed up calculations.
The project starts on 05 May 2018 at 12:19:11.000 with the following Keplerian Elements. This time was chosen after reviewing the T+ telemetry window in the launch coverage video, and estimating when the Centaur stage crossed the equator of the Earth. The orbital parameters were estimated to match the telemetry window. From Vandenberg AFB, the booster launched 4:05 AM on May 05, 2018 at a 64 degree inclination. Shortly after stage separation, the Centaur upper stage lit for the first time to inject the spacecraft into a low Earth orbit for a systems check. SECO1 occured T+851 seconds. After coasting until T+4489 seconds, a de-spin maneuver was done and the Centaur prepared for a second burn to inject InSight to the transfer orbit. Data for when the second Centaur burn was not found and so a the location and time of the burn were estimated by the telemetry data from ULA and the geographical data from the video. At T+5601 seconds, InSight and the Centaur upper stage separated. From the launch coverage, separation occurred near the Aleutian Islands. Because I was using impulsive burns, I chose the respective time over this geographical area to be when I applied the final Centaur burn.
For the GMAT mission sequence, a simplified V burn (in the VNB reference) was added and the target was set to the Earth’s SOI. The exact direction of this burn was not clear and so it was a simple acceleration was added to have InSight escape Earth’s SOI until the TCM1. In this burn the control variable was the Centaur.Burn2.Element1 which had a constraint of the inSight.Earth.RMAG of 92400. This means that the variable that can be changed by the solver is only the burn element 1 (V in VNB) to achieve an RMAG from Earth of 92400.
The targeting system in GMAT enables the user to set the perturbation conditions, the propagator that will be used for the maneuver, and the target. The system uses some user defined initial condition and a constraint to perturbate different values for the changing variable. The difference is then calculated and compared to see if the solution has converged. Tolerances for the solver can also be defined. Once GMAT has a satisfactory solution to the controlled variable, it will achieve convergence, propagate the spacecraft to the point, and continue down the mission sequence tree. An example of a solver window is seen in Figure 3.4.
After reaching Earth’s SOI, a target to propagate the spacecraft to Mars was conducted using the deep space propagator. It is worth noting that I lumped TCMs together in order to simplify the targeting process, and to compensate for the lack of data about each maneuver. Under the TCM2 target tree in the mission sequence, I had placed an “ElapsedDays205” which was overridden by the other targets and the “proptoTimeSOI” propagation. The target was to simply cruise to Mars with a B-Plane target of 0. This was done to enable TCM4 and 5 the opportunity to correct the trajectory to estimated B-Plane target values. At the “toTCM5” target in the mission tree, the spacecraft was outside the Mars SOI, but close enough to switch the propagator model to the near Mars model. The decreased step size meant that the accuracy of the solution would increase. The solution tolerance, however, still stayed the same. The PrinceDormand78 integrator with a maximum step size of 1000 seconds and the Mars-50C gravity model was used with a point mass being the Sun.
TCM 4 included TCM 5 as well in my model which brought InSight from the SOI to just around 450 km above the Martian surface. This is when TCM6, would set the spacecraft on a trajectory to intercept a specified latitude and longitude on Mars. The EDL phase would follow, however this was not modeled.
The EDL phase of the project was not modeled due to the capabilities NASA GMAT. However, I calculated an estimated latitude and longitude of the landing site and set up a target to be achieved some distance and altitude before it. TCM6 decelerated the spacecraft and placed it in a position where it can begin the Mars EDL . In order to make the mission a bit more realistic, I had the spacecraft reach Mars similar to that in the JPL document. If the trajectory of the spacecraft were continued, it would enter Mars and land relatively near to its actual landing site. However, before this point the mission sequence terminates.
If you would like to try out the mission for yourself, or see what I have done, download the text file linked below. This code can run as a script if copy and pasted into GMAT’s “Scripts” inside the GUI. (See Figure 3.5 for an example)
My Mission Code
The mission begins at the equator of the Earth east of South America. This is the estimated position where the Centaur SECO1 occurred at. The second burn of the Centaur occurred roughly off the coast of Russia and over the Aleutian Islands. These locations were sourced through the telemetry data from the ULA launch coverage video. Figure 4.2 shows how the spacecraft departs the low Earth orbit for a interplanetary trajectory. This visually is similar to the data collected by the launch coverage video.
The deep space cruise seen on GMAT matches that of the MATLAB Lambert transfer trajectory. The Type I transfer means that the spacecraft is directly aiming to intercept the planet instead of overshooting it and meeting it at some further date, like a Type II trajectory.
Arriving at the Mars SOI by TCM4/5. By this time in the mission sequence, the spacecraft was just under 5 days from entry. In actuality, the 5th TCM occured 8 days before landing. There are time variances in my solution due to impulsive burns and possible different targeting values.
TCM 6 decelerated InSight and brought it closer to the Martian atmosphere. From this point, the EDL phase would commence and the spacecraft would use atmospheric drag and a supersonic parachute to decelerate.
Figure 4.5 shows where the trajectory terminates. This is at an altitude of 1000 km above the Martian surface with an approximated distance of 1800 km away from the landing site. These were values I set as a baseline to terminate the mission sequence and from this point the EDL phase would begin. If the trajectory was continued for another 1800 km, it would land relatively close to the actual landing site of Insight. Due to the limitations of GMAT, an entry into the atmosphere was not attempted.
Modeling the NASA InSight Mission in MATLAB and NASA GMAT exposed me to the GMAT environment, orbital mechanics, and basic space mission design. I wanted to better understand a program used for space trajectories, and I believe it was accomplished in this short project. The trajectory certainly has limitations and simplifications which altered it from the actual spacecraft. However, it was done to further my understanding of orbital mechanics introduce me to software that can help develop trajectories. There is still much to learn about NASA GMAT and space mission design, and I hope to refine this project file and continue learning about orbital mechanics and space mission design in the future.
Improvements for future versions of the trajectory model:
- Independently model each TCM in their respective times to improve the accuracy of the total mission time
- Better understand the B-Plane and how to target it
- Use finite burns instead of impulsive burns
- Have a better estimation for the Mars entry and distances
My GMAT Notes
Abilleira, Fernando, et al. 2016 Mars Insight Mission Design and Navigation. 14th ed., AAS, ser. 363, Jet Propulsion Laboratory, 2016, 2016 Mars Insight Mission Design and Navigation.
“Cruise | Timeline – NASA’s InSight Mars Lander.” NASA, NASA, 12 Oct. 2018, mars.nasa.gov/insight/timeline/cruise/.