DotNet.Astronomy.Class.GalaxyGrid - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Astronomy / GalaxyGrid

Class: GalaxyGrid

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/GalaxyGrid.cs:19

The bridge from a galactic position to the naming grid.

Remarks

SectorName reads a sector's place on the grid, and SystemAddress works in the game's own internal units. A caller holds neither. It holds light years with Sol at the origin, which is what the player journal, EDSM and Spansh report. This class converts one to the other.

The three frames the surface uses are the galactic position in light years from Sol, the sector grid in cubes of 1280 light years from the galaxy corner, and the internal units of one thirty-second of a light year from the same corner.

Fields

Origin

static readonly Origin: GalacticPosition

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/GalaxyGrid.cs:26

The corner of the galaxy, in light years from Sol.

Remarks

Sector and boxel positions are counted from this point. The codex region map states the same corner, and a test holds the two together.

SectorEdgeLy

const SectorEdgeLy: int = 1280

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/GalaxyGrid.cs:29

The edge of one sector cube, in light years.

Methods

ToSectorGridPosition()

static ToSectorGridPosition(position): SectorGridPosition

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/GalaxyGrid.cs:39

Reads the sector cube one galactic position falls in.

Parameters

position

GalacticPosition

The position in light years, with Sol at the origin.

Returns

SectorGridPosition

The sector's place on the grid.

Exceptions

ArgumentNullException

The position is absent.

ArgumentOutOfRangeException

The position lies outside the grid of sector cubes, which is outside the galaxy the addressing reaches.

ToSectorName()

static ToSectorName(position): string

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/GalaxyGrid.cs:70

Reads the procedural sector name of one galactic position.

Parameters

position

GalacticPosition

The position in light years, with Sol at the origin.

Returns

string

The sector name, such as Synuefe or Blae Eock.

Remarks

The answer is always the procedural sector. A system inside a region the game names by hand carries that region's name instead.

Exceptions

ArgumentNullException

The position is absent.

ArgumentOutOfRangeException

The position lies outside the grid, or the generator gives that place no name.

⚠️ **GitHub.com Fallback** ⚠️