# Orbits for space missions

I am just wondering say if there is an expedition where some astronauts are sent to the moon, how do they choose the trajectory for the spaceshuttle (or whatnot)? I mean there are many possible trajectories depending on the initial velocity at which the vessel is launched. There must be some sort of optimal trajectory they choose right? What are the factors they take into account when choosing the trajectory? Things like costs, stability and so on? What does stability mean in this context?

-
Possibly relevant reading: Hohmann transfer orbits are a conceptually very straightforward and efficient way of getting from one orbit to another. You just create an elliptical orbit with an apoapsis equal to the radius of a target orbit and circularise when you reach apoapsis. – Richard Terrett Apr 3 '12 at 14:58

That said, the optimization will almost certainly be empirical. To start with, you need some accurate "map" of the solar system that includes the motion of astronomical bodies. Then, using this time-dependent map, you need a code that can calculate a trajectory based on an input of the craft's thrust. This is done by numerical integration of some sort, and some methods are better than others while some methods take longer than others. Then you need to establish an objective Figure Of Merit (FOM) function or functions. The core of an optimization problem is that you will want to minimize whatever FOM you have. This is done by numerically finding a minimum of the FOM by adjusting some input vector. The selection of that input can be difficult as well. There is not just one thrust vector to optimize on, because it is time-dependent. So you take the thrust vector over time, say $\vec{F}(t)$ and break it up into a number of intervals $n$. Then you can minimize $FOM$ on all of the independent variables in the time-dependent thrust vector. It is also common to do this several times, starting with a small $n$ and then increasing the number of time steps to refine it further.
A logical $FOM$ would be to minimize cost, which is almost certainly related to the amount of propellant used to deliver a given payload to a certain location within a certain time-frame. Alternatively, time may be a floating variable that you also wish to minimize. A major part of the challenge and finess comes from the fact that $FOM$ has many many unique local minimums and numerical techniques can only find you local minimums, not a global minimum. That means that when traveling to the moon, for instance, every given number of gravitational assists will probably lead to a unique local minimum and in order to find the others, you have to start with different initial conditions. A good astrophysicist should be able to predict the potentially good paths and give the program initial conditions that will lead to those different local minimums. Then the process would be to compare the different minimums and pick the one that best fit the mission objectives.