Skip to content

astro.Function.orbitExtents

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

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

Function: orbitExtents()

orbitExtents(body): OrbitExtents | null

Defined in: src/astro/body-orbit.ts:100

Where a body's orbit actually reaches, from the mean distance and eccentricity the scan wrote.

Parameters

body

BodyProperties

The body. Needs SemiMajorAxis; Eccentricity is taken as 0 when absent, which is what a circular orbit means.

Returns

OrbitExtents | null

The extents in metres, or null when the body has no usable semi-major axis — a single-star system's primary star, which orbits nothing, among them.

Remarks

SemiMajorAxis is an average, and an eccentric orbit spends none of its time there. Periapsis is the figure a Roche breach, a tidal heating argument or a close-approach question turns on.

Throws

If body is not an object.

Example

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

orbitExtents({ SemiMajorAxis: 1e9, Eccentricity: 0.25 })?.periapsis; // -> 750000000

// No eccentricity written means a circle: both ends sit on the axis.
orbitExtents({ SemiMajorAxis: 1e9 })?.apoapsis; // -> 1000000000

orbitExtents({ MassEM: 1 }); // -> null

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