MATLAB script named nbody_flyby_snopt that can be used to design interplanetary n-body trajectories that include a single gravity assist maneuver. This script uses a patched-conic (zero sphere-of-influence, ZSOI) solution of the gravity-assist flyby problem as an initial guess for the n-body algorithm. The departure equations of motion include first-order Earth oblateness and point-mass gravity of the sun and moon. The n-body heliocentric equations of motion include the point-mass gravity of the first eight planets.
The n-body trajectory optimization algorithm allows the user to select a “targeting” option at the arrival planet from this list.
- B-plane components (B dot T and B dot R)
- orbital elements (periapsis radius and orbital inclination)
- entry interface (flight path angle, altitude and inclination)
- node/apse alignment (periapsis radius, ascending node and argument of periapsis)
The n-body simulation minimizes the scalar magnitude of an impulsive interplanetary trajectory correction maneuver (TCM) required to achieve these targets. This maneuver is performed at a user-defined delta time after the gravity-assist.