Earth-to-Mars End-to-End Mission Design – OTB
Version 1.1.0 (111 MB) by
David Eagle
Create and optimize an end-to-end ballistic trajectory from Earth park orbit to encounter at Mars
This submission is a MATLAB script named e2m_otb that can be used to design and optimize ballistic interplanetary missions from a Earth park orbit to encounter at Mars. The software assumes interplanetary injection occurs impulsively from a circular park orbit. The type of final Mars-centered (areocentric) mission “targeting” coordinate system and the target values are defined by the user.
This script is valid for both coplanar and non-coplanar hyperbolic injection from a circular orbit.
The first part of this MATLAB script solves for the minimum delta-v using a zero-sphere-of-influence (ZSOI), two-body Lambert solution for the heliocentric transfer trajectory from Earth to Mars. Using this solution as an initial guess, the second part implements a simple shootingmethod that attempts to optimize the characteristics of the geocentric injection hyperbola while numerically integrating the spacecraft’s geocentric trajectory to the Earth’s sphere-of-influence (SOI) and the heliocentric trajectory to Mars closest approach while targeting to user-defined mission constraints at Mars.
The spacecraft motion within the Earth’s sphere-of-influence includes the Earth’s J2 oblate gravity effect and the point-mass perturbations of the sun and moon. The heliocentric equations of motion include the point-mass gravity of the sun and the first seven planets of the solar system.
The user can select one of the following delta-v optimization options for the two-body solution of the interplanetary transfer trajectory;
- minimize departure delta-v
- minimize arrival delta-v
- minimize total delta-v
The user also selects the type of final mission constraints from the following script options;
- B-plane (B dot T and B dot R)
- orbital elements (radius and inclination)
- EI conditions (altitude and flight path angle)
- grazing flyby
- node/apsis alignment
The characteristics of the final user-defined areocentric (Mars-centered) mission constraints can be calculated in one of the following coordinate systems;
- Earth mean equator and equinox of J2000
- Mars mean equator and IAU node of epoch
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/.
The e2m_otb script uses routines from the MICE software suite to read and evaluate the JPL 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 uses the fmincon (minimization with constraints) algorithm of the Mathworks® Optimization Toolbox (OTB) to solve this optimization problem. The selected numerical method is the ‘interior-point’ algorithm.
Cite As
David Eagle (2026). Earth-to-Mars End-to-End Mission Design – OTB (https://www.mathworks.com/matlabcentral/fileexchange/175683-earth-to-mars-end-to-end-mission-design-otb), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
