Skip to content

astro.Function.primaryAngularDiameter

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

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

Function: primaryAngularDiameter()

primaryAngularDiameter(body, primary): number | null

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

How large the body it orbits appears in a body's sky, as an angular diameter in degrees.

Parameters

body

BodyProperties

The body being stood on. Needs SemiMajorAxis.

primary

BodyProperties

The body it orbits. Needs Radius.

Returns

number | null

The angular diameter in degrees, or null when the orbit or the primary's radius is missing.

Remarks

2 · atan(R_primary / a), taken exactly rather than through the small-angle approximation 2R/a: the two diverge by percent at the tens of degrees a parent actually subtends from a close moon, which is the range worth asking about. A landable moon whose primary fills 45° of sky is a view; one at 0.5° is a dot.

Distance is the body's own semi-major axis, centre to centre, so the figure is the mean.

Throws

If either argument is not an object.

Example

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

// A primary as far away as it is wide fills a right angle of sky.
primaryAngularDiameter({ SemiMajorAxis: 1e9 }, { Radius: 1e9 }); // -> 90

// Earth's Moon, looking back: Earth subtends about 2°.
primaryAngularDiameter({ SemiMajorAxis: 3.844e8 }, { Radius: 6_371_000 }); // -> 1.899…

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