Skip to main content

semi_major_axis_from_specific_energy

Function semi_major_axis_from_specific_energy 

Source
pub fn semi_major_axis_from_specific_energy(
    mu: f64,
    specific_energy: f64,
) -> Option<f64>
Expand description

Computes the semi-major axis for a bound orbit from specific orbital energy.

Formula: a = -μ / (2ε)

Returns None when mu is less than or equal to zero, when specific_energy is greater than or equal to zero, or when the input or result is not finite.