Spacecraft mission will become more common. There are relevant open projects such that Mars colonization and exploring missions outside the Solar System.
These missions require high accuracy calculations because the error propagates in time and would be able to modify the trajectory.
There are many ways to face this problem: analytical or numerical approaches.
The analytical approaches could only be used for simplified problems, and thus it is really restrictive.
The numerical approaches commonly used and include metaheuristics and nonlinear programming. I have used genetic algorithms to solve a basic problem which consists of optimizing trajectory to travel to Mars from the Earth.
The algorithm optimizes the fuel for the trip and achieves a 99.99% accuracy in 1000 generations.
The genetic algorithm is very well known here. [ Genetic Algorithm ]
Once we have optimized our space trip, we obtained the direction of the impulse for every second.
The direction is given in discratized values, but we interpolate the values and get an uniform function that smooths the changes.