Inspiration
We were interested in the physics behind orbits and traveling through space. We came across the concept of the Hohmann transfer and got hooked by its fantastic utility to change trajectories in our Solar System. We also used Kepler's third law to figure out the perfect timing to transfer a rocket from Earth's orbit that will reach Mars.
Here's a link to our source of inspiration: link
Here is another link to a fantastic video explaining the physics behind the Hohmann transfer: link
What it does
The Hohmann transfer consists of changing the orbit of an already orbiting object around another massive object. This is done with two burn instances. The first rocket thrust is done to exit the initial orbit of the object. The change in velocity can be computed using Newton's laws of physics, shown below. Once the initial thrust is executed, the rocket's orbit will be in the shape of an ellipse.
When the object reaches the target orbit distance, there will be a second burn which we will call the final thrust, that will propel the object to match the orbital velocity of the target orbit.
How we built it
We decided to simulate the Hohmann transfer in the context of our Solar System, where we have a rocket orbiting in Earth's solar orbit that will transfer to Mars' solar orbit.
We split our simulation into two parts:
- Simulating the Hohmann transfer in a two-body context (the Sun and the rocket)
- Simulating a one-way mission of a rocket to Mars
We create a body class with a rocket child class letting us create any planet with n mass and any x-y position. The body class also takes care of all the physics using Newton's laws of gravitation to create our physics engine. The rocket class has additional thrust functions used for the Hohmann transfer. We also have a Python file with all our constants in the International System of Units.
All of our code was written in Python, and we used a library called Pygame for the graphics of our simulation.
Challenges we ran into
We ran into many issues regarding the error bounds for the executions of the final thrust. This is due to the margin of error caused by using substantial physical values.
Accomplishments that we're proud of
We are proud of how accurate our simulation of the Hohmann transfer is and publishing a finished project for the first time. To our surprise, our result for the number of days needed to reach Mars from Earth's solar orbit is extremely accurate.
What we learned
We learned a lot about the Hohmann transfer and its usefulness in changing the orbit of a rocket.
What's next for Hohmann Transfer and Mission to Mars
The next step in this project would be to determine a way back once the rocket has reached Mars. We also want to implement a way for the rocket to successfully orbit around Mars, inspired by NASA's Artemis mission. Finally, it would be interesting to see how we can apply our simulation to other planets in our Solar System.


Log in or sign up for Devpost to join the conversation.