gooding-lambert 0.2.0

Gooding's method for solving Lambert's orbital boundary-value problem
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented1 out of 4 items with examples
  • Size
  • Source code size: 526.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.16 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • VisVivaSpace

gooding-lambert

crates.io docs.rs license

A Rust implementation of Gooding's method for solving Lambert's problem: given two position vectors and a time of flight, find the connecting orbit's initial and final velocity vectors.

Installation

Add to your Cargo.toml:

[dependencies]
gooding-lambert = "0.1.1"

Quick Start

use gooding_lambert::{lambert, Direction};

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

let sol = lambert(mu, r1, r2, tof, 0, Direction::Prograde).unwrap();
println!("Departure v: {:?}", sol.v1);  // km/s
println!("Arrival v:   {:?}", sol.v2);  // km/s

Why Gooding?

Lambert's problem --- finding the orbit connecting two positions in a given time --- is central to astrodynamics: it underpins interplanetary trajectory design (pork-chop plots), orbit determination from position observations, rendezvous targeting, and conjunction screening. Gooding's 1990 method parameterizes the problem through a single dimensionless variable that spans all conic sections (elliptic, parabolic, hyperbolic) without case-splitting, and solves the resulting time equation using Householder iteration with analytically computed first, second, and third derivatives --- no finite differences, no numerical differentiation. Three iterations reliably yield 13-digit accuracy. The method handles multi-revolution solutions (finding the minimum-time boundary iteratively, then solving for both long-period and short-period branches) and degrades gracefully near the parabolic limit via a dedicated power series, making it the most robust classical Lambert solver available.

Documentation

Development

This project was co-developed with Claude, an AI assistant by Anthropic.

License

MIT License — see LICENSE for details.