Merge main through #1637 into the renderer seam

Ports the cockpit bridge view, the orbital view riding a satellite with
ground-site focus, satellite classes and draw-mark row actions onto the
renderer contract. The orbital view's imagery look-ahead pre-load is
dropped (no contract member); tiles load as they come on screen.
This commit is contained in:
Sameh Khamis committed 2026-11-10 01:35:00 -08:00
commit e48ed3eb9e
169 files changed
+22415 -681

No files matched your search

+38 -2
View File
@@ -1,3 +1,4 @@
import { DEFAULT_SATELLITE_CLASSES } from './classes.js';
import { worldClock, worldTimeFor } from '../../time/worldClock.js';
export function createState({ services }) {
@@ -13,7 +14,9 @@ export function createState({ services }) {
state._overlayHost = state.DEFAULT_OVERLAY_HOST;
// Satellite catalog: { noradId → { name, satrec, group } }
// Satellite catalog: { noradId → { name, satrec, group, line1, line2,
// satelliteClass, ucs, satcat } } — class, UCS and SATCAT records from
// src/layers/satellites/classes.js and the sources the update read.
state._catalog = new Map();
@@ -42,6 +45,12 @@ export function createState({ services }) {
// Cache provenance belongs to admitted core and dense records separately.
state._coreStale = false;
// How current the SATCAT records behind the classes are: null before any
// read, then 'current' | 'stale' | 'unavailable' (see ingestion.js).
state._satcatState = null;
// When _satcatState was last set (Date.now()); a current read is kept
// SATCAT_KEEP_MS (src/layers/satellites/ingestion.js).
state._satcatReadAtMs = Number.NEGATIVE_INFINITY;
state._denseStale = false;
state._activeUpdateControllers = new Set();
@@ -92,9 +101,25 @@ export function createState({ services }) {
// Runtime params (DataLayerManager.setLayerParams path)
state._params = { catalog: 'core', showPoints: true, showOrbits: true };
state._params = {
catalog: 'core',
showPoints: true,
showOrbits: true,
// Which satellite classes show (src/layers/satellites/classes.js). Starlink
// follows `catalog`: its points exist only in dense mode.
classes: { ...DEFAULT_SATELLITE_CLASSES },
};
// 'core' | 'dense'
/** SATCAT records (object type, status, owner) by NORAD id, last update. */
state._satcat = new Map();
/** The UCS pack by NORAD id, once loaded; null until then or if it failed. */
state._ucs = null;
/** The imaging-sensor index, once loaded; null until then or if it failed. */
state._sensors = null;
state._denseIds = [];
// norad ids of dense extras, round-robin order
@@ -152,6 +177,17 @@ export function createState({ services }) {
state._trackedFrameNowForTest = null;
// Cockpit orbital-view hold (cockpitSubject.js): the NORAD id the Cockpit
// camera rides, and what the hold hid so release restores exactly that.
state._cockpitSubjectNorad = null;
state._cockpitHiddenPoints = new Set();
state._cockpitHiddenPath = null;
state._cockpitHiddenDot = false;
/** The time satellites are propagated to, in epoch ms. */
state.now = worldTimeFor('satellites');