Trajectory Optimization from Earth to an Asteroid - SNOPT
Version 1.1.0 (111 MB) by
David Eagle
MATLAB script for optimizing two-body, ballistic trajectories from Earth to an asteroid using the SNOPT algorithm
This document describes a MATLAB script called ipto_asteroid_snopt that can be used to design and optimize two-body, ballistic interplanetary trajectories from the Earth to 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. 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_snopt 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 SNOPT nonlinear programming (NLP) algorithm to solve this classic orbital mechanics problem. MATLAB versions of SNOPT for several computer platforms can be found at Professor Philip Gill’s web site which is located at http://scicomp.ucsd.edu/~peg/.
This script reads JPL planetary ephemerides in a machine-independent binary format which are available from the SPICE web site and by ftp from ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp. These *.bsp ephemeris files are IEEE-Little Endian style of binary kernel. This is the binary form native to PC/Linux, PC/Windows and MAC/Intel machines. Additional information about JPL ephemerides can be found at http://naif.jpl.nasa.gov/naif/.
The ipto_asteroid_snopt script uses routines from the MICE software suite to read and evaluate the JPL binary ephemeris file. Platform-specific MICE mex files, support functions and the binary ephemeris files are available at naif.jpl.nasa.gov/naif/toolkit_MATLAB.html. MICE is a MATLAB implementation of the SPICE library created by JPL.
This submission includes a 64bit version of the MICE mex file for Windows.
Cite As
David Eagle (2025). Trajectory Optimization from Earth to an Asteroid - SNOPT (https://www.mathworks.com/matlabcentral/fileexchange/180283-trajectory-optimization-from-earth-to-an-asteroid-snopt), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.