astro.Function.hillRadius - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / astro / hillRadius
hillRadius(
body,primary):number|null
Defined in: src/astro/body-physics.ts:261
The radius of a body's Hill sphere, in metres — how far its own gravity wins against the body it orbits.
The body whose sphere is wanted. Needs SemiMajorAxis and a mass.
The body it orbits. Needs a mass.
number | null
The Hill radius in metres, or null when a mass or the orbit is missing.
r_H = a · (m / 3M)^(1/3). Anything orbiting the body must stay inside this radius to
remain bound to it, so it is the reach a moon has over nearby material — which is what
makes a small moon a shepherd of a ring it does not sit in.
The semi-major axis is used as written, so the figure is the mean-distance Hill radius.
On an eccentric orbit the sphere shrinks at periapsis; recompute with
orbitExtents(body)?.periapsis in place of the axis when that matters.
If either argument is not an object.
import { hillRadius } from '@elite-dangerous-almanac/core/astro/body-physics';
// Earth about the Sun: about 1.5 million km.
hillRadius({ MassEM: 1, SemiMajorAxis: 1.496e11 }, { StellarMass: 1 }); // -> 1496417737.0…