Skip to content

astro.Function.toSystemAddress

github-actions[bot] edited this page Aug 26, 2026 · 74 revisions

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

Function: toSystemAddress()

toSystemAddress(address): bigint

Defined in: src/astro/system-address-input.ts:88

Convert a supported address representation to a bigint, or throw.

Use this at the edge of your own code when you want the failure to be loud; the library's address entry points call it for you, so decodeSystemAddress(event.SystemAddress) and ProceduralSystem.fromSystemAddress(event.SystemAddress) accept a journal number directly.

Parameters

address

SystemAddressInput

A bigint, a non-negative safe-integer number (a normally parsed journal address), or a decimal digit string.

Returns

bigint

The address as a bigint.

Throws

If the value cannot be converted: a non-integer, a negative number, a number beyond 2^53 - 1 (already rounded, so the identity is lost), or a non-numeric string. The message names the offending value. A bigint outside the 64-bit range is not a conversion failure — the decoder rejects it with a RangeError.

Example

import { toSystemAddress } from '@elite-dangerous-almanac/core/astro/system-address-input';
declare const event: { SystemAddress: number }; // an `FSDJump` line, parsed

toSystemAddress(event.SystemAddress); // journal number -> bigint
toSystemAddress('3309179996515');     // -> 3309179996515n

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (16)
Type Aliases (3)
Variables (11)
Functions (37)
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