add symbol information
This commit is contained in:
parent
21591ad6b8
commit
66382eb50f
14
owrx/aprs.py
14
owrx/aprs.py
@ -79,12 +79,13 @@ class AprsParser(object):
|
|||||||
lon = int(raw[9:12]) + float(raw[12:17]) / 60
|
lon = int(raw[9:12]) + float(raw[12:17]) / 60
|
||||||
if raw[17] == "W":
|
if raw[17] == "W":
|
||||||
lon *= -1
|
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):
|
def parseCompressedCoordinates(self, raw):
|
||||||
return {
|
return {
|
||||||
"lat": 90 - decodeBase91(raw[1:5]) / 380926,
|
"lat": 90 - decodeBase91(raw[1:5]) / 380926,
|
||||||
"lon": -180 + decodeBase91(raw[5:9]) / 190463,
|
"lon": -180 + decodeBase91(raw[5:9]) / 190463,
|
||||||
|
"symboltable": raw[0],
|
||||||
"symbol": raw[9],
|
"symbol": raw[9],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,4 +229,13 @@ class MicEParser(object):
|
|||||||
(comment, insideAltitude) = self.extractAltitude(comment)
|
(comment, insideAltitude) = self.extractAltitude(comment)
|
||||||
altitude = next((a for a in [altitude, insideAltitude] if a is not None), None)
|
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]),
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user