Solve Lambert's Problem in Two-Body Dynamics

Solve Lambert's problem in two-body dynamics using universal variables
984 Downloads
Updated 27 Dec 2013

View License

Solve the boundary value problem in two-body dynamics (known as Lambert's problem) using the universal variable formulation as presented in Bate, Mueller, and White. The function has been tested for elliptic, parabolic, and hyperbolic orbits.

The function does not currently handle the case where the secondary completes multiple revolutions about the central body within the specified time.

Inputs:
<mu>: Standard gravitational parameter of central body
<t1>,<r1>: Time scalar and column position vector for initial position in orbit
<t2>,<r2>: Time scalar and column position vector for final position in orbit
<path>: If equal to 1, solve for the long path (delta_nu >= pi), else for the short path (delta_nu < pi)

Outputs:
<v1>,<v2>: Velocity vectors at initial and final times
<iter>: Number of iterations needed for convergence

Example:

mu = 398600.44; % Earth [km^3/s^2]
T1 = [0 0];
T2 = [600 600];
R1 = [-1.4619E3 2.4442E3 6.5242E3; % Initial positions of 2 different earth satellites
-3.7511E3 1.6838E4 2.0927E1]';
R2 = [-1.0435E3 5.8479E3 3.7741E3; % Final positions
-5.2268E3 1.8596E4 2.2488E3]';

for (i = 1:size(R1, 2))
% Short path. Gives elliptic orbit.
[v1,v2,iter] = lambert_universal(mu, T1(:,i), R1(:,i), T2(:,i), R2(:,i), 0);
% Long path. Gives hyperbolic orbit.
[v1,v2,iter] = lambert_universal(mu, T1(:,i), R1(:,i), T2(:,i), R2(:,i), 1);
end

Cite As

Shiva Iyer (2024). Solve Lambert's Problem in Two-Body Dynamics (https://www.mathworks.com/matlabcentral/fileexchange/44789-solve-lambert-s-problem-in-two-body-dynamics), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
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.3.0.0

Added a file stumpff.m which contains a required function.

1.0.0.0