TwiddleLab / Physics / Gravity and Orbits
Project: Mission to Mars
What you will learn
- A Hohmann transfer to Mars is half an ellipse from Earth's orbit to Mars's orbit: about 8.5 months.
- Launch when Mars is about 44° ahead of Earth; that line-up comes back about every 26 months.
- It costs about 2.9 km/s to leave Earth's orbit round the Sun and 2.6 km/s to match Mars; faster routes cost much more.
How the lesson goes
Launch windows to Mars open about every 26 months. Miss one and you wait two years. Plan the trip.
First, a guess: how many months does the trip take?
Step 1: speed up from Earth's orbit until your path reaches Mars's orbit.
Step 2: Mars keeps moving during the trip. Where must it be at launch?
Step 3: launch with your speed and your timing.
A friend's plan launches in March. It misses Mars. Fix the launch month.
The transfer ellipse has a = 1.26 AU. The trip is half its period. How many months?
Kepler's third law: T² = 1.26³ = 2.0, so T = 1.41 years. The ship flies half the ellipse: 0.71 years, about 8.5 months.
Game: Fuel budget. Get to Mars and match its speed with 6.0 km/s of fuel. Keep as much as you can.
Challenge: a fast route reaches Mars in 4.5 months. Fly both. Which one uses less fuel?
The fast route needs a bigger push to stretch the orbit to 2 AU, and it crosses Mars's orbit at an angle and too fast, so matching Mars costs about 8 km/s more.
Code: order the lines of a flight simulator loop so it flies the transfer.
gravity_x and gravity_y give the Sun's pull at (x, y). The speed changes by acceleration × dt, the position by speed × dt, and t moves on by dt until 0.71 years.
Where on the transfer does the ship move fastest?
On an ellipse the ship is fastest at the point nearest the Sun. Here that is where it leaves Earth's orbit.
Draw the cheapest path from Earth to Mars's orbit.
The cheapest two-burn route between two circular orbits is the ellipse that touches both: it starts at the nearest point and ends at the farthest, half a turn later.
Your mission, start to finish. Press Play.
Previous lesson: Tides: Gravity Stretches · Part of the course: Gravity and Orbits
Lessons are interactive and need JavaScript. Turn it on to play them.