-
Notifications
You must be signed in to change notification settings - Fork 0
DotNet.Astronomy.Class.SystemAddress
EliteDangerousAlmanac / Astronomy / SystemAddress
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:50
The 64-bit number the game identifies a system by.
The address packs, from the lowest bit up, the size class, then the boxel's place along each axis split into a sector index and an offset inside that sector, and last the system's own number. How wide each field is depends on the size class, which is why every step here reads that first.
A second layout, which some community tools write, carries the same information in a different order. DecodeModulated and EncodeModulated read and write that one.
An address is a ulong throughout, because its fields reach bit 55 and the value routinely passes what a floating-point number holds exactly. A journal event reports the address as a whole number, and a stored address as a decimal string, which TryParse reads.
constSectorInternalSize:int=40960
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:53
The edge of one sector in internal units, which is 1280 light years.
constUnitsPerLightYear:int=32
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:56
The internal units in one light year.
staticBoxelInternalSize(sizeClass):int
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:69
Reads the edge of a boxel of one size class, in internal units.
int
The size class, zero through seven.
int
The edge in internal units, 320 through 40960.
Divide by UnitsPerLightYear for light years.
ArgumentOutOfRangeException
The size class is outside zero through seven.
staticDecode(id64):DecodedSystemAddress
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:104
Reads the parts one system address holds.
ulong
The system address.
The size class, the sector, the boxel code, the sequence and the boxel.
staticDecodeModulated(id64):DecodedSystemAddress
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:138
Reads the parts one modulated system address holds.
ulong
The modulated system address.
The same parts Decode answers.
The modulated layout carries the same system in a different order, and some community tools and data dumps write it. A journal, EDSM, EDDN and Spansh all write the usual layout, which Decode reads.
staticEncode(parts,origin):ulong
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:172
Writes the parts of a system name and its region origin as a system address.
The parts of the name, as SystemName.Parse answers.
The region's origin, as NamingRegionOrigins.Resolve answers.
ulong
The system address.
ArgumentNullException
The parts or the origin are absent.
ArgumentOutOfRangeException
The size class, a letter or the first index is outside its range, the origin has a coordinate below zero, the name's boxel or sector falls outside the layout, or the sequence does not fit the field its size class leaves for it.
staticEncodeModulated(parts,origin):ulong
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:212
Writes the parts of a system name and its region origin as a modulated address.
The parts of the name, as SystemName.Parse answers.
The region's origin, as NamingRegionOrigins.Resolve answers.
ulong
The modulated system address.
Write the usual layout with Encode unless a tool asks for this one.
ArgumentNullException
The parts or the origin are absent.
ArgumentOutOfRangeException
A field is outside its range, or the sequence does not fit the 15 bits the modulated layout leaves for it.
staticParse(address):ulong
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:94
Reads a decimal system address, and refuses text that states none.
string
The address as digits.
ulong
The address.
ArgumentNullException
The text is absent.
FormatException
The text is not a decimal number the 64-bit range holds.
staticToAbsoluteBoxel(sizeClass,boxelCode,origin):AbsoluteBoxel
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:255
Reads where one boxel code sits, counted from the galaxy corner.
int
The size class, zero through seven.
int
The base-26 boxel code, as SystemName.ToBoxelCode answers.
The region's origin in internal units.
The boxel's place on the grid of boxels of its size.
A boxel code counts from the region's origin taken down to the boxel grid, so this is the inverse of ToBoxelCode. It refuses rather than write a wrong address.
ArgumentNullException
The origin is absent.
ArgumentOutOfRangeException
The size class is outside zero through seven, the origin has a coordinate below zero, or the code or the sector it lands in falls outside the address layout.
staticToBoxelCode(sizeClass,boxel,origin):int?
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:321
Reads the boxel code one boxel carries inside one region.
int
The size class, zero through seven.
The boxel's place, as Decode answers.
The region to count from, in internal units.
int?
The base-26 boxel code inside that region, or null where the boxel lies outside the region or the origin has a coordinate below zero.
A region the game names by hand starts somewhere other than its procedural sector, so the same boxel carries a different code under it. This reads that code.
ArgumentNullException
The boxel or the origin are absent.
ArgumentOutOfRangeException
The size class is outside zero through seven.
staticTryParse(address,id64):bool
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemAddress.cs:79
Reads a decimal system address.
string?
The address as digits, from stored data or a query string.
out ulong
The address, where the text states one.
bool
true where the text is a 64-bit decimal address.
Guides
Astronomy
Classes (16)
Records (29)
- AbsoluteBoxel
- AtmosphereComponent
- BodyComposition
- BodyParent
- BodyProperties
- BodyRing
- BodyScanEvent
- BoxelCodexRegion
- BoxelLetters
- CodexRegion
- CodexRegionBounds
- DecodedSystemAddress
- GalacticPlanePosition
- GalacticPosition
- HandAuthoredRegion
- HandAuthoredSphere
- MassStabilityAssessment
- NamingRegionOrigin
- Nebula
- NebulaNearby
- OrbitExtents
- PermitLock
- PermitLockedSystem
- RingDynamics
- RocheLimits
- SectorGridPosition
- SpinOrbitResonance
- SurfaceMaterial
- SystemNameParts
Commodities
Classes (2)
Records (1)
Enumerations (1)
Equipment
Classes (8)
Records (19)
- FittedPersonalModification
- FittedPersonalWeapon
- PersonalEngineeringIngredient
- PersonalModification
- PersonalModifier
- PersonalMount
- PersonalTool
- PersonalWeapon
- PersonalWeaponGrade
- PersonalWeaponMetrics
- ReloadTime
- ScopeMagnification
- Suit
- SuitGrade
- SuitIdentity
- SuitLoadout
- SuitLoadoutEvent
- SuitLoadoutImportOutcome
- SuitLoadoutModuleEvent
Materials
Classes (5)
Records (2)
Enumerations (4)
Ships
Classes (42)
- Ammunition
- Armour
- BlueprintCatalogue
- BlueprintCosts
- BlueprintJournal
- BuildMetrics
- BuildSlots
- CalculationResult\<T\>
- CalculationResult
- DefaultLoadouts
- Distributor
- Engineering
- EngineeringOptions
- ExperimentalEffectCatalogue
- ExperimentalEffectCosts
- Gunsights
- Heat
- JumpRange
- LoadoutCalculations
- LoadoutEditException
- LoadoutValidator
- Mobility
- MobilityCapacitor
- ModuleCapabilities
- ModuleCatalogue
- ModuleLimits
- ModuleStats
- OutfittingFamilies
- Power
- PreEngineeredCatalogue
- PreEngineeredStats
- Resistances
- ShieldCapacitor
- ShieldRecovery
- Shields
- ShipCatalogue
- ShipLoadout
- Slef
- SlotRestrictions
- SourcePurchase
- Weapons
- WeaponsCapacitor
Records (115)
- AmmunitionCapacity
- ApplyBlueprintOptions
- ArmourInput
- ArmourMetrics
- AvailableBlueprint
- Blueprint
- BlueprintCost
- BlueprintFeature
- BlueprintGrade
- BuildCost
- BuildCredits
- BuildLoad
- BuildMass
- BuildSlot
- BuildWeaponMetrics
- BulkheadParams
- CalculationIssue
- CellBankInput
- CellBankMetrics
- CellBankSummary
- CoreSlots
- DamageComponents
- DamageDistribution
- DamageSplit
- DamageTypeValues
- DefaultLoadout
- DefaultLoadoutModule
- DistributorCapacitorMetrics
- DistributorInput
- DistributorMetrics
- DistributorPips
- EngineeringAmbiguous
- EngineeringEditDetail
- EngineeringGradeEdit
- EngineeringMaterial
- EngineeringModifier
- EngineeringOptionGroup
- EngineeringRerolled
- EngineeringUnresolved
- ExperimentalContribution
- ExperimentalEffect
- ExperimentalEffectEdit
- FittedModule
- FittedWeaponMetrics
- FixedMountRepair
- FrameShiftDriveParams
- GunsightOffset
- GunsightPoint
- HardpointSlotSpec
- HeatInput
- HeatMetrics
- HeatState
- HeatWeapon
- HullReinforcementParams
- JumpRangeSummary
- LoadoutCalculationModule
- LoadoutEvent
- LoadoutExportOptions
- LoadoutFuelCapacity
- LoadoutImportOutcome
- LoadoutIssue
- LoadoutMass
- LoadoutModule
- LoadoutSlot
- LoadoutValidation
- LoadoutValidationInput
- MobilityCapacitorMetrics
- MobilityInput
- MobilityMetrics
- ModuleDefaulted
- ModuleEmptied
- ModuleEngineering
- ModuleFitProblem
- ModuleLimitEntry
- ModuleLimitIncrease
- ModuleLimitUsage
- ModuleReinforcementParams
- OptionalSlotSpec
- OutfittingModule
- ParsedSlot
- PowerBand
- PowerBudget
- PowerConsumer
- PowerConsumerResult
- PreEngineeredModifier
- PreEngineeredVariant
- ProjectileRangeBoundaries
- ShieldBoosterParams
- ShieldCapacitorInput
- ShieldCapacitorMetrics
- ShieldGeneratorParams
- ShieldInput
- ShieldMetrics
- ShieldRecoveryInput
- ShieldRecoveryMetrics
- Ship
- ShipSlots
- SlefDiagnostic
- SlefEntry
- SlefExportOptions
- SlefHeader
- SlefInspection
- SourceModuleValue
- SourcePurchaseRecord
- StandardLoadFigures
- ThrusterCurveParams
- ThrusterParams
- TotalRangeDetails
- UnpricedModule
- ValidationModule
- WeaponMetrics
- WeaponsCapacitorInput
- WeaponsCapacitorMetrics
- WeaponStats
- WeaponTotals
Interfaces (1)
Enumerations (35)
- BlueprintRoute
- CalculationField
- CalculationIssueReason
- CoreSlotType
- DamageType
- EngineeringEditCode
- EngineeringEditKind
- EngineeringGroupId
- FixedMountRepairStatus
- ImmovableReason
- LoadoutCredits
- LoadoutEditErrorCode
- LoadoutImportAction
- LoadoutIssueCode
- LoadoutIssueSeverity
- LoadoutModuleOrder
- ModifierMethod
- ModuleCategory
- ModuleExclusionGroup
- ModuleFitConstraint
- ModuleGuidance
- ModuleLimitGroup
- ModuleMount
- ModuleRating
- ModuleSlot
- ModuleStat
- OutfittingFamilyId
- PreEngineeredAcquisition
- ShipSize
- SlefConstraint
- SlefDiagnosticCode
- SlotKind
- SlotRestriction
- StandardLoad
- ThrusterLoad