From 9065438e56c00308041196ffe2c7a07b8f7e5915 Mon Sep 17 00:00:00 2001 From: derektgardner <51539315+derektgardner@users.noreply.github.com> Date: Tue, 8 Dec 2020 16:55:41 -0500 Subject: [PATCH] Update flightdata.py Added two lines at 204 and 205. I built on dump1090-fa and not piaware. OverPutney looks for "speed" in the aircraft.json file, which must be how piaware displays it. dump1090-fa uses "gs" (ground speed) instead of "speed". By adding this, both piaware and dump1090-fa users should be able to have the aircraft's speed displayed in the tweets created by OverPutney. --- flightdata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flightdata.py b/flightdata.py index e2945ae..e00b19a 100755 --- a/flightdata.py +++ b/flightdata.py @@ -201,6 +201,8 @@ def aircraft_data(self, json_data, time): speed = 0 if "speed" in a: speed = geomath.knot2mph(a["speed"]) + if "gs" in a: + speed = geomath.knot2mph(a["gs"]) if "mach" in a: speed = geomath.mach2mph(a["mach"])