pub fn gooding(
input: LambertInput,
kind: TransferKind,
) -> Result<LambertSolution, LambertError>
Expand description
Solve the Lambert boundary problem using Gooding’s method.
This is an implementation of R. H. Gooding’s method for solving Lambert’s problem, as described in “A procedure for the solution of Lambert’s orbital boundary-value problem”. 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_s
- The time of flight in seconds.mu_km3_s2
- The gravitational parameter in km^3/s^2.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.