The Mathematics of a Trip to Mars?
hakonhaugnes wonders: "Since trips to Mars seems commonplace (NASA has sent one every 26 months), I thought it made sense to try to understand how the interplanetary trajectory is calculated. NASA's page is deploringly void of intricate details. I found this
excellent page, but it still left me feeling that I was missing something. Surely the calculus must go beyond two bodies (mars/earth)? (It seems there are commercial MATLAB scripts available but at $150 it went beyond the defensible to satisfy my curiosity). Are there any curious Slashdot readers with the usual great insight into how to calculate a trip to Mars?"
There has been a very long tradition of making source code developed by Government projects available to the general computing public. This is the true "public domain" software that has existed since the beginning of computing. I believe many bits of code from NASA made it into the public domain over the years.
I would bet that the information you desire is now considered to be highly classified and thus not available. You could produce trajectory information for ballistic missiles and who knows how it might be mis-construed as useful to those "terrorists" of whom the US is so fearful these days.
Besides... you might find a units of measure error or two if you got to see this code.
Several of the people I work with in Caltech's Control and Dynamical Systems department work on celestial mechanics and calculating space flight trajectories -- and I can assure you, it's some pretty complicated stuff, involving invariant manifolds and (IIRC) patching together different three-body systems. There's a good popular article about this in Science News, and you can find more info (in as much detail as you'd like!) on Shane Ross' homepage.
Cheers,
IT
Power corrupts. PowerPoint corrupts absolutely.
Easier: Orbiter.
I once worked on a more complex version (after writing a simpler version), but got distracted to other projects somewhere between the finished code to implement Kirchoff's laws for the electrical system and the unfinished code to calculate the volume and mass of a fuel tank.
Kneel Before Christ!
I recently had a NASA guy come to speak to my research group at my medical school in Houston. We were talking about the long term effect of micro-gravity on human physiology (round trip to Mars). Anyway he told us that most of the mathematical calculations that the Space Flight Center here in Houston use are the "simple" Newtonian laws of motion. He claimed they were suitable for calculating trajectories to the Moon, Mars, etc...
Argh. The laws of science be a harsh mistress.
Orbiter is a great way to learn how those trips are done. It is a free simulator for windows and is available at www.orbitersim.com.
It has tools for calculating all sorts of interplanetary transfers and you can actually perform the flight from launch to landing on mars with all kinds of spacecraft.
The key here is the energy required. Space travel is still dominated by propulsion. That is, the engines and the fuel they need, and the fuel needed to launch that fuel to orbit, etc., is where most of the cost is.
It is important to travel on a trajectory, called the transfer orbit, that requires the least energy. For a high thrust spacecraft, the minimum energy trajectory is called a Holman transfer. Simply, it is an orbit that just touches the orbits of both planets. The periapsis, the closest point to the sun, touches the orbit of the one planet and the apoapsis, the furtherest point, touches the other planet. For this to work, the destination planet needs to be half an orbit away when the spacecraft arrives. This is a lot easier to see in a picture.
For Earth to Mars, the spacecraft launches and then the thrusters fire to change the spacecraft's orbit of the sun from Earth's orbit to the transfer orbit. It then travels half of the transfer orbit and fires its thrusters to change its orbit to match Mars. This can be done by aerocapture, aerobraking or propulsion. The opportunity for a Holman transfer to Mars occurs every 26 years. It is based on the length of the orbit for the bodies being transferred between. The return trip also needs to be a Holman transfer to save fuel. The opportunity does not occur until many months after arrival. I forget the actual number. That is why Mars trips will have a long stay on Mars before returning.
Low thrust is different. Low thrust spacecraft thrust all or most of the time during the trip and the trajectory is more complicated. It is not usable for manned flight because it is to slow but is useful for unmanned spacecraft sometimes.
This is called Celestial Mechanics. When you add propulsion, it becomes Orbital Mechanics.
The best site I have found is NASA's Spacefligh Basics.
Also good is this site.
For explanation of gravity assists see this site.
Also see, Science World at Wolrram
The best info I've found so far is actually a do-it-yourself exercise... there's a space-travel simulator that you can use to try to figure out how to get to mars, along with some helper apps that do some math for you.
In terms of starting, basic data... you can ignore the effects of the MRO on the two planets, since it's so small. But the positions of the two planets can be gotten from here. To understand the coordinates used, study here.
I'd like to find some decent open-source apps to visualize the orbits in 3D... at least a static diagram, if not an animation.
For my mission planning software we never considered more than two bodes at a time. For the real stuff, they probably consider more than two bodies at a time, but the other bodies are just correction factors.
The Mechanical Universe, is an excellent way to learn this stuff. It comes on in reruns from time to time.
Duncan Sharpe's TransX
C'mon Orbiter fans, you were thinking the exact same thing when you read this article... Planning a trip to Mars? Just hit Shift-J and start plotting your Hohmann transfer orbit insertion burn.
For those who are lost:
ORBITER is a free flight simulator that goes beyond the confines of Earth's atmosphere. Launch the Space Shuttle from Kennedy Space Center to deploy a satellite, rendezvous with the International Space Station or take the futuristic Delta-glider for a tour through the solar system - the choice is yours.
But make no mistake - ORBITER is not a space shooter. The emphasis is firmly on realism, and the learning curve can be steep. Be prepared to invest some time and effort to brush up on your orbital mechanics background. A good starting point is JPL's Space Flight Learners' Workbook.
also...
TransX is [Duncan Sharpe's] eXtended Transfer MFD. It's designed for planning trips across the solar system, or even just to the moon. It's full-featured, with support for complex flight plans, including slingshot trajectories. And naturally, there's a manual that comes with it.
by Roger Bate.
A fun physics exercise is to model a slingshot maneuver and then try to figure out *why* your rocket burn is more effective if you dip inside gravity well when you do it.
Consider an elliptical orbit around the sun (aren't they all...) with a major axis where perihelion is earth's distance, aphelion is Mars' distance from the sun. I don't know the formula, but you should be able to find it on the net.
Now calculate the orbit time. You start your trip tangent to the earth, and blast away faster than the earth is circling the sun (but in the same direction). You catch up to Mars as the top of your orbit is tangent to (grazes the inside of) Mars' orbit. Therefore, total trip time is 1/2 the orbit period (full orbit time shoould be somewhere between Earth's year and Mars' 2 earth-years - I guess about 16 months?).
This ignores secondary effects like the slowdown escaping earth's gravity, and the acceleration reaching Mars. These should be minor adjustments - you would have to adjust your departure velocity from Earth to include extra for escape velocity from your starting point (presumably Low Earth Orbit). As you depart, Earth will slow you down somewhat, but past a million miles the effect should be negligible. It also ignores the ellipticity(??) of both Earth and Mars orbits, which change the distance an path - more second-order calculations. (Earth's orbit varies from 92m mi to 94m from the sun.) The second-order calculations shouldn't make a big difference...
Then you need braking power at Mars, or you can use the atmosphere to brake (or break, if you miscalculate Km vs. Miles).
So, the launch windows occur when Mars is in such a position that it will be 180 degrees ahead of Earth's current position when you get there...)
Let's say the orbit time above is 16 months (a guess). So if today is a launch window, Mars has to be 180 degrees away in 16 months. Next window? 12 months from now, we're back here (360 deg) but Mars is 180deg away(2-year-long year) from where it was last launch time. 4 months more(16), we're 120 further, Mars 60 more, 180+60 = 240, or only 120 ahead now...etc. 18mo. and we're 360+180, Mars is 180 degrees; bingo - press the launch button again, and in 16(/) months, mars will be where you need it to be.
Basically we're solving for integer solutions of: y= 2x (mod 360); but of course, the Martian year is not exactly 2 earth years. Look that up too.
You can only launch in the same direction as Earth (and Mars) travel around the sun. This is the minimal amount of rocket fuel. It's like throwing a ball in the air so the top of its arc is just as high as the spot you want it to hit... Launch counter to Earth's orbit, other way, and instead of using the speed of the earth's solar orbit to boost you to Mars, it is a detriment. You'd be better off with a more direct route, if you have the fuel to burn.
For faster transits, you just need an arbitrary chunk of an ellipse which intersects both orbits at the correct time. As for slow, steady propulsion like ion-drive or solar sail - well, that's why calculus exists.
Rotsa Ruck.
The saying is "From low earth orbit, you are halfway to anywhere in the solar system." The delta-V (change in velocity) required to get to low earth orbit is about 7.6 m/s neglecting gravity and drag losses. The velocity to escape is about 13 m/s. Add in a little bit of velocity to correct your orbit to make it to Mars and it's about right, 14 m/s. (actually it'll be a bit more if you're launching from Kennedy, you have to get rid of that pesky inclination and that's an expensive maneuver, even combining it with the trans-martian injection it's expensive.
Here's the actual procedure.
1. surface to low earth orbit.
2. circularize low earth orbit. [hohmann transfer]
3. correct orbital parameters (longitude of ascending node, argument of periapsis, orbital inclination)
4. low earth orbit to trans-martian-injection [hohmann transfer]
(3 and 4 can be combined, to a point, in order to save delta-V.)
5. burn to circularize martian orbit [hohmann transfer]
6. correct orbital parameters (Same as 3)
7. Burn to descend to surface
The actual math is too much for a slashdot post. Sorry. If you are truly curious check out "Elements of Spacecraft Design" by Charles D. Brown.
-everphilski-
check out STK, http://www.stk.com/ from AGI. It's pratically an industry standard.
Want to plan a trip to Mars? no problem using the Astrogator plug-in you're in buisness. However it will set you back several thousands of dollars....
The easiest way to conceive of interplanetary orbits is to first pretend that they lie in a single plane (the plane of the ecliptic) and then pretend that the planets themselves are insignificant for most of the trip -- so you consider only the gravitational field of the Sun. Then your orbit is an ellipse. It's pretty easy to show that, if you're going at Earth's orbital velocity, the ellipse that gets you from Earth's orbit to any other nearly circular orbit with the least change in velocity (ie rocket fuel) is an ellipse that is tangent to both orbits.
Once you've figured that out, you have to figure out when to launch to get to Mars's orbit in the same place that Mars happens to be. Those times happen at a particular phase of Mars's and Earth's orbit.
You can do pretty well by pretending that you can neglect the Sun entirely until you get far enough from the Earth, then you can neglect Earth and Mars entirely until you get close enough to Mars. That is the technique that was used for Apollo trajectories -- the "method of spliced conics". You can hear some evidence of it in the Apollo 13 movie, when they talk about "entering the Moon's gravitational field" or something like that -- the Moon's gravitational field extends throughout the Universe, of course, but to simplify the calculations they neglected everything but the mass with the strongest gravitational force on the capsule.
Nowadays you can get really, really good orbital elements for each of the planets online, which lets you calculate exactly where each planet is at any given time. You can just code up an insanely cheesy inverse-square-law integrator in PDL or one of the other free languages -- or even a spreadsheet -- and find a good orbit by trial and error using the gravitational fields of all the large bodies in the solar system.
Take a look at the book "Mining the Sky" by John S. Lewis. Without getting into a deep mathmatical treatment, he does lay out what goes into calculating sending missions to and from Mars, Earth orbit, the moon, and the asteroid belt. If I am not mistaken, somewhere in there he even explains the significance of the oft heard NASA term "launch window". (It's basically when your launch site (Florida, for instance) and your target (Mars or the ISS) share a favored geometerical relationship in space-time.) While it is lite on the equations, I think this will have most of what you are looking for.... Now if I can just find my copy. BTW.. Lewis' books are a must read for anyone interested in what's up there, whether it's the moon, Mars, or beyond.
Anyway, without at least some education in orbital mechanics/astrodynamics, the above ref will probably be a little overwhelming. To get up to speed I recommend the following:
"It takes considerable knowledge just to realize the extent of your own ignorance." - Thomas Sowell
This page is a good start for learning about all the fun stuff that you have to do. Not quite the math you're looking for, but it covers stuff other than just orbits.
The Hohmann transferr orbit is based on a few simple ideas. 1. You only want to do two short "burns". 2. Your orbit in between is an ellipse. 3. The most efficient way to increase your kinetic energy is to push yourself forward. This means that you'll be leaving Earth tangentially to our orbit. By the same token, you'll arrive at Mars tangentially to their orbit (the math is the same backwards). All orbits have constant energy (no slingshots considered here), so you'll go from orbit near Earth at one energy, to an in between energy, to an orbit near Mars energy. Note that the final burn near Mars should actually *increase* your kinetic energy. If you didn't do the burn, you'd "fall" back down to near Earth's orbit. So both burns are "forward". Once you accept these concepts of the Hohmann transfer, the timing is just math.
main(O){10<putchar((O--,102-((O&4)*16| (31&60>>5*(O&3)))))&&main(2+ O);}
LN2 is cool!
Atomic Rocket has some interesting reading. It's a nice mix of (as far as I can tell) good physics and some science fiction theory.
Basically, the whole site was designed to help new sci-fi authors make their stories closer to scientific reality. So there's a lot of info not only on the various requirement for a mars trip with different types of engines (everything from chemical thrusters to ion drives to nuclear rockets to the sci-fi only torch ships) to what the requirements would be for a crew living on such a ship and what sort of person defense would actually be reasonable.
It's a fun read, and quite educational as well, if not as hard-core science-y as some of the replies.
The orbital mechanics that the Hohlmann transfer to Mars takes advantage of allow a "cheap" (low-energy) shot at Mars about every 2 years.
You see? You see? Your stupid minds! Stupid! Stupid!
Truck bombs are actually far more frightening than most people think. Think about it for a moment - the IRA's attack on Manchester in the late 1990s was a 1,000 lb. truck bomb - probably fertilizer. The Oklahoma City bombing was about the same sort of size. The biggest conventional bomb in the USA - about 14,000 lbs. - could be felt from 20 miles away.
Those large trucks on the Interstate that you see every day have a weight limit of about 65,000 lbs. The main problem would be it wouldn't combust too well at that volume from a lack of oxygen, but all that would take is a LOX cylinder or two.
This is the main reason I'm convinced most of the threats out there stupid, overblown or both. If they were THAT smart, THAT rich and THAT psychotic, London and New York would be fond memories and not much more.
I'm not into conspiracy theories (I think those are a Plot by Them to Control The World by inciting paranoia), but I simply can't find any way to make the observations match the claims, which tells me that some component of the claims is exaggerated.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
In the land of the blind, the one-eyed man is king.
Moderation +3
40% Insightful
20% Offtopic
20% Interesting
TrollMods, give this specious "Offtopic" TrollMod'ing a break. This story is about a member of the public wanting the math for calculating Martian orbital insertion from Earth. The post to which I responded asserted that such math should be secret, to defend from "terrorism". I replied that it's not strategic, that it hasn't been for a half-century, and that terrorists aren't in the ballistic missile business. But that doesn't stop TrollMods from attempting to terrorize Slashdot with their unaccountable secret attacks on posts they don't like for their own backwards reasons. What stops them, supposedly, is metamoderation. Well, metamods, you've got the coordinates: 3-2-1 LAUNCH!
--
make install -not war
(Dang, I wish I'd watched `The Day the Earth Stood Still' over the weekend like I wanted to. Then I'd be able to include that nifty quote that Klaatu uttered about ``being good enough to get me from planet to planet''.)
Klatu: I thought you would have solved it by now. You substitute this term here---and then the answer follows by variation of parameters.
Physicist: That gives the first-order terms. But what about the higher orders?
Klatu: Negligible.
Physicist: You've tested this theory?
Klatu [shrugs]: It works to get me between planets.
"Bah!" - Dogbert
"Those large trucks on the Interstate that you see every day have a weight limit of about 65,000 lbs."
0 .html to a story of an explosion caused when a semi overturned and caught fire in a canyon about 35 miles from my home. It occurred last Wednesday. The semi was hauling 38,000 lbs. of explosives. Not one person died! That stretch of highway is highly-travelled and pretty dangerous on its own without exploding vehicles. If you look at the images of the road, you'll likely agree that it's quite an amazing thing that no one died. Nearly the entire semi and trailer were gone. The explosion left a crater about 20 to 35 feet deep and 60 to 80 feet wide.
h tml to a Salt Lake TV station that received a video taken by someone travelling on the highway during the explosion. (The streaming video worked quite well on my Mac - Tiger & Safari - , so I'm pretty sure it'll work for most anyone)
Here's a link http://deseretnews.com/dn/view/0,1249,600155076,0
Here is another link http://kutv.com/topstories/local_story_226191800.
I plan to give those truckers an even wider berth from now on.
From a theoretical basis its not as hard as you would think it is, as long as you can simplify the problem. That is, the mechanics point of view of it, and doing it all analytically. I myself am studying orbital mechanics at the moment, and in just 3 weeks you can learn the BASICS(i strecth the word basic here) for a interplanetary transfer.
Here is a list of the sort of maths you would encounter in orbital mechanics:
- Conic Sections (parabolas, hyperbolas...etc)
- Calculus (pretty much have to know it all, a good understanding of differential equations (including partial D.E.), differential vector operator, even series calculations and their sums (eg Taylor series)...etc.)
- Linear Algebra (Vector and matrix operations, also applications with calculus, eg coupled differential equations come up in 3d rigid dynamics problems which can be solved using diagonlization matrices)
- something I missed !!
NOW TO THE ACTUAL PROCESS.
There are three main segments:
Earth escape (hyperbolic)
Heliocentric transfer and
Planetary encounter.
You use two- body mechanics to approximate trajectory of a spacecraft between two attracting bodies (its a 3 body problem, but you have to simplify it). This means you have to ignore all attracting bodies except the one with the most influence. Bodies with great masses have an "Attracting Sphere"(also known as 'sphere of influence') around them, when you leave the radius of that sphere you perform your 2-body calculations with the next body that has the greatest influence. Eg for Earth the radius for the sphere is 9.25 x 10^5 km. But don't forget that on the 'surface' of the sphere the influences of the 2 large bodies are equal, it's essentially a cosmic 'tug of war'.
With interplanetary transfer you have to start to think in reverse, first you have to think as to what is the purpose of the craft, do I want it to
a) send it into an orbit around the planet
b) use the planet as a slingshot for the craft
c) use the atmosphere of a planet to slow down my craft
d) or just crash it! (War of the worlds?!)
Then you need to calculate a HOHMANN TRANSFER that will give you a final approach velocity which will let you do one of those options (a,b,c or d). But for that final velocity you will need a certain initial velocity approach into the Hohmann transfer from a low Earth orbit(LEO).
After you have set the spacecraft into a LEO(because before any orbital manoeuvres can be made the properties of the initial orbit must be known), and the right moment in time comes, you apply an impulse 'shot' to the spacecraft of around 20 seconds and assume that to be infinitesimal in comparison to the 18 months required to reach Mars. The impulse is applied tangentially(to LEO) to generate the initial velocity of for the Hohmann transfer. Make sure you fire in the right direction and use the Earths velocity as an advantage, you would not want to make it any harder by fighting the velocity of Earth too. While on the Hohmann transfer to Mars it is wiser to make small adjustments now in thrust and directions so that you can save on energy and thus propellant rather then having to make adjustments when arriving there. A small change in angle at some large distance can save the trouble of having to make big changes when arriving.
From Earth to Mars the Hohmann transfer is a heliocentric transfer orbit ( the sun at the focus). The tough bit is having to think of it as a hyperbolic passage when approaching the planet. You have to think of the planet as a focus in your hyperbola where your flight of travel is the hyperbola and you are approaching the perigee form the asymptotes of the hyperbola( ie assume u are approaching from infinity, r~= infinity). For this, you initially assume that the velocity of your planet(the focus) is zero. Through the focus are two lines passing through and intersect there, these lines are parallel to the asymptotes. Give them the spacing 'delta'. Now if we know the velocity at which we a
http://en.wikipedia.org/wiki/Hohmann_transferh oth ighwayc s
http://en.wikipedia.org/wiki/Gravitational_slings
http://en.wikipedia.org/wiki/Interplanetary_Super
http://en.wikipedia.org/wiki/Category:Astrodynami
"A great democracy must be progressive or it will soon cease to be a great democracy." --Theodore Roosevelt
For an amatuer you could get by with the Earth and Moon (even exclude Sun...although it is large it is much further away) for initial trajectory, then consolidate Earth and Moon and add the Sun, drop the Earth out of the equation for a bit, then for the approach add Mars. Really by the time you add Mars back into the equation you are 99.xxx% of the way there. Most likely the errors in your equation would be bigger.
The tricky part of this is integrating over time with the changing position of the planets. The good news is you are only interested in the trajectory of the vehicle and it has an infintesimal effect on the other bodies.
When the people fear their government, there is tyranny; when the government fears the people, there is liberty.
They don't use two-body approximations for the NASA missions to Mars!
They use high-precision numerical integration for the trajectory of the spacecraft, using one of the standard high-precision general ephemerides as background data. (Textbooks mentioned by posters elsewhere in this thread decribe in general terms the astronav. techniques used for mission planning, but as soon as they get down to mapping the trajectory as precisely as possible, they need the background ephemeris as well.)
For the recent Mars missions, the background ephemeris is a very highly refined ephemeris "DE410" produced by the JPL, this appears to be a local improvement intended especially to reduce errors in the neighborhood of Mars and Saturn, relative to the DE405 ephemeris which remains the world standard for official ephemeris publications. It seems they got an accuracy in the region of Mars as close as only "a few meters"!!!
See details of DE410 on the public JPL site here, and especially you might want to look at the background report on DE410.
-wb-
What you're describing is called a 'cycler', and Buzz Aldrin, among others, has been kicking the idea along for years, see here.
"Just once, I'd like to meet an alien menace that wasn't immune to bullets." -- The Brigadier, Dr. Who