make history work with mutability (hopefully)

This commit is contained in:
Matthias Wirth
2019-12-26 23:23:38 +01:00
parent 94c18658f5
commit ef38709dac

View File

@@ -76,7 +76,7 @@ prune() {
jq -c <"$1" >"$2" '
.aircraft |= map(select(has("seen") and .seen < 15))
| .aircraft[] |= [.hex,
(if .alt_baro != null then .alt_baro else .alt_geom end),
(if .alt_baro != null then .alt_baro elif .altitude != null then .altitude else .alt_geom end),
(if .gs != null then .gs else .tas end),
.track, .lat, .lon, .seen_pos,
(if .mlat != null and (.mlat | contains(["lat"])) then "mlat"