Skip to content

astro.Interface.BodyProperties

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

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

Interface: BodyProperties

Defined in: src/astro/body-scan.ts:152

The physical body a scan describes — everything a calculation reads, and nothing that names the journal line it arrived on.

Remarks

BodyScanEvent extends this with the journal's own bookkeeping — event, timestamp, ScanType, BodyName, BodyID, StarSystem, SystemAddress, DistanceFromArrivalLS, Parents and the discovery flags. None of that is physics, so none of it is required here: every field below is optional, and a body assembled from a database row, an EDSM or Spansh record, or a literal in a test is as good an input as a captured line. A BodyScanEvent is a BodyProperties, so a parsed journal line passes to every calculation unchanged.

Each calculation states which fields it needs and returns null when one is missing — see ./body-physics, ./body-orbit, ./body-rings and ./star-physics.

Units are the journal's throughout: metres, seconds, kelvin, pascals, Earth masses for a planet and solar masses for a star. Angles are degrees except AxialTilt, which is radians.

Example

Only the fields a calculation reads need be present.

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

const earthLike: BodyProperties = { MassEM: 1, Radius: 6_371_000 };

bulkDensity(earthLike); // -> 5513.2…

Extended by

Properties

AbsoluteMagnitude?

readonly optional AbsoluteMagnitude?: number

Defined in: src/astro/body-scan.ts:192

The star's absolute magnitude — smaller is brighter, and it can be negative.


Age_MY?

readonly optional Age_MY?: number

Defined in: src/astro/body-scan.ts:194

The star's age, in millions of years.


AscendingNode?

readonly optional AscendingNode?: number

Defined in: src/astro/body-scan.ts:165

Longitude of the ascending node, in degrees.


Atmosphere?

readonly optional Atmosphere?: string

Defined in: src/astro/body-scan.ts:214

The atmosphere as the game describes it in full, e.g. "thin sulphur dioxide atmosphere". "" when the body has none.


AtmosphereComposition?

readonly optional AtmosphereComposition?: readonly AtmosphereComponent[]

Defined in: src/astro/body-scan.ts:226

What the atmosphere is made of, by percentage.


AtmosphereType?

readonly optional AtmosphereType?: string

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

The atmosphere's dominant gas as a bare token, e.g. "Nitrogen", "SulphurDioxide", "None".

Remarks

The token drops the density and temperature that Atmosphere spells out, so "thin nitrogen atmosphere" and "hot thick nitrogen atmosphere" share one AtmosphereType. Match on this and read the other for the qualifiers.


AxialTilt?

readonly optional AxialTilt?: number

Defined in: src/astro/body-scan.ts:176

Axial tilt, in radians — the one angle here that is not degrees.


Composition?

readonly optional Composition?: BodyComposition

Defined in: src/astro/body-scan.ts:247

The body's bulk composition, when the scan resolved it.


Eccentricity?

readonly optional Eccentricity?: number

Defined in: src/astro/body-scan.ts:157

Orbital eccentricity, 0 for a circular orbit and approaching 1 for a long ellipse.


Landable?

readonly optional Landable?: boolean

Defined in: src/astro/body-scan.ts:245

Whether a ship can land on the body.


Luminosity?

readonly optional Luminosity?: string

Defined in: src/astro/body-scan.ts:196

The star's luminosity class, e.g. "V", "Va", "VI".


MassEM?

readonly optional MassEM?: number

Defined in: src/astro/body-scan.ts:233

The body's mass, in Earth masses.


Materials?

readonly optional Materials?: readonly SurfaceMaterial[]

Defined in: src/astro/body-scan.ts:255

The materials collectable at the surface, by percentage.

Remarks

Written for a landable body. Each Name is a journal material symbol that getMaterialBySymbol (../materials) resolves.


MeanAnomaly?

readonly optional MeanAnomaly?: number

Defined in: src/astro/body-scan.ts:167

Mean anomaly at the moment the body was observed, in degrees.


OrbitalInclination?

readonly optional OrbitalInclination?: number

Defined in: src/astro/body-scan.ts:159

Orbital inclination, in degrees.


OrbitalPeriod?

readonly optional OrbitalPeriod?: number

Defined in: src/astro/body-scan.ts:163

Time to complete one orbit, in seconds.


Periapsis?

readonly optional Periapsis?: number

Defined in: src/astro/body-scan.ts:161

Argument of periapsis, in degrees.


PlanetClass?

readonly optional PlanetClass?: string

Defined in: src/astro/body-scan.ts:204

The body's class, e.g. "High metal content body", "Icy body", "Earthlike body", "Water world", "Sudarsky class I gas giant". Present only on a planet's or moon's line.


Radius?

readonly optional Radius?: number

Defined in: src/astro/body-scan.ts:261

The body's radius, in metres — for a star as much as for a planet.


ReserveLevel?

readonly optional ReserveLevel?: string

Defined in: src/astro/body-scan.ts:275

How rich the body's rings are, e.g. "PristineResources", "MajorResources", "CommonResources", "LowResources", "DepletedResources" — the game's reserve levels, each suffixed Resources.

Remarks

Written only when the body has rings, and it describes those rings rather than the body itself.


Rings?

readonly optional Rings?: readonly BodyRing[]

Defined in: src/astro/body-scan.ts:265

The body's rings and belts, absent when it has none.


RotationPeriod?

readonly optional RotationPeriod?: number

Defined in: src/astro/body-scan.ts:172

Time to complete one rotation, in seconds. Negative when the body rotates retrograde.


SemiMajorAxis?

readonly optional SemiMajorAxis?: number

Defined in: src/astro/body-scan.ts:155

Semi-major axis of the body's orbit, in metres.


StarType?

readonly optional StarType?: string

Defined in: src/astro/body-scan.ts:186

The star's spectral class, e.g. "G", "M", "TTS" (T Tauri), "N" (neutron star), "H" (black hole). Present only on a star's line, and the surest way to tell one.


StellarMass?

readonly optional StellarMass?: number

Defined in: src/astro/body-scan.ts:190

The star's mass, in solar masses.


Subclass?

readonly optional Subclass?: number

Defined in: src/astro/body-scan.ts:188

The spectral subclass, 0–9, hotter at 0.


SurfaceGravity?

readonly optional SurfaceGravity?: number

Defined in: src/astro/body-scan.ts:238

Surface gravity, in m/s² — divide by 9.80665 for the g figure the game's own UI shows.


SurfacePressure?

readonly optional SurfacePressure?: number

Defined in: src/astro/body-scan.ts:243

Atmospheric pressure at the surface, in pascals — divide by 101325 for atmospheres. 0 on an airless body.


SurfaceTemperature?

readonly optional SurfaceTemperature?: number

Defined in: src/astro/body-scan.ts:263

Surface — or, for a star, photospheric — temperature, in kelvin.


TerraformState?

readonly optional TerraformState?: string

Defined in: src/astro/body-scan.ts:209

Whether the body's terraforming potential has been realised: "" when there is none, "Terraformable" when it is a candidate, "Terraformed" when it already is.


TidalLock?

readonly optional TidalLock?: boolean

Defined in: src/astro/body-scan.ts:178

Whether the body keeps one face to its parent.


Volcanism?

readonly optional Volcanism?: string

Defined in: src/astro/body-scan.ts:231

The body's volcanism as the game describes it, e.g. "minor silicate vapour geysers volcanism". "" when the body has none.

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