MATLAB functions for solving Lambert's problem

Three MATLAB functions and a script that demonstrates how to interact with each Lambert routine.
Updated 24 Jan 2024

View License

This archive contains three MATLAB functions ported from FORTRAN programs documented in Sam Wagner's PhD disseration,"Automated trajectory design for impulsive and low thrust interplanetary mission analysis", Iowa State, 2014.
Chapter 2 of Sam's research discusses the characteristics and practical computer implementation of Lambert algorithms due to Richard Battin, Robert Gooding and F. T. Sun.
The I/O arguments for each routine are identical. Here is the
format for the Battin function.
function [vi, vf] = lambert_battin(mu, r1, r2, dt, ot)
% this function contains the battin lambert solution method
% inputs
% mu = gravitational constant (kilometers^3/seconds^2)
% r1 = initial position vector (kilometers)
% r2 = final position vector (kilometers)
% dt = transfer time (seconds)
% ot = orbit type (1 = prograde, 2 = retrograde)
% outputs
% vi = initial velocity vector of transfer orbit (kilometers/second)
% vf = final velocity vector of transfer orbit (kilometers/second)
These functions attempt to solve Lambert's problem for the transfer orbit that completes less than one complete revolution of the central body. The direction of the transfer orbit can prograde or retrograde.

Cite As

David Eagle (2024). MATLAB functions for solving Lambert's problem (, MATLAB Central File Exchange. Retrieved .

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