### Section 4.7 - Trajectory to Mars!

I've saved the very best (and most intense) math problem for last! Humanity's next great leap is to land on Mars - curious how to get there and back? The following problem is taking from this website.

#### Orbital Positions

Obviously a real trajectory to Mars needs to be calculated with extreme precision, but for our purposes we can make a few simplifications. Let's assume both Earth's and Mars' orbits are perfectly circular and in the same plane, with the Sun right in the center of both. Earth's distance to the Sun is 149,598,000 km, which we'll define as 1 AU. Mars' distance is 1.524 AU, so let's go ahead and define these variables

$r_1 = 1 \thinspace AU$
$r_2 = 1.524 \thinspace AU$
$T_1 = 1 \thinspace year$

From Kepler's third law of planetary motion, we can determine the length of a Martian year

$\frac{1^3}{1^2} = \frac{1.524^3}{T_2^2}$

$T_2 = 1.882 \thinspace years$

 Earth and Mars at closest approach

At first guess, you might think it makes sense to launch for Mars when Earth and Mars are at closest approach, but that won't work for a number of reasons. Both Earth and Mars are moving laterally at different speeds as they revolve around the Sun, and the Sun's gravity will curve any interplanetary trajectory.

In order to reach Mars, we need a trajectory that will both intersect Mars as it moves across its orbit and match its orbital velocity around the Sun. A Hohmann transfer orbit according to the below diagram would be a suitable trajectory

Notice how Earth is at the gray ellipse's perihelion at the time of launch, while Mars is at aphelion at the time of arrival. But this doesn't tell us where Mars is in its orbit at the time of launch from Earth. We need to figure that out

The semi-major axis of the grey ellipse is calculated as

$a = \frac{r_1 + r_2}{2} = \frac{1 + 1.524}{2} = 1.262 \thinspace AU$

So based on that and Kepler's third law we can set up the relation

$\frac{T^2}{1.262^3} = 1$

And determine that the orbital period of the grey ellipse is $1.417 \thinspace years$. Since this would be a full orbit (Earth-Mars round trip), the one way transit time to Mars is $0.709 \thinspace years$. We already determined the orbital period of Mars to be $1.882 \thinspace years$, so based on that we can calculate the angle Mars should be at when we launch from Earth

$360^\circ \cdot \frac{0.709}{1.882} = 135.56^\circ$

#### Escape Velocity

The next thing we need to do is calculate the launch velocities and delta-v's necessary to make the trip we've plotted. We'll define two new variables, $V_1$, the velocity needed to launch from Earth and enter the correct Hohmann transfer orbit, and $V_2$, the velocity the spacecraft will have when it reaches Hohmann transfer aphelion and intersects with Mars

Once again, we can use the vis-viva equation to calculate the velocities. Here are a few numbers we'll need

Gravitational constant: $G = 6.674 \cdot 10^{-11} \thinspace m^3\cdot kg^{-1}\cdot s^{-2}$
Mass of the Sun: $M = 1.989 \cdot 10^{30} \thinspace kg$

Note that we'll also need the length of the semi-major axis of the gray ellipse, $a$. We know the distance between the Earth and the Sun is 149,598,000 km and that Mars is 1.524x that (227,987,000 km), so

$a = \frac{1.496 \cdot 10^{11} \thinspace \cdot \thinspace (2.280 \cdot 10^{11})}{2} = 1.888 \cdot 10^{11} \thinspace m$

$V_1 = \sqrt{GM(\frac{2}{1.496\cdot 10^{11}} - \frac{1}{1.888 \cdot 10^{11}})} = 32.735 \thinspace km/s$

$V_2 = \sqrt{GM(\frac{2}{2.280\cdot 10^{11}} - \frac{1}{1.888 \cdot 10^{11}})} = 21.480 \thinspace km/s$

Finally, if we're going to land on Mars, we need to match Mars' orbital velocity when we arrive. We can calculate Mars' orbital velocity through the vis-viva equation as

$V_{Mars} = \sqrt{\frac{GM}{2.280 \cdot 10^{11}}} = 24.130 \thinspace km/s$

Since Mars' orbital velocity will be greater than the velocity of the spacecraft when the two intersect at Hohmann transfer aphelion ($V_{Mars}>V_2$), the spacecraft will need to perform an engine burn to accelerate and match Mars. The delta-v requirement of the burn will be

$24.130 - 21.480 = 2.650 \thinspace km/s$

#### The Return Trip

The Hohmann transfer is the most fuel efficient trajectory to Mars, but the downside is it depends on the proper orbital alignments of Earth and Mars. We figured this out for the path to Mars, but what about for the return?

We've determined the positions of Earth at launch, Mars at launch, and Mars at arrival. Where will Earth be when we first arrive at Mars? We know the one way trip takes $0.709 \thinspace years$, so we can calculate the angle along its orbit that it will traverse

$0.709 \cdot 360^\circ = 255.14^\circ$

So now our task is to figure out the proper Earth-Mars alignment for the return mission. You'll notice that during the one way trip, Earth sped ahead of Mars by 75.14$^\circ$. That means for the return, we should wait until Earth is exactly 75.14$^\circ$ behind Mars, that way the spacecraft can take the same Hohmann transfer orbit to intersect with Earth. Let's calculate how long that delay needs to be

If Earth revolves ones every year and Mars revolves once every 1.882 years, then each year Earth increases its lead over Mars by:

$1 - \frac{1}{1.882} = 0.469 \thinspace orbits$

Which implies that Earth will be one full orbit ahead after

$\frac{1}{0.469} = 2.134 \thinspace years$

So if at arrival at Mars, Earth is 75.14$^\circ$ ahead of Mars, and we need Mars to be 75.14$^\circ$ ahead of Earth at the start of the return journey, that means relative to Mars, Earth needs to travel ahead by

$360^\circ - (2 \cdot 75.14^\circ) = 209.72^\circ$

This will take

$\frac{209.72^\circ}{360^\circ} \cdot 2.134 = 1.243 \thinspace years = 454 \thinspace days$

It's also worth noting that when the spacecraft finally does intersect with Earth, it'll be moving faster than Earth's orbital velocity, so this excess velocity must needs to be bled off (probably during atmospheric reentry).

The long length of the delay would pose a massive challenge to any manned mission to Mars, since the astronauts would have to spend over a year on the Martian surface. A faster return trip can be done with a more direct route, at the cost of more fuel.