If you go a bit further, you can build surprisingly interesting curves from this math. Try calculating Mars' apparent motion, as observed on earth (i.e., projecting the difference of their positions onto a unit sphere). Its path is a loopy [0] curve, and looks like this:
Brian Cox did a simple demonstration of why this was using some stones (link below). It makes a nice bit of sense but it must have messed with early astronomers heads when it was first observed
Cool! This could be taken a step further, adding in the oscillation of the moons rotation for slingshot and accounting for the travel time between earth-moon-mars to come up with a good list of launch dates. I'm sure there are other factors, I'm not a rocket scientist.
From Wiki[1] the aphelion and perihelion for Mars are 1.381 and 1.666 so I think assuming that Mars orbit is circular is just wrong. The eccentricity is 9%. The inclination of Mar's orbit is also 1.8 degrees which makes a difference as well.
Wiki also lists a closest approach to Earth of 0.372 AU and a furthest distance of 2.675. The graphs on that link do not come close to those figures. They are off by 25%.
Basically I do not understand why someone would take an orbital problem, simplify all the interesting bits out of it and then put it up on a blog. Maybe he was more interested in the maths than the physics.
The results in the blog post wouldn't do to launch a probe, but they do give you a good idea of how the distance varies over time. It's a little surprising that such a simple calculation works as well as it does. More accurate calculations would be interesting, much more complicated.
The interesting thing here is that he used only algebra. This model therefore occupies a sort of sweet spot, insofar as adding to the accuracy of the model requires machinery a level above what was used to get this model.
To wit: If you want to take into account eccentricity (which I think would be the biggest source of error), the steps needed are fairly involved. For one way to do it, see [0].
Whoa! I didn't know of the Python syntax for complex numbers (1j). I was confusing the number 1 with lower case l and wondering where the "lj" symbol is coming from. Apparently you also need to use exp() from scipy, Python's standard math.exp() can't handle complex numbers (at least in python2).
The model in the blog post was obviously a simplified model. It assumes circular and coplanar trajectories, both of which are good approximations for back-of-a-napkin calculations such as this one but not super accurate for real life analysis.
In the hopes that there are some programmers interested in astrodynamics or celestial mechanics, I'll shamelessly take this opportunity to promote a related programming project of mine: https://github.com/rikusalminen/twobody
It's a simple C library that solves some fundamental problems in celestial mechanics, including state of the art solvers for time of flight (ie. solving Kepler's equation using the Laguerre-Conway method) and can work in 3D and with elliptic (and hyperbolic and parabolic) trajectories. It may seem a bit cryptic (I wish I had the time to write docs), but if you're familiar with the field, you should be able to understand most of it.
You are asking for the "shortest journey" however.
Well, the shortest journey would be to accelerate to the speed of light when they are pretty much closest to each other and arrive a couple of minutes later. Not very feasible as of 2015.
> If earth's at 12 o'clock, where is mars and what direction (N,S,E,W etc) do we aim a rocket for the shortest journey?
Mars would be about 45 degrees ahead of Earth, and we aim the rocket so that when it "exits Earth's gravity" (keyword: hyperbolic excess velocity), it will travel in a path that is parallel with Earth's orbit but faster, so the trajectory will be an ellipse with the highest point around Mars' orbit. When the space craft arrives at Mars many months later, both planets have travelled a significant distance.
Its never a direct ballistic route - its a dance of orbital slingshots. You launch from here, so when you get over there, that's where Mars is. And sometimes you do a carom off Venus or whatever, to add some energy that you couldn't afford to get by rocket fuel.
So no, the fact that Mars is sometimes very close to the Earth is not really helpful. What'd be helpful is, if the max distance were not so great. But we're stuck with what nature gave us.
It can help to try Kerbal Space Program, to get a feel for orbital mechanics. In fact, it may be the best way to get that feel.
Slingshots have never been used for Earth-Mars launches where Mars is the final destination. I am having trouble finding a reference as to whether a Venus flyby could even reduce the energy budget for a Mars mission, but in practice no one has ever decided to do that.
It does time the launches for short cruise time and lower energy required, but since the cruise time is significant that doesn't work out to launching at the moment of closest approach. See https://en.wikipedia.org/wiki/Human_mission_to_Mars section "Travel to Mars" for some discussion.
With a minimum distance of 4 lightminutes you can wait 8 minutes (at a minimum) for a live answer... unless you time delay your mind with psychotropic substances, we engineer microscopic wormhole tunneling or we discover telepathy (IF telepathy goes faster then lightspeed) there will never be a live chat between mars and earth.
https://imgur.com/a/I43kG
Note that you don't need to implement elliptical orbits to see this effect -- circular inclined orbits can exhibit it.
[0] https://en.wikipedia.org/wiki/Apparent_retrograde_motion