Merge upstream main into PR #1435 for integration review

This commit is contained in:
Said Turksever committed 2026-11-03 14:50:23 +00:00
commit a6d20120a7
1364 files changed
+102726 -23267

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import {
epoch,
finite,
} from './contract.js';
import { readAdsbVerticalRateFpm } from '../adsbFields.js';
const openSkyId = (row) =>
Array.isArray(row) ? cleanText(row[0]).toLowerCase() : '';
@@ -50,7 +51,7 @@ export function normalizeReadsbAircraft(row, snapshotTimeMs) {
const baroFt = finite(row.alt_baro),
geoFt = finite(row.alt_geom);
const speedKts = finite(row.gs),
rateFtMin = finite(row.baro_rate);
rateFtMin = readAdsbVerticalRateFpm(row);
const seen = finite(row.seen),
seenPos = finite(row.seen_pos);
return {
+14
View File
@@ -166,6 +166,20 @@ test('readsb units and position/contact ages are normalized once against the sou
);
});
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.
const row = { hex: 'ae638d', lat: 20.3, lon: -158.5, geom_rate: -2432 };
assert.equal(
normalizeReadsbAircraft(row, now).verticalRateMps,
-2432 * 0.00508,
);
assert.equal(
normalizeReadsbAircraft({ ...row, baro_rate: -2400 }, now).verticalRateMps,
-2400 * 0.00508,
);
});
test('vessel identity, opaque reference and heading/course remain distinct, unknowns stay null', () => {
const row = normalizeVesselObservation(
{