Trans-Lunar Trajectory Optimization – SNOPT

SNOPT version of the tlto script for designing preliminary trans-lunar missions from Earth park orbit to lunar encounter.
201 Downloads
Updated 5 Dec 2025

View License

This submission is a MATLAB script named tlto_snopt that can be used to design preliminary lunar missions from Earth park orbit to encounter at the moon. The software assumes trans-lunar injection (TLI) occurs impulsively from a circular Earth park orbit. The final conditions at the moon are user-defined and can be selenocentric radius and inclination, selenocentric user-defined B-plane coordinates or selenocentric node/apse alignment. These final conditions at the moon are also user-defined. This option can be the Earth true-of-date, Earth mean equator and equinox of J2000 (EME2000) or mean lunar equator and IAU node of epoch coordinate system.
The first part of this MATLAB script solves for the minimum TLI delta-v using a two-body Lambert solution for the transfer trajectory from the Earth park orbit to the center of the moon. The second part of the script implements a shooting method that attempts to minimize the TLI delta-v while numerically integrating the spacecraft’s n-body equations of motion and targeting to user-defined constraints.
In the shooting algorithm, the spacecraft motion model includes the Earth’s non-spherical gravity effect and the point-mass perturbations of the sun and moon. The B-plane targets are enforced via a user-defined periapsis radius and orbital inclination of the arrival hyperbola relative to the moon.
This MATLAB script uses the SNOPT nonlinear programming (NLP) method for both optimization tasks. MATLAB versions of SNOPT for several computer platforms can be purchase/requested at Professor Philip Gill’s web site which is located at http://scicomp.ucsd.edu/~peg/. Professor Gill’s web site also includes a PDF version of the SNOPT software user’s guide.
The tlto_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 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 MATLAB script reads JPL DE430 lunar and solar ephemerides in a machine-independent binary format (kernels) which are available from the SPICE web site and by anonymous 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/.

Cite As

David Eagle (2025). Trans-Lunar Trajectory Optimization – SNOPT (https://ch.mathworks.com/matlabcentral/fileexchange/74321-trans-lunar-trajectory-optimization-snopt), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.5.0

Additional selenocentric graphics. Updated PDF documentation.

1.4.0

Added final lunar orbit targeting in three different coordinate systems (Earth true-of-date, Earth mean equator and equinox of J2000 and lunar mean equator and IAU node of epoch). Updated documentation.

1.3.0

Updated coordinate transformations and PDF document. Added more source code annotation.

1.2.0

Distribution now includes a version (tlto_mice_snopt.zip) that uses JPL MICE routines to evaluate the de430.bsp ephemerides.

1.1.0

Added node/apsis alignment targeting. Updated documentation.

1.0.0