astro.Function.rocheLimits - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / astro / rocheLimits

Function: rocheLimits()

rocheLimits(satellite, primary): RocheLimits | null

Defined in: src/astro/body-physics.ts:224

Roche limits around a primary for one scanned satellite.

Parameters

satellite

BodyProperties

The orbiting body. Needs a mass and a Radius, from which its density is taken.

primary

BodyProperties

The body being orbited. Needs the same.

Returns

RocheLimits | null

Both limits in metres from the primary's centre, or null when either body's density cannot be computed.

Remarks

Compare them against the satellite's periapsis, not its semi-major axis: a breach is set by closest approach, so an eccentric moon can dip inside the rigid limit while its mean distance looks safe. orbitExtents in ./body-orbit gives that periapsis.

Throws

If either argument is not an object.

Example

import { rocheLimits } from '@elite-dangerous-almanac/core/astro/body-physics';
import { orbitExtents } from '@elite-dangerous-almanac/core/astro/body-orbit';

const moon = { MassEM: 0.0123, Radius: 1_737_400, SemiMajorAxis: 3.844e8, Eccentricity: 0.0549 };
const earth = { MassEM: 1, Radius: 6_371_000 };

const limits = rocheLimits(moon, earth);
const closest = orbitExtents(moon)?.periapsis ?? 0;

closest < (limits?.rigid ?? 0); // -> false
⚠️ **GitHub.com Fallback** ⚠️