Merge origin/main into the renderer seam

Brings in main up to f24abfc88: cockpit subject providers, the render
failure notice, aircraft drawn in their own mesh colours, airport ground
vehicles, and an aircraft with no ground track facing its true heading.

Under the seam:
- The render failure notice lives in the Cesium adapter
  (src/render/cesium/renderFailure.js) and is the application hook
  renderFailureNotice({allowReload, store}); its private Cesium fields
  (Event's raise queue, the widget's render loop flag) are read through
  internals.js. The inline panel's timer waits while the frame port reports
  the loop stopped, and goes on after a Retry.
- Ordinary aircraft models draw white with the 'highlight' colour blend
  through the draw port; tracked and emergency colours tint the mesh.
- Held trains and transit vehicles hide their route set and markers through
  the draw port; the fleet model test fakes answer loads through the fake
  draw port instead of Cesium's glTF loader.
- The Cockpit's subject view follows and places the camera through the
  camera port.
This commit is contained in:
Sameh Khamis committed 2026-11-14 09:59:55 -08:00
commit 866a9816f2
142 files changed
+9067 -308

No files matched your search

+2 -1
View File
@@ -248,7 +248,8 @@ export function normalizeDump1090Aircraft(json, nowMs, { band = '1090' } = {}) {
lon: hasPosition ? position.lon : null,
altitudeFt: altitude,
groundSpeedKt: finiteOrNull(entry.gs),
trackDeg: normalizeTrack(entry.track),
// No track (parked, slow): the true heading, where the nose points.
trackDeg: normalizeTrack(entry.track ?? entry.true_heading),
verticalRateFpm: readAdsbVerticalRateFpm(entry),
lastPositionAt: hasPosition
? receivedAt - Math.max(0, seenPosS) * 1000
+28
View File
@@ -68,6 +68,34 @@ test('dump1090 aircraft.json maps to the shared local ADS-B records', () => {
assert.deepEqual(summary, { heard: 4, positioned: 2 });
});
test('a dump1090 aircraft with no track takes its true heading, never its magnetic one', () => {
const trackOf = (extra) =>
normalizeDump1090Aircraft(
{
now: 1,
aircraft: [
{
hex: 'a4418c',
lat: 37.6,
lon: -122.38,
alt_baro: 'ground',
seen: 1,
...extra,
},
],
},
1000,
)[0].trackDeg;
assert.equal(
trackOf({ track: 56.25, true_heading: 40 }),
56.25,
'track first',
);
assert.equal(trackOf({ true_heading: 185.62 }), 185.62, 'true heading');
assert.equal(trackOf({ mag_heading: 278.44 }), null, 'not magnetic');
assert.equal(trackOf({}), null, 'none');
});
test('dump1090 adapter skips invalid addresses and tolerates missing fields', () => {
const records = normalizeDump1090Aircraft(
{
+16
View File
@@ -168,6 +168,22 @@ test('readsb units and position/contact ages are normalized once against the sou
);
});
test('a readsb aircraft with no track takes its true heading, never its magnetic one', () => {
const course = (extra) =>
normalizeReadsbAircraft(
{ hex: 'a4418c', lat: 37.6, lon: -122.38, alt_baro: 'ground', ...extra },
now,
).courseDeg;
assert.equal(
course({ track: 56.25, true_heading: 40 }),
56.25,
'track first',
);
assert.equal(course({ true_heading: 185.62 }), 185.62, 'true heading');
assert.equal(course({ mag_heading: 278.44 }), null, 'not magnetic');
assert.equal(course({}), null, 'none');
});
test('readsb vertical rate falls back to the GNSS rate when no baro rate is sent', () => {
// readsb reports the rate under geom_rate when the aircraft's source is
// GNSS; 26 of 157 positioned rows in a live /v2/mil fetch had only that.