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.
with each hyperbolic anomaly
Units
- Inputs:
nu1,nu2in radians,edimensionless,ain m (negative),muin m³/s². - Output: time in s, negative if
nu2comes beforenu1.
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:
changes sign there. - To go from a time to a position, solve
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 sParameters
| Parameter | Type | Description |
|---|---|---|
nu1 | Radians | True anomaly at the start |
nu2 | Radians | True anomaly at the end |
e | number | Eccentricity |
a | number | Semi-major axis |
mu | number | Gravitational parameter |
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 sSee
- solveKeplerHyperbolic
- https://en.wikipedia.org/wiki/Hyperbolic_trajectory Hyperbolic trajectory