This document describes a MATLAB script called ipto_asteroidthat can be used to design and optimize two-body, ballistic interplanetary trajectories between the earth and an asteroid. This type of trajectory analysis ignores the gravitational effect of both the launch and arrivals planets on the heliocentric transfer trajectory. This technique involves the solution of Lambert's problem relative to the Sun. Two-body ballistic trajectories are suitable for preliminary mission design. This MATLAB script also includes the option to enforce user-defined mission constraints such as departure energy, time-of-flight, and so forth during the trajectory optimization.
The ipto_asteroid MATLAB script also performs a graphical primer vector analysis of the solution. This program feature displays the behavior of the primer vector magnitude and primer derivative magnitude as a function of mission elapsed time in days from departure. This script uses the fminconnonlinear programming (NLP) algorithm available in the Mathworks Optimization Toolbox to solve this classic astrodynamics problem.