Skip to content

astro.Function.absoluteBoxelToBoxelCode

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

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

Function: absoluteBoxelToBoxelCode()

absoluteBoxelToBoxelCode(sizeClass, absoluteBoxel, origin): number | null

Defined in: src/astro/system-address.ts:177

Boxel code (base-26 index) of an absolute boxel relative to a region origin, or null when the boxel does not sit inside that region.

Used by the hand-authored-sector override: the same physical boxel yields a different boxel code under a hand-authored region whose origin differs from the procedural sector's. This is the inverse of boxelCodeToAbsoluteBoxel.

Parameters

sizeClass

number

Size class 0–7 (mass code ah).

absoluteBoxel

AbsoluteBoxel

The boxel's absolute grid indices, as decodeSystemAddress returns in absoluteBoxel.

origin

NamingRegionOrigin

The region origin to measure against (internal units, 32 per light-year), from ./naming-region-origins.

Returns

number | null

The base-26 boxel code within that region, or null when the boxel lies outside the region or the origin has a negative coordinate.

Example

import { resolveNamingRegionOrigin } from '@elite-dangerous-almanac/core/astro/naming-region-origins';
import { absoluteBoxelToBoxelCode, decodeSystemAddress } from '@elite-dangerous-almanac/core/astro/system-address';

declare const id64: bigint;

const { sizeClass, absoluteBoxel } = decodeSystemAddress(id64);
absoluteBoxelToBoxelCode(sizeClass, absoluteBoxel, resolveNamingRegionOrigin('Pleiades Sector')!);

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