Skip to content

Documentation / @interstellar-tools/equations / hyperbolicTimeOfFlight

Function: hyperbolicTimeOfFlight() ​

ts
function hyperbolicTimeOfFlight(
  nu1: Radians,
  nu2: Radians,
  e: number,
  a: number,
  mu: number
): number;

Defined in: orbits/hyperbolic-time-of-flight.ts:66

Compute the time of flight between two points on a hyperbola, given by their true anomalies.

t2−t1=−a3μ[(esinh⁡F2−F2)−(esinh⁡F1−F1)]

with each hyperbolic anomaly F from trueToHyperbolicAnomaly.

Units

  • Inputs: nu1, nu2 in radians, e dimensionless, a in m (negative), mu in m³/s².
  • Output: time in s, negative if nu2 comes before nu1.

Notes

  • Both points must lie inside the asymptotes. The incoming branch can be given as negative angles or just below 2π.
  • Crossing periapsis needs no special handling: F changes sign there.
  • To go from a time to a position, solve Mh=esinh⁡F−F with solveKeplerHyperbolic, then use hyperbolicToTrueAnomaly.
In practiceApollo 11, falling towards the Moon

13.8 h

From the edge of the Moon's sphere of influence, 62 640 km out, to closest approach

The flight took 14 h 10 min from crossing into the sphere to lighting the engine for lunar orbit insertion. Patched conics leave out Earth's pull inside the sphere, one reason the two differ.

ts
const e = 1.44; // approach hyperbola
const a = -4_203_000; // m
const p = a * (1 - e * e);
const nuSoi = -Math.acos((p / 62_640_000 - 1) / e) as Radians; // incoming
hyperbolicTimeOfFlight(nuSoi, 0 as Radians, e, a, 4.902800118e12); // ≈ 49 600 s

Parameters ​

ParameterTypeDescription
nu1RadiansTrue anomaly at the start ν1 in radians (finite, inside the asymptotes).
nu2RadiansTrue anomaly at the end ν2 in radians (finite, inside the asymptotes).
enumberEccentricity e (finite, > 1).
anumberSemi-major axis a in m (finite, < 0).
munumberGravitational parameter μ in m³/s² (finite, > 0).

Returns ​

number

Time of flight in s from nu1 to nu2.

Throws ​

  • If any input is not a finite number.
  • If e <= 1, a >= 0, mu <= 0, or either true anomaly is at or beyond the asymptotes.

Example ​

ts
import type { Radians } from '@interstellar-tools/types';

// From periapsis to 90° on a hyperbola with e = 2, a = -10 000 km, around Earth
const t = hyperbolicTimeOfFlight(
  0 as Radians,
  (Math.PI / 2) as Radians,
  2,
  -10_000e3,
  3.986004418e14
);
// t ≈ 3 401 s

See ​