Skip to content

astro.Function.bulkDensity

github-actions[bot] edited this page Aug 28, 2026 · 1 revision

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

Function: bulkDensity()

bulkDensity(body): number | null

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

A body's mean density, in kg/m³ — its mass spread evenly through a sphere of its radius.

Parameters

body

BodyProperties

The body. Needs a mass (bodyMass) and Radius.

Returns

number | null

Density in kg/m³, or null when either is missing. The scale is wide: an icy moon reads near 1000, rock and metal a few thousand, a neutron star around 10¹⁷.

Throws

If body is not an object.

Example

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

// Earth: one Earth mass in a 6371 km sphere.
bulkDensity({ MassEM: 1, Radius: 6_371_000 }); // -> 5513.2…

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (28)
Type Aliases (6)
Variables (22)
Functions (57)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (6)
Type Aliases (8)
Variables (3)
Functions (10)
Subpath modules (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (17)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (85)
Subpath modules (8)

Clone this wiki locally