mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(military): read a GNSS-sourced vertical rate when no baro rate is sent
readsb reports an aircraft's vertical rate as geom_rate instead of baro_rate when its source is GNSS. The military normaliser read only baro_rate, so about one in six live /v2/mil contacts had a null vertical rate in analyst and tracked-aircraft data. Fall back to geom_rate, as the adsb.lol flights fallback already does; a sent baro_rate still wins.
This commit is contained in:
1 parent
15de9d738c
commit
4f7b1bc015
3 files changed
+18
-2
No files matched your search
@@ -48,7 +48,8 @@ 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);
|
||||
// readsb sends a GNSS-sourced rate as geom_rate instead of baro_rate.
|
||||
rateFtMin = finite(row.baro_rate) ?? finite(row.geom_rate);
|
||||
const seen = finite(row.seen),
|
||||
seenPos = finite(row.seen_pos);
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user