Skip to content

astro.Interface.BodyScanEvent

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

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

Interface: BodyScanEvent

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

A journal Scan event — one scanned star, planet, moon or belt cluster, and the library's import shape for body data.

Remarks

Elite Dangerous writes one Scan line per body whenever the discovery scanner, the FSS or a nav beacon resolves it, and that line is the community's lingua franca for bodies: EDDN relays it, EDSM and Spansh store it, every journal-reading app already holds it. So it is what this library takes in, field for field — the journal's own names, capitalisation and units — and a parsed line is already this type:

const scan = JSON.parse(line) as BodyScanEvent;

Units are the journal's, and they are not the ones the game's UI shows. Radii and orbital distances are metres, not light-seconds; pressure is pascals, not atmospheres; surface gravity is m/s², not g; AxialTilt is radians while every other angle is degrees. Every field below says which, because getting this wrong is silent — a plausible number in the wrong scale.

Almost every field is optional, because almost every field is conditional. A star's line carries no PlanetClass, a planet's no StarType, a belt cluster's little beyond its identity, and a body with no rings no ReserveLevel. Only ScanType, BodyName, BodyID, StarSystem, SystemAddress, DistanceFromArrivalLS, WasDiscovered and WasMapped are written for every body. Treat a missing field as "not written for this body, or not resolved by this scan" — never as a zero.

A body has no id64 of its own. SystemAddress identifies the system and BodyID the body within it; the pair is the identity to store and join on.

event and timestamp name the journal line rather than the body, and are optional so that a record reassembled from a database or an EDDN message is still this type.

Examples

A parsed line is already the interface, and its address goes straight into the rest of the astro API.

import type { BodyScanEvent } from '@elite-dangerous-almanac/core/astro';
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';

const scan: BodyScanEvent = {
    event: 'Scan',
    ScanType: 'Detailed',
    BodyName: 'Synuefe EN-H d11-96 A 1',
    BodyID: 3,
    StarSystem: 'Synuefe EN-H d11-96',
    SystemAddress: 3309179996515,
    DistanceFromArrivalLS: 543.2,
    WasDiscovered: false,
    WasMapped: false,
};

ProceduralSystem.fromSystemAddress(scan.SystemAddress).massCode; // -> 'd'

Which kind of body a line describes is told by which fields it carries: StarType for a star, PlanetClass for a planet or moon, neither for a belt cluster.

import type { BodyScanEvent } from '@elite-dangerous-almanac/core/astro';

declare const scan: BodyScanEvent;

const kind =
    scan.StarType !== undefined
        ? 'star'
        : scan.PlanetClass !== undefined
          ? 'planet'
          : 'belt cluster or barycentre';

A landable body's Materials name journal material symbols, which the materials catalogue reads directly.

import { getMaterialBySymbol } from '@elite-dangerous-almanac/core/materials';

getMaterialBySymbol('sulphur')?.name; // -> 'Sulphur'

Extends

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.

Inherited from

BodyProperties.AbsoluteMagnitude


Age_MY?

readonly optional Age_MY?: number

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

The star's age, in millions of years.

Inherited from

BodyProperties.Age_MY


AscendingNode?

readonly optional AscendingNode?: number

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

Longitude of the ascending node, in degrees.

Inherited from

BodyProperties.AscendingNode


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.

Inherited from

BodyProperties.Atmosphere


AtmosphereComposition?

readonly optional AtmosphereComposition?: readonly AtmosphereComponent[]

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

What the atmosphere is made of, by percentage.

Inherited from

BodyProperties.AtmosphereComposition


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.

Inherited from

BodyProperties.AtmosphereType


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.

Inherited from

BodyProperties.AxialTilt


BodyID

readonly BodyID: number

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

The body's id within its system, unique and stable there, with the system's first star at 0.

Remarks

A body has no galaxy-wide id of its own: SystemAddress + BodyID is the identity to store and join on. It is also what BodyParent entries point at.


BodyName

readonly BodyName: string

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

The body's in-game name, e.g. "Synuefe EN-H d11-96 A 1".


Composition?

readonly optional Composition?: BodyComposition

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

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

Inherited from

BodyProperties.Composition


DistanceFromArrivalLS

readonly DistanceFromArrivalLS: number

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

Distance from the system's arrival point, in light-seconds. The main star reads 0.


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.

Inherited from

BodyProperties.Eccentricity


event?

readonly optional event?: string

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

"Scan" when a journal line supplied it.


Landable?

readonly optional Landable?: boolean

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

Whether a ship can land on the body.

Inherited from

BodyProperties.Landable


Luminosity?

readonly optional Luminosity?: string

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

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

Inherited from

BodyProperties.Luminosity


MassEM?

readonly optional MassEM?: number

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

The body's mass, in Earth masses.

Inherited from

BodyProperties.MassEM


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.

Inherited from

BodyProperties.Materials


MeanAnomaly?

readonly optional MeanAnomaly?: number

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

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

Inherited from

BodyProperties.MeanAnomaly


OrbitalInclination?

readonly optional OrbitalInclination?: number

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

Orbital inclination, in degrees.

Inherited from

BodyProperties.OrbitalInclination


OrbitalPeriod?

readonly optional OrbitalPeriod?: number

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

Time to complete one orbit, in seconds.

Inherited from

BodyProperties.OrbitalPeriod


Parents?

readonly optional Parents?: readonly BodyParent[]

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

The body's parent chain, nearest first and ending at the system's root — so a moon reads [{ Planet: … }, { Star: 0 }].

Remarks

Absent for a body that orbits nothing, i.e. a single-star system's main star.


Periapsis?

readonly optional Periapsis?: number

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

Argument of periapsis, in degrees.

Inherited from

BodyProperties.Periapsis


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.

Inherited from

BodyProperties.PlanetClass


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.

Inherited from

BodyProperties.Radius


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.

Inherited from

BodyProperties.ReserveLevel


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.

Inherited from

BodyProperties.Rings


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.

Inherited from

BodyProperties.RotationPeriod


ScanType

readonly ScanType: string

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

How the body was scanned: "AutoScan" (passive, on approach or from the discovery scanner's honk), "Basic", "Detailed" (resolved in the FSS or by flying to the body) or "NavBeaconDetail" (read off a populated system's nav beacon).

Remarks

This is the field that decides how much of the rest is present. A "Detailed" or "NavBeaconDetail" line is the full record; an "AutoScan" of a distant body may carry little more than its identity and orbit.


SemiMajorAxis?

readonly optional SemiMajorAxis?: number

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

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

Inherited from

BodyProperties.SemiMajorAxis


StarSystem

readonly StarSystem: string

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

The system's name, e.g. "Synuefe EN-H d11-96".


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.

Inherited from

BodyProperties.StarType


StellarMass?

readonly optional StellarMass?: number

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

The star's mass, in solar masses.

Inherited from

BodyProperties.StellarMass


Subclass?

readonly optional Subclass?: number

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

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

Inherited from

BodyProperties.Subclass


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.

Inherited from

BodyProperties.SurfaceGravity


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.

Inherited from

BodyProperties.SurfacePressure


SurfaceTemperature?

readonly optional SurfaceTemperature?: number

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

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

Inherited from

BodyProperties.SurfaceTemperature


SystemAddress

readonly SystemAddress: SystemAddressInput

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

The system's id64 address.

Remarks

Typed as SystemAddressInput rather than number, so the value survives however the line was parsed: JSON.parse yields a number, a lossless parser a bigint, a database column a decimal string. All three pass straight into decodeSystemAddress, ProceduralSystem.fromSystemAddress and the permit-lock lookups. Addresses reach bit 55, so a number beyond 2^53 - 1 has already been rounded — those entry points reject one rather than answer for the wrong system.


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.

Inherited from

BodyProperties.TerraformState


TidalLock?

readonly optional TidalLock?: boolean

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

Whether the body keeps one face to its parent.

Inherited from

BodyProperties.TidalLock


timestamp?

readonly optional timestamp?: string

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

When the scan happened, ISO 8601 in UTC, e.g. "2026-08-26T21:04:11Z".


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.

Inherited from

BodyProperties.Volcanism


WasDiscovered

readonly WasDiscovered: boolean

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

Whether someone had already discovered the body before this scan.


WasFootfalled?

readonly optional WasFootfalled?: boolean

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

Whether someone had already set foot on the body. Written since Odyssey, and only for a body that can be walked on.


WasMapped

readonly WasMapped: boolean

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

Whether someone had already surface-mapped the body before this scan.

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