From d91ad261cdb159d4f20481ac0e222d432a86f0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huy=20V=C3=BB?= Date: Fri, 16 Mar 2018 11:22:10 +0100 Subject: [PATCH] Too rough rounding track/heading angles Due to resolution of 0.175 degrees, rounding difference up to 0.05 degrees can occur. --- pyModeS/decoder/ehs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyModeS/decoder/ehs.py b/pyModeS/decoder/ehs.py index 7804347..28063f8 100644 --- a/pyModeS/decoder/ehs.py +++ b/pyModeS/decoder/ehs.py @@ -585,7 +585,7 @@ def trk50(msg): if trk < 0: trk = 360 + trk - return round(trk, 1) + return round(trk, 2) def gs50(msg): @@ -726,7 +726,7 @@ def hdg53(msg): if hdg < 0: hdg = 360 + hdg - return round(hdg, 1) + return round(hdg, 2) def ias53(msg): @@ -882,7 +882,7 @@ def hdg60(msg): if hdg < 0: hdg = 360 + hdg - return round(hdg, 1) + return round(hdg, 2) def ias60(msg):