-
Notifications
You must be signed in to change notification settings - Fork 0
astro.Interface.BodyScanEvent
@elite-dangerous-almanac/core / astro / BodyScanEvent
Defined in: src/astro/body-scan.ts:364
A journal Scan event — one scanned star, planet, moon or belt cluster, and the
library's import shape for body data.
Elite Dangerous writes one Scan line per body whenever the discovery scanner, the FSS
or a nav beacon resolves it, and that line is the community's lingua franca for bodies:
EDDN relays it, EDSM and Spansh store it, every journal-reading app already holds it.
So it is what this library takes in, field for field — the journal's own names,
capitalisation and units — and a parsed line is already this type:
const scan = JSON.parse(line) as BodyScanEvent;Units are the journal's, and they are not the ones the game's UI shows. Radii and
orbital distances are metres, not light-seconds; pressure is pascals, not atmospheres;
surface gravity is m/s², not g; AxialTilt is radians while every other angle is
degrees. Every field below says which, because getting this wrong is silent — a
plausible number in the wrong scale.
Almost every field is optional, because almost every field is conditional. A star's
line carries no PlanetClass, a planet's no
StarType, a belt cluster's little beyond its identity, and a body
with no rings no ReserveLevel. Only ScanType, BodyName,
BodyID, StarSystem, SystemAddress, DistanceFromArrivalLS, WasDiscovered and
WasMapped are written for every body. Treat a missing field as "not written for this
body, or not resolved by this scan" — never as a zero.
A body has no id64 of its own. SystemAddress identifies the system and BodyID the body within it; the pair is the identity to store and join on.
event and timestamp name the journal line rather than the body, and are optional so
that a record reassembled from a database or an EDDN message is still this type.
A parsed line is already the interface, and its address goes straight into the rest of the astro API.
import type { BodyScanEvent } from '@elite-dangerous-almanac/core/astro';
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
const scan: BodyScanEvent = {
event: 'Scan',
ScanType: 'Detailed',
BodyName: 'Synuefe EN-H d11-96 A 1',
BodyID: 3,
StarSystem: 'Synuefe EN-H d11-96',
SystemAddress: 3309179996515,
DistanceFromArrivalLS: 543.2,
WasDiscovered: false,
WasMapped: false,
};
ProceduralSystem.fromSystemAddress(scan.SystemAddress).massCode; // -> 'd'Which kind of body a line describes is told by which fields it carries: StarType for
a star, PlanetClass for a planet or moon, neither for a belt cluster.
import type { BodyScanEvent } from '@elite-dangerous-almanac/core/astro';
declare const scan: BodyScanEvent;
const kind =
scan.StarType !== undefined
? 'star'
: scan.PlanetClass !== undefined
? 'planet'
: 'belt cluster or barycentre';A landable body's Materials name journal material symbols, which the materials catalogue reads directly.
import { getMaterialBySymbol } from '@elite-dangerous-almanac/core/materials';
getMaterialBySymbol('sulphur')?.name; // -> 'Sulphur'
readonlyoptionalAbsoluteMagnitude?:number
Defined in: src/astro/body-scan.ts:192
The star's absolute magnitude — smaller is brighter, and it can be negative.
BodyProperties.AbsoluteMagnitude
readonlyoptionalAge_MY?:number
Defined in: src/astro/body-scan.ts:194
The star's age, in millions of years.
readonlyoptionalAscendingNode?:number
Defined in: src/astro/body-scan.ts:165
Longitude of the ascending node, in degrees.
readonlyoptionalAtmosphere?:string
Defined in: src/astro/body-scan.ts:214
The atmosphere as the game describes it in full, e.g.
"thin sulphur dioxide atmosphere". "" when the body has none.
readonlyoptionalAtmosphereComposition?: readonlyAtmosphereComponent[]
Defined in: src/astro/body-scan.ts:226
What the atmosphere is made of, by percentage.
BodyProperties.AtmosphereComposition
readonlyoptionalAtmosphereType?:string
Defined in: src/astro/body-scan.ts:224
The atmosphere's dominant gas as a bare token, e.g. "Nitrogen",
"SulphurDioxide", "None".
The token drops the density and temperature that Atmosphere
spells out, so "thin nitrogen atmosphere" and "hot thick nitrogen atmosphere"
share one AtmosphereType. Match on this and read the other for the qualifiers.
readonlyoptionalAxialTilt?:number
Defined in: src/astro/body-scan.ts:176
Axial tilt, in radians — the one angle here that is not degrees.
readonlyBodyID:number
Defined in: src/astro/body-scan.ts:393
The body's id within its system, unique and stable there, with the system's first star at 0.
A body has no galaxy-wide id of its own: SystemAddress + BodyID is the identity
to store and join on. It is also what BodyParent entries point at.
readonlyBodyName:string
Defined in: src/astro/body-scan.ts:384
The body's in-game name, e.g. "Synuefe EN-H d11-96 A 1".
readonlyoptionalComposition?:BodyComposition
Defined in: src/astro/body-scan.ts:247
The body's bulk composition, when the scan resolved it.
readonlyDistanceFromArrivalLS:number
Defined in: src/astro/body-scan.ts:412
Distance from the system's arrival point, in light-seconds. The main star reads
0.
readonlyoptionalEccentricity?:number
Defined in: src/astro/body-scan.ts:157
Orbital eccentricity, 0 for a circular orbit and approaching 1 for a long ellipse.
readonlyoptionalevent?:string
Defined in: src/astro/body-scan.ts:367
"Scan" when a journal line supplied it.
readonlyoptionalLandable?:boolean
Defined in: src/astro/body-scan.ts:245
Whether a ship can land on the body.
readonlyoptionalLuminosity?:string
Defined in: src/astro/body-scan.ts:196
The star's luminosity class, e.g. "V", "Va", "VI".
readonlyoptionalMassEM?:number
Defined in: src/astro/body-scan.ts:233
The body's mass, in Earth masses.
readonlyoptionalMaterials?: readonlySurfaceMaterial[]
Defined in: src/astro/body-scan.ts:255
The materials collectable at the surface, by percentage.
Written for a landable body. Each Name is a journal material symbol that
getMaterialBySymbol (../materials) resolves.
readonlyoptionalMeanAnomaly?:number
Defined in: src/astro/body-scan.ts:167
Mean anomaly at the moment the body was observed, in degrees.
readonlyoptionalOrbitalInclination?:number
Defined in: src/astro/body-scan.ts:159
Orbital inclination, in degrees.
BodyProperties.OrbitalInclination
readonlyoptionalOrbitalPeriod?:number
Defined in: src/astro/body-scan.ts:163
Time to complete one orbit, in seconds.
readonlyoptionalParents?: readonlyBodyParent[]
Defined in: src/astro/body-scan.ts:420
The body's parent chain, nearest first and ending at the system's root — so a moon
reads [{ Planet: … }, { Star: 0 }].
Absent for a body that orbits nothing, i.e. a single-star system's main star.
readonlyoptionalPeriapsis?:number
Defined in: src/astro/body-scan.ts:161
Argument of periapsis, in degrees.
readonlyoptionalPlanetClass?:string
Defined in: src/astro/body-scan.ts:204
The body's class, e.g. "High metal content body", "Icy body",
"Earthlike body", "Water world", "Sudarsky class I gas giant". Present only
on a planet's or moon's line.
readonlyoptionalRadius?:number
Defined in: src/astro/body-scan.ts:261
The body's radius, in metres — for a star as much as for a planet.
readonlyoptionalReserveLevel?:string
Defined in: src/astro/body-scan.ts:275
How rich the body's rings are, e.g. "PristineResources", "MajorResources",
"CommonResources", "LowResources", "DepletedResources" — the game's reserve
levels, each suffixed Resources.
Written only when the body has rings, and it describes those rings rather than the body itself.
readonlyoptionalRings?: readonlyBodyRing[]
Defined in: src/astro/body-scan.ts:265
The body's rings and belts, absent when it has none.
readonlyoptionalRotationPeriod?:number
Defined in: src/astro/body-scan.ts:172
Time to complete one rotation, in seconds. Negative when the body rotates retrograde.
readonlyScanType:string
Defined in: src/astro/body-scan.ts:382
How the body was scanned: "AutoScan" (passive, on approach or from the discovery
scanner's honk), "Basic", "Detailed" (resolved in the FSS or by flying to the
body) or "NavBeaconDetail" (read off a populated system's nav beacon).
This is the field that decides how much of the rest is present. A "Detailed" or
"NavBeaconDetail" line is the full record; an "AutoScan" of a distant body may
carry little more than its identity and orbit.
readonlyoptionalSemiMajorAxis?:number
Defined in: src/astro/body-scan.ts:155
Semi-major axis of the body's orbit, in metres.
readonlyStarSystem:string
Defined in: src/astro/body-scan.ts:395
The system's name, e.g. "Synuefe EN-H d11-96".
readonlyoptionalStarType?:string
Defined in: src/astro/body-scan.ts:186
The star's spectral class, e.g. "G", "M", "TTS" (T Tauri), "N" (neutron
star), "H" (black hole). Present only on a star's line, and the surest way to
tell one.
readonlyoptionalStellarMass?:number
Defined in: src/astro/body-scan.ts:190
The star's mass, in solar masses.
readonlyoptionalSubclass?:number
Defined in: src/astro/body-scan.ts:188
The spectral subclass, 0–9, hotter at 0.
readonlyoptionalSurfaceGravity?:number
Defined in: src/astro/body-scan.ts:238
Surface gravity, in m/s² — divide by 9.80665 for the g figure the game's
own UI shows.
readonlyoptionalSurfacePressure?:number
Defined in: src/astro/body-scan.ts:243
Atmospheric pressure at the surface, in pascals — divide by 101325 for
atmospheres. 0 on an airless body.
BodyProperties.SurfacePressure
readonlyoptionalSurfaceTemperature?:number
Defined in: src/astro/body-scan.ts:263
Surface — or, for a star, photospheric — temperature, in kelvin.
BodyProperties.SurfaceTemperature
readonlySystemAddress:SystemAddressInput
Defined in: src/astro/body-scan.ts:407
The system's id64 address.
Typed as SystemAddressInput rather than number, so the value survives
however the line was parsed: JSON.parse yields a number, a lossless parser a
bigint, a database column a decimal string. All three pass straight into
decodeSystemAddress, ProceduralSystem.fromSystemAddress and the permit-lock
lookups. Addresses reach bit 55, so a number beyond 2^53 - 1 has already been
rounded — those entry points reject one rather than answer for the wrong system.
readonlyoptionalTerraformState?:string
Defined in: src/astro/body-scan.ts:209
Whether the body's terraforming potential has been realised: "" when there is
none, "Terraformable" when it is a candidate, "Terraformed" when it already is.
readonlyoptionalTidalLock?:boolean
Defined in: src/astro/body-scan.ts:178
Whether the body keeps one face to its parent.
readonlyoptionaltimestamp?:string
Defined in: src/astro/body-scan.ts:369
When the scan happened, ISO 8601 in UTC, e.g. "2026-08-26T21:04:11Z".
readonlyoptionalVolcanism?:string
Defined in: src/astro/body-scan.ts:231
The body's volcanism as the game describes it, e.g.
"minor silicate vapour geysers volcanism". "" when the body has none.
readonlyWasDiscovered:boolean
Defined in: src/astro/body-scan.ts:424
Whether someone had already discovered the body before this scan.
readonlyoptionalWasFootfalled?:boolean
Defined in: src/astro/body-scan.ts:431
Whether someone had already set foot on the body. Written since Odyssey, and only for a body that can be walked on.
readonlyWasMapped:boolean
Defined in: src/astro/body-scan.ts:426
Whether someone had already surface-mapped the body before this scan.
Guides
astro
Classes (1)
ProceduralSystem
Properties
Accessors
Methods
Interfaces (28)
- AbsoluteBoxel
- AtmosphereComponent
- BodyComposition
- BodyParent
- BodyProperties
- BodyRing
- BodyScanEvent
- BoxelLetters
- CodexRegion
- CodexRegionBounds
- DecodedAddress
- GalacticPlanePosition
- GalacticPosition
- HandAuthoredRegion
- HandAuthoredSphere
- IsProceduralSystemNameOptions
- MassStabilityAssessment
- NamingRegionOrigin
- Nebula
- NebulaWithDistance
- OrbitExtents
- PermitLockedSystem
- RingDynamics
- RocheLimits
- SectorGridPosition
- SpinOrbitResonance
- SurfaceMaterial
- SystemNameParts
Type Aliases (6)
Variables (22)
- BASE_BOXEL_LY
- CHANDRASEKHAR_LIMIT_SOLAR_MASSES
- CODEX_REGIONS
- GALAXY_ORIGIN
- GRAVITATIONAL_CONSTANT
- HAND_AUTHORED_REGIONS
- KG_PER_EARTH_MASS
- KG_PER_SOLAR_MASS
- MASS_CODE_COUNT
- NEUTRON_STAR_MASS_DROP_OFF_SOLAR_MASSES
- PERMIT_LOCKED_REGIONS
- PERMIT_LOCKED_SYSTEMS
- PROCGEN_NEBULAE
- REAL_NEBULAE
- RING_NOMINAL_RADIUS_FRACTION
- SECTOR_EDGE_LY
- SECTOR_INTERNAL_SIZE
- SOLAR_RADIUS
- SPEED_OF_LIGHT
- TOV_LIMIT_SOLAR_MASSES
- VISIBLE_RING_MAX_WIDTH
- VISIBLE_RING_MIN_SURFACE_DENSITY
Functions (57)
- absoluteBolometricMagnitude
- absoluteBoxelToBoxelCode
- assessMassStability
- bodyMass
- boxelCodeToAbsoluteBoxel
- boxelCodeToLetters
- boxelEdgeLy
- boxelInternalSize
- bulkDensity
- canonicalizeSectorName
- canonicalizeSystemName
- classifyEccentricity
- classifyNeutronStar
- decodeModSystemAddress
- decodeSystemAddress
- encodeModSystemAddress
- encodeSystemAddress
- equatorialVelocity
- findHandAuthoredRegionAt
- formatSystemName
- getCodexRegion
- getCodexRegionByName
- getHandAuthoredRegionOrigin
- getNebulaByName
- hillRadius
- isInvisibleRing
- isPermitLockedRegionName
- isPermitLockedSystemName
- isProceduralSystemName
- lettersToBoxelCode
- mainSequenceLifetime
- massCodeToSizeClass
- nearestNebulae
- nebulaeWithin
- orbitExtents
- parseSystemName
- permitLockedRegionForSystemName
- permitLockedSystemForAddress
- permitLockedSystemForName
- permitLockForSystemName
- primaryAngularDiameter
- resolveNamingRegionOrigin
- ringDynamics
- ringParticleDensity
- ringRocheLimits
- ringSurfaceDensity
- rocheLimits
- rocheLimitsForDensity
- schwarzschildRadius
- sectorGridPositionFromGalacticPosition
- sectorGridPositionFromName
- sectorNameFromGalacticPosition
- sectorNameFromGridPosition
- sizeClassToMassCode
- spinOrbitResonance
- toSystemAddress
- tryToSystemAddress
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)
- getBlueprintName
- getCalculationIssueMessage
- getEngineeringGroupName
- getExperimentalEffectDescription
- getExperimentalEffectName
- getLoadoutEditErrorMessage
- getLoadoutIssueMessage
- getLoadoutSlotName
- getMaterialName
- getMicroResourceName
- getModuleName
- getOutfittingFamilyName
- getPreEngineeredVariantName
- getShipManufacturer
- getShipName
- getSlefDiagnosticMessage
- getSlotRestrictionLabel
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
ships
Classes (3)
BuildMetrics
Methods
- armourMetrics()
- buildCost()
- buildMass()
- cellBanks()
- distributorMetricsResult()
- frameShiftDrive()
- frameShiftDriveMassFactor()
- fuelPerJump()
- heatMetricsResult()
- jumpRange()
- jumpRangeSummary()
- ladenJumpRange()
- loadout()
- maxJumpRange()
- mobilityCapacitorMetricsResult()
- mobilityMetricsResult()
- powerBudget()
- shieldCapacitorMetricsResult()
- shieldMetricsResult()
- shieldRecoveryResult()
- standardLoadResult()
- thrusters()
- totalRange()
- weaponMetrics()
- weaponsCapacitorMetrics()
- of()
LoadoutEditError
Constructors
Properties
Methods
ShipLoadout
Accessors
- cargoCapacity
- fuelCapacity
- hullValue
- importOutcomes
- modulesValue
- rebuy
- shipIdent
- shipName
- shipSymbol
- sourcePurchase
- unladenMass
Methods
- applyBlueprint()
- availableBlueprints()
- availableExperimentalEffects()
- clearEngineering()
- completeEngineeringGrade()
- fittedModuleAt()
- fittedModules()
- modulesForSlot()
- removeModule()
- repairFixedMount()
- setExperimentalEffect()
- setModule()
- setModuleEnabled()
- setModulePriority()
- setPreEngineeredVariant()
- slots()
- toLoadoutEvent()
- toSlef()
- toSlefString()
- validation()
- default()
- empty()
- fromLoadout()
- fromSlef()
Interfaces (125)
- AmmunitionCapacity
- AmmunitionStats
- ApplyBlueprintOptions
- ArmourInput
- ArmourMetrics
- AvailableBlueprint
- Blueprint
- BlueprintFeature
- BlueprintGrade
- BlueprintModuleEngineering
- BuildCost
- BuildCredits
- BuildMass
- BuildSlotBase
- BuildWeaponMetrics
- BulkheadParams
- CalculationIssue
- CellBankInput
- CellBankMetrics
- CellBankSummary
- CoreBuildSlot
- CoreSlots
- DamageComponents
- DamageDistribution
- DamageResistanceParams
- DamageSplit
- DamageTypeValues
- DistributorCapacitorMetrics
- DistributorInput
- DistributorMetrics
- DistributorOptions
- DistributorPips
- EngineeringMaterial
- EngineeringModifier
- EngineeringNormalizationUnchanged
- EngineeringNormalizationUnsupported
- EngineeringNormalized
- EngineeringOptionGroup
- ExperimentalContribution
- ExperimentalEffect
- ExperimentalEffectUnchanged
- ExperimentalEffectUnsupported
- ExperimentalEffectUpdated
- FittedModule
- FittedWeaponMetrics
- FrameShiftDriveJumpStats
- FrameShiftDriveParams
- FuelCapacity
- GunsightPoint
- HardpointBuildSlot
- HardpointSlotSpec
- HeatInput
- HeatMetrics
- HeatState
- HeatWeapon
- HullReinforcementParams
- JumpOptions
- JumpRangeSummary
- LoadoutCalculationModule
- LoadoutEvent
- LoadoutExportOptions
- LoadoutIssue
- LoadoutMass
- LoadoutModule
- LoadoutValidation
- LoadoutValidationInput
- MassCurveStats
- MobilityCapacitorInput
- MobilityCapacitorMetrics
- MobilityCapacitorOptions
- MobilityInput
- MobilityMetrics
- ModuleLimitEntry
- ModuleLimitIncrease
- ModuleLimitUsage
- ModuleReinforcementParams
- OptionalBuildSlot
- OptionalSlotSpec
- OutfittingModule
- OutfittingModuleIdentity
- OutfittingModuleStats
- ParsedSlot
- PowerBand
- PowerBudget
- PowerConsumer
- PowerConsumerResult
- PowerDistributorStats
- PowerGenerationStats
- PreEngineeredModifier
- PreEngineeredVariant
- ProjectileRangeBoundaries
- ShieldBoosterParams
- ShieldCapacitorInput
- ShieldCapacitorMetrics
- ShieldCapacitorOptions
- ShieldGeneratorParams
- ShieldInput
- ShieldMetrics
- ShieldRecovery
- ShieldRecoveryInput
- ShieldRecoveryOptions
- ShieldRegenerationStats
- Ship
- ShipSlots
- SimpleBuildSlot
- SlefDiagnostic
- SlefEntry
- SlefExportOptions
- SlefHeader
- SlefInspection
- SlefStringifyOptions
- SourceModuleValue
- SourcePurchaseRecord
- StandardLoadInputs
- ThrusterCurveParams
- ThrusterParams
- TotalRangeDetails
- ValidationModule
- WeaponDamageStats
- WeaponMetrics
- WeaponsCapacitorInput
- WeaponsCapacitorMetrics
- WeaponsOptions
- WeaponStats
- WeaponTotals
Type Aliases (44)
- BlueprintGrades
- BuildSlot
- CalculationIssueReason
- CalculationResult
- CoreSlotType
- DamageResistances
- DamageType
- EngineeringGroupId
- EngineeringNormalizationCode
- EngineeringNormalizationResult
- ExperimentalEffectMutationCode
- ExperimentalEffectMutationResult
- FixedMountRepairResult
- GunsightOffset
- HardpointRestriction
- ImmovableReason
- LoadoutEditErrorCode
- LoadoutImportOutcome
- LoadoutIssueCode
- LoadoutIssueParam
- LoadoutIssueParams
- LoadoutSlot
- ModifierMethod
- ModuleCategory
- ModuleEngineering
- ModuleExclusionGroup
- ModuleFitConstraint
- ModuleGuidance
- ModuleLimitGroup
- ModuleMount
- ModuleRating
- ModuleSlot
- OptionalRestriction
- OutfittingFamilyId
- PreEngineeredAcquisition
- ShipGunsight
- ShipGunsightCatalogue
- Slef
- SlefConstraint
- SlefDiagnosticCode
- SlotKind
- SlotRestriction
- StandardLoad
- ThrusterLoad
Variables (10)
Functions (85)
- ammunitionCapacity
- armourMetrics
- armourPiercingFactor
- calculateCargoCapacity
- calculateFuelCapacity
- calculateModuleLimits
- calculateUnladenMass
- cellBankSummary
- combinedRateOfFire
- computeModifiers
- damageFalloff
- damagePerSecond
- distributorMetrics
- effectiveHitPoints
- effectiveWeaponThermalLoad
- energyPerSecond
- enumerateSlots
- equilibriumHeatLevel
- frameShiftDriveMassFactor
- fuelPerJump
- getBlueprint
- getBlueprintGrade
- getBlueprintsForModule
- getBulkheadsForShip
- getEngineeringGroup
- getExperimentalEffect
- getExperimentalsForBlueprint
- getExperimentalsForModule
- getLoadoutModifier
- getModuleBySymbol
- getModulesByName
- getPreEngineeredJournalModifiers
- getPreEngineeredModifiers
- getPreEngineeredStats
- getPreEngineeredVariants
- getShipByName
- getShipBySymbol
- getShipGunsight
- getShipSlots
- getSourceModuleValue
- hasFrameShiftDriveJumpStats
- hasMassCurveStats
- hasPowerDistributorStats
- hasPowerGenerationStats
- hasShieldRegenerationStats
- hasWeaponDamageStats
- heatLevelAtTime
- heatMetrics
- heatPerSecond
- identifyPreEngineeredVariant
- inspectSlef
- isPreEngineered
- mapDamageTypes
- mobilityCapacitorMetrics
- mobilityMetrics
- parseSlef
- parseSlotName
- powerBudget
- projectGunsight
- resolveBlueprintForModule
- secondsToHeatLevel
- shieldCapacitorMetrics
- shieldMassCurveMultiplier
- shieldMetrics
- shieldRecovery
- shieldStrength
- singleJumpRange
- sourcePurchaseFromLoadout
- splitDamage
- stackArmourResistance
- stackShieldResistance
- stringifySlef
- sumMaterials
- sumSourceModuleValues
- sumWeaponMetrics
- sustainedDamagePerSecond
- sustainedFireFactor
- systemsResistance
- thrusterMassCurveMultiplier
- toSlef
- totalRange
- unresolvedModifiers
- validateLoadout
- weaponMetrics
- weaponsCapacitorMetrics