Function nyx_space::tools::lambert::standard

source ·
pub fn standard(
    r_init: Vector3<f64>,
    r_final: Vector3<f64>,
    tof: f64,
    gm: f64,
    kind: TransferKind,
) -> Result<LambertSolution, NyxError>
Expand description

Solve the Lambert boundary problem using a standard secant method.

Given the initial and final radii, a time of flight, and a gravitational parameters, it returns the needed initial and final velocities along with φ which is the square of the difference in eccentric anomaly. Note that the direction of motion is computed directly in this function to simplify the generation of Pork chop plots.

§Arguments

  • r_init - The initial radius vector.
  • r_final - The final radius vector.
  • tof - The time of flight.
  • gm - The gravitational parameter.
  • kind - The kind of transfer (auto, short way, long way, or number of revolutions).

§Returns

Result<LambertSolution, NyxError> - The solution to the Lambert problem or an error if the problem could not be solved.