Keep the satellites layer's Cesium objects in its rendering part

The point collection and its dots, the baked orbit rings, the tracked
entity, the frame number, the focus publish and the pick decoding now
live in rendering.js, behind small helpers that take ECEF positions and
render-contract colours. The catalog, controls, ingestion, lifecycle,
orbits, policy, records, state, testing and tracking parts no longer
import Cesium or touch the viewer, scene or primitives, and leave the
allow-list. Point styles are [r, g, b, a] colours, converted once per
style; geodetic conversions use the geo helpers; the per-frame tick runs
through the frame port. What the layer draws and how it follows is
unchanged.
This commit is contained in:
Sameh Khamis committed 2026-11-07 03:53:05 -08:00
1 parent d928c30337
commit 4fd1a850f1
19 files changed
+646 -281

No files matched your search

+21 -8
View File
@@ -18,14 +18,15 @@ function tleSet(name, field) {
].join('\n');
}
// Orbit tracks hand their path to the renderer; positions pass through here.
const orbitParts = {
rendering: { _rendererPositions: (positions) => positions },
};
function ingestionFor(catalogText) {
const state = {
_trackingRefreshEpoch: 0,
_activeUpdateControllers: new Set(),
_pointCollection: {
removeAll() {},
add: (point) => point,
},
_points: new Map(),
_orbitPaths: new Map(),
_catalog: new Map(),
@@ -41,7 +42,19 @@ function ingestionFor(catalogText) {
},
labels: { _syncIssOverlay() {} },
controls: { _pointStyleFor: () => ({}) },
rendering: { _showOrbitPath() {} },
rendering: {
_clearPoints() {
state._points.clear();
},
_clearOrbitPaths() {
state._orbitPaths.clear();
},
_addPoint(noradId, position) {
state._points.set(noradId, { position });
},
_showOrbitPath() {},
_setOrbitPathShown() {},
},
tracking: {
async _reconcileTrackedSubjectContext() {},
_applyPendingTrackingRestore() {},
@@ -54,7 +67,7 @@ function ingestionFor(catalogText) {
},
};
const { methods } = createIngestion({ state, services: {}, parts, source });
return { state, update: () => methods.update({ scene: {} }) };
return { state, update: () => methods.update({}) };
}
test('every Alpha-5 satellite keeps its own catalog entry through dedupe', async (t) => {
@@ -92,7 +105,7 @@ test('a mission payload does not match a loaded satellite from another launch ye
].join('\n'),
);
await update();
const { getSatelliteOrbitTrack } = createOrbits({ state });
const { getSatelliteOrbitTrack } = createOrbits({ state, parts: orbitParts });
const track = (launchTime) =>
getSatelliteOrbitTrack('Sirius SXM-11', { launchTime });
assert.equal(track('2026-06-29T02:25:00Z')?.noradId, 69728);
@@ -110,7 +123,7 @@ test('a satellite with a blank designator keeps matching by name', async (t) =>
].join('\n'),
);
await update();
const { getSatelliteOrbitTrack } = createOrbits({ state });
const { getSatelliteOrbitTrack } = createOrbits({ state, parts: orbitParts });
assert.equal(tleLineLaunchYear('1 69728U 26208.65166678'), null);
assert.equal(
getSatelliteOrbitTrack('Sirius SXM-11', {