From 1e842e4789b06991394574cdb16937d3c624488f Mon Sep 17 00:00:00 2001 From: junzis Date: Fri, 21 Jul 2017 15:53:50 +0200 Subject: [PATCH] add altitude difference function in adsb, fix bug. --- pyModeS/adsb.py | 39 +++++++++++++++++++++++++++++---------- pyModeS/ehs.py | 2 +- tests/test_adsb.py | 1 + tests/test_ehs.py | 2 +- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/pyModeS/adsb.py b/pyModeS/adsb.py index 3ac99b7..b2ddb19 100644 --- a/pyModeS/adsb.py +++ b/pyModeS/adsb.py @@ -492,7 +492,7 @@ def nic(msg): int: NIC number (from 0 to 11), -1 if not applicable """ if typecode(msg) < 9 or typecode(msg) > 18: - raise RuntimeError("%s: Not a airborne position message" % msg) + raise RuntimeError("%s: Not a airborne position message, expecting 8 8: - raise RuntimeError("%s: Not a surface message" % msg) + raise RuntimeError("%s: Not a surface message, expecting 5