Skip to main content

Crate gooding_lambert

Crate gooding_lambert 

Source
Expand description

§gooding-lambert

Gooding’s method for solving Lambert’s orbital boundary-value problem.

Given two position vectors and a time of flight, computes the velocity vectors at each endpoint of the connecting Keplerian arc. Handles all conic sections (elliptic, parabolic, hyperbolic), all transfer angles, and multi-revolution solutions.

§Quick Start

use gooding_lambert::{lambert, Direction, MultiRevPeriod};

let mu = 398600.4418_f64; // Earth GM (km³/s²)
let r1 = [6678.0, 0.0, 0.0]; // km
let r2 = [0.0, 42164.0, 0.0]; // km (GEO)
let tof = 5.0 * 3600.0; // seconds

let sol = lambert(mu, r1, r2, tof, 0, Direction::Prograde, MultiRevPeriod::LongPeriod).unwrap();
let speed = (sol.v1[0].powi(2) + sol.v1[1].powi(2) + sol.v1[2].powi(2)).sqrt();
assert!(speed > 5.0 && speed < 15.0); // km/s at LEO departure

§References

Gooding, R. H. (1990). “A procedure for the solution of Lambert’s orbital boundary-value problem.” Celestial Mechanics and Dynamical Astronomy, 48(2), 145–165.

Structs§

LambertSolution
Velocity solution returned by lambert.

Enums§

Direction
Transfer direction for Lambert’s problem.
LambertError
Errors returned by lambert.
MultiRevPeriod
Multi-revolution period selection for lambert().

Functions§

gooding_lambert
Low-level Lambert solver matching the C/FORTRAN calling convention.
lambert
Solve Lambert’s problem using Gooding’s (1990) method.