Skip to content

Documentation / @interstellar-tools/equations / hyperbolicSemiMajorAxis

Function: hyperbolicSemiMajorAxis() ​

ts
function hyperbolicSemiMajorAxis(vInfinity: number, mu: number): number;

Defined in: orbits/hyperbolic-semi-major-axis.ts:52

Compute the semi-major axis of a hyperbola from the hyperbolic excess speed.

a=−μv∞2

Where:

  • v∞ is the hyperbolic excess speed: the speed left over far from the body (m/s)
  • μ is the body's gravitational parameter (m³/s²)

Units

  • Inputs: vInfinity in m/s, mu in m³/s².
  • Output: a in m, negative.

Notes

  • Negative by convention, so that vis-viva v2=μ(2/r−1/a) holds for hyperbolas too.
  • v∞ comes from a speed v at distance r by energy: v∞2=v2−2μ/r, or from characteristicEnergyC3 as C3.
In practiceApollo 11, arriving at the Moon

−4 203 km

Approach hyperbola, with 1.08 km/s left over far from the Moon

ts
hyperbolicSemiMajorAxis(1080, 4.902800118e12); // ≈ -4 203 361 m

Parameters ​

ParameterTypeDescription
vInfinitynumberHyperbolic excess speed v∞ in m/s (finite, > 0).
munumberGravitational parameter μ in m³/s² (finite, > 0).

Returns ​

number

Semi-major axis a in m (negative).

Throws ​

  • If any input is not a finite number.
  • If vInfinity <= 0 or mu <= 0.

Example ​

ts
// Leaving Earth for Mars with v∞ ≈ 2.95 km/s
const a = hyperbolicSemiMajorAxis(2950, 3.986004418e14);
// a ≈ -45 803 km

See ​