fix(local-adsb): show a decoder feed's GNSS-sourced vertical rate

dump1090-fa and readsb file an aircraft's vertical rate under geom_rate
instead of baro_rate when its source is GNSS. The decoder-feed adapter
read only baro_rate, so those aircraft showed "V/S —" on the Local ADS-B
card. It now falls back to geom_rate; a sent baro_rate still wins.
This commit is contained in:
Aditya committed 2026-10-28 15:18:37 +05:30
1 parent a4d3701c3c
commit c7377362a5
3 files changed
+20 -2

No files matched your search

+14
View File
@@ -169,6 +169,20 @@ test('a feed document names its band on every record', () => {
assert.ok(uat.every((record) => record.source === 'feed'));
});
test('a decoder feed reads a GNSS-sourced vertical rate when no baro rate is sent', () => {
// dump1090-fa and readsb file a velocity message's rate under geom_rate
// instead of baro_rate when its source bit says GNSS.
const rate = (fields) =>
normalizeDump1090Aircraft(
{ aircraft: [{ hex: 'abc123', seen: 1, ...fields }] },
10_000,
)[0].verticalRateFpm;
assert.equal(rate({ geom_rate: -832 }), -832);
assert.equal(rate({ baro_rate: -768, geom_rate: -832 }), -768);
assert.equal(rate({ baro_rate: 0, geom_rate: -832 }), 0);
assert.equal(rate({}), null);
});
function heard(overrides = {}) {
return {
icao: 'abc123',