Hohmann Transfer Orbit Demo
Introduction
Creating this demo helped me to understand Hohmann transfer orbits a lot better.
A Hohmann transfer orbit is the most fuel-efficient (but not the quickest) way to
get from one orbiting body to another. Using one to get to Mars involves flying
180 degrees of an elliptical orbit whose periapsis (closest point to the sun) coincides
with being on Earth and whose apoapsis (furthest point from the sun) coincides with
reaching Mars. You also have to time your launch so that the satellite reaches
its crossover point on the Martian orbit at the same time as Mars.
What's going on
There are about a gazillion websites that explain Hohmann transfer orbits far better
than I could ever do, so here I'll just try to highlight what the demo aims to show.
The demo uses the "Standard Assumptions": Earth and Mars are in circular orbits
in the same plane as the Sun; the masses of Earth, Mars and the satellite are negligible
compared to the Sun's mass; and there are no other bodies in the universe affecting
the orbits (so we ignore Jupiter, etc).
But the demo differs from reality in at least one big way - you can change Earth's
orbital radius! The default Earth radius is the correct proportion of the
Martian radius, but just for fun you can shrink or expand it using the slider in
the top-right corner. You can do this at any time but it is probably best
to do it before you start the simulation. The smaller the Earth radius, the
more eccentric the transfer orbit (and the less time you will have to wait for a
launch window). A more eccentric transfer orbit will let you see Keppler's
law in action (the satellite moves more quickly when closer to the Sun).
We must wait for an appropriate moment to launch the satellite. Because the satellite's
semi-major axis is shorter than Mars's, its period (time to complete one orbit,
T) is less than Mars's. In the time that the satellite takes to travel 180 degrees
(ie from Earth to Mars), Mars will have travelled the fraction [Tsat/Tmars] of 180
degrees. So we need to wait until Mars has a 'head start' on the Earth of the angular
difference: 180 * (1 - [Tsat/Tmars]) degrees.
When Mars has the correct head start on the Earth, the satellite is launched on
an elliptical Hohmann transfer orbit. The Sun is at one focus of the orbit ellipse.
The major axis of the orbit ellipse is the sum of Earth's radius plus Mars's radius.
The distance from the Sun to the center of the ellipse is half the distance from
Earth to Mars. "Periapsis" coincides with the satellite being on Earth. "Apoapsis"
corresponds with the satellite reaching Mars. The official demo ends at this
point, but you can let the objects continue in their orbits forever if you like
(the satellite behaves as if the planets weren't there).
The demo includes a date display to give a rough idea of the timescales involved.
The demo begins with Earth and Mars in opposition (together in a line on the same
side of the Sun). This position is labelled June 13, 2001, when an opposition
did indeed occur. The demo finds a launch window on May 8, 2003. In
fact, the launch window used by the Mars Express and Mars Exploration Rover programmes
began on May 23, 2003. Clearly, a real-world calculation cannot use the simple
assumptions (such as circular planetary orbits) used by the demo. The demo
predicts arrival on Mars on January 21, 2004 giving a flight time of 258 days,
which is indeed the typical duration.
Click here to see the demo.
Click here to download all the source code (hohmann.zip
- 13 KB)
The C# files: