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

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

Function: ringSurfaceDensity()

ringSurfaceDensity(ring): number | null

Defined in: src/astro/body-rings.ts:143

How thinly a ring's mass is spread over the annulus it occupies, in megatonnes per square kilometre.

Parameters

ring

BodyRing

The ring. Needs MassMT, InnerRad and OuterRad.

Returns

number | null

Surface density in Mt/km², or null when a radius is missing or the outer radius does not exceed the inner one, leaving no area to spread the mass over.

Remarks

MassMT / π(r_outer² − r_inner²), with the radii converted to kilometres.

The unit is the journal's, deliberately. Frontier's MassMT is not the SI megatonne of 10⁹ kg: the Canonn physics that calibrated the threshold below treats it as 10¹² kg, a teragram, because that is what makes ring densities and Roche limits agree with what the game shows. That is an interpretation of an undocumented field rather than a published fact, so this reports the ratio in the units the scan supplied and leaves the conversion to a caller who wants one.

Throws

If ring is not an object.

Example

import { ringSurfaceDensity } from '@elite-dangerous-almanac/core/astro/body-rings';

// 1e13 Mt spread between 1e8 m and 2e8 m: an annulus of 3π × 10⁴ km².
const ring = { Name: 'A Ring', RingClass: 'eRingClass_Icy', MassMT: 1e13, InnerRad: 1e8, OuterRad: 2e8 };
ringSurfaceDensity(ring); // -> 106.1…
⚠️ **GitHub.com Fallback** ⚠️