From 66382eb50fded8738320588db31574b99dd3810d Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 15 Aug 2019 20:28:24 +0200 Subject: [PATCH] add symbol information --- owrx/aprs.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/owrx/aprs.py b/owrx/aprs.py index 13adb4a..26ffc7a 100644 --- a/owrx/aprs.py +++ b/owrx/aprs.py @@ -79,12 +79,13 @@ class AprsParser(object): lon = int(raw[9:12]) + float(raw[12:17]) / 60 if raw[17] == "W": lon *= -1 - return {"lat": lat, "lon": lon, "symbol": raw[18]} + return {"lat": lat, "lon": lon, "symboltable": raw[8], "symbol": raw[18]} def parseCompressedCoordinates(self, raw): return { "lat": 90 - decodeBase91(raw[1:5]) / 380926, "lon": -180 + decodeBase91(raw[5:9]) / 190463, + "symboltable": raw[0], "symbol": raw[9], } @@ -228,4 +229,13 @@ class MicEParser(object): (comment, insideAltitude) = self.extractAltitude(comment) altitude = next((a for a in [altitude, insideAltitude] if a is not None), None) - return {"lat": lat, "lon": lon, "comment": comment, "altitude": altitude, "device": device, "type": "Mic-E"} + return { + "lat": lat, + "lon": lon, + "comment": comment, + "altitude": altitude, + "device": device, + "type": "Mic-E", + "symboltable": chr(information[8]), + "symbol": chr(information[7]), + }