File Exchange

image thumbnail

MATLAB script for Earth-to-Mars Mission Design - OTB

version 1.2.0 (844 KB) by David Eagle
Optimization Toolbox version of the e2m_matlab script that performs Earth-to-Mars mission analysis and design.


Updated 04 Apr 2020

View Version History

View License

PDF document and a MATLAB script named e2m_matlab_otb.m that can be used to design and optimize ballistic interplanetary missions from Earth park orbit to encounter at Mars. The software assumes that interplanetary injection occurs impulsively from a circular Earth park orbit. The B-plane coordinates are expressed in a Mars-centered (areocentric) mean equator and IAU node of epoch coordinate system. B-plane targets are enforced using either a combination of periapsis radius and orbital inclination, individual B-plane coordinates of the arrival hyperbola, or entry interface (EI) conditions at Mars. The type of targeting and the target values are defined by the user.

Cite As

David Eagle (2021). MATLAB script for Earth-to-Mars Mission Design - OTB (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

David Eagle

Create a sub-directory. Copy everything from the zipped file into this sub-directory including a DE421 binary ephemeris file. Log into this sub-directory from within MATLAB. Run the script.

Stephen Forczyk

Tried to run the code using supplied input files-keep getting this error
Error using fread
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in jplephem (line 70)
ttl = fread(fid, 252);

Error in twobody_objective (line 31)
svi = jplephem(jdtdb_tip, ip1, 11);

Error in fmincon (line 552)
initVals.f = feval(funfcn{3},X,varargin{:});

Error in e2m_matlab_otb (line 204)
[x, ~] = fmincon('twobody_objective', xg, [], [], [], [], xlwr, xupr, [], options);

Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.

Suraj Parasuram

I am having difficulty understanding how the program works. The PDF document talks about something different from what is going on in the script. Could you explain?

MATLAB Release Compatibility
Created with R2019b
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!