astro.Function.rocheLimitsForDensity - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / astro / rocheLimitsForDensity
rocheLimitsForDensity(
primary,satelliteDensityKgM3):RocheLimits|null
Defined in: src/astro/body-physics.ts:175
Roche limits around a primary for a satellite of a stated density.
The body being orbited. Needs a mass and a Radius.
number
The orbiting material's density in kg/m³.
RocheLimits | null
Both limits in metres from the primary's centre, or null when the primary's
own density cannot be computed.
Use this when the satellite's density is assumed rather than measured — ring material,
for instance, whose density comes from its class rather than from a mass and a radius
(ringRocheLimits in ./body-rings is this function with that density filled in).
When the satellite is a scanned body with a mass and a radius of its own, prefer
rocheLimits, which reads the density off it.
If primary is not an object.
If satelliteDensityKgM3 is not a finite positive number — an
assumed density is the caller's own figure, so a bad one is a mistake rather than a
missing scan field.
import { rocheLimitsForDensity } from '@elite-dangerous-almanac/core/astro/body-physics';
// Icy particles (1000 kg/m³) around an Earth-density primary.
const limits = rocheLimitsForDensity({ MassEM: 1, Radius: 6_371_000 }, 1000);
limits?.rigid; // -> 14181242.2…
limits?.fluid; // -> 27642167.3…