Added MQTT reporting to APRS, AIS, HFDL, VDL2, ACARS, DSC.

This commit is contained in:
Marat Fayzullin 2024-04-11 23:52:59 -04:00
parent 7d9b8523e9
commit 0218306f97
4 changed files with 13 additions and 9 deletions

View File

@ -2,6 +2,7 @@
- Refactored and greatly improved CW decoder.
- Added NAVTEX decoder and background service.
- Added LW/MW band and NAVTEX frequencies to the bandplan.
- Added MQTT reports for APRS, AIS, HFDL, VDL2, ACARS, DSC.
- [jketterl] Added MQTT reporting.
- [jketterl] Improved PlutoSDR source.

1
debian/changelog vendored
View File

@ -3,6 +3,7 @@ openwebrx (1.2.55) bullseye jammy; urgency=low
* Refactored and greatly improved CW decoder.
* Added NAVTEX decoder and background service.
* Added LW/MW band and NAVTEX frequencies to the bandplan.
* Added MQTT reports for APRS, AIS, HFDL, VDL2, ACARS, DSC.
* [jketterl] Added MQTT reporting.
* [jketterl] Improved PlutoSDR source.

View File

@ -3,6 +3,7 @@ from owrx.color import ColorCache
from owrx.map import Map, LatLngLocation
from owrx.aprs import getSymbolData
from owrx.config import Config
from owrx.reporting import ReportingEngine
from datetime import datetime, timedelta
import threading
import pickle
@ -323,6 +324,8 @@ class AircraftParser(TextParser):
for key in ["aircraft", "origin", "destination"]:
if key in out:
out[key] = self.reDots.sub("\\1", out[key])
# Report message
ReportingEngine.getSharedInstance().spot(out)
# Update aircraft database with the new data
AircraftManager.getSharedInstance().update(out)
# Do not return anything when in service mode

View File

@ -1,6 +1,7 @@
from owrx.toolbox import TextParser
from owrx.color import ColorCache
from owrx.config import Config
from owrx.reporting import ReportingEngine
import json
import logging
@ -22,24 +23,22 @@ class DscParser(TextParser):
super().__init__(filePrefix="DSC", service=service)
def parse(self, msg: bytes):
# Do not parse in service mode
#if self.service:
# return None
# Expect JSON data in text form
out = json.loads(msg)
# Filter out errors
pm = Config.get()
if "data" in out and not pm["dsc_show_errors"]:
return {}
# Add frequency
# Add mode and frequency
out["mode"] = "DSC"
if self.frequency != 0:
out["frequency"] = self.frequency
# When in interactive mode, add mode name and color to identify sender
if not self.service:
out["mode"] = "DSC"
if "src" in out:
out["color"] = self.colors.getColor(out["src"])
# Report message
ReportingEngine.getSharedInstance().spot(out)
# Log received messages for debugging
logger.debug("{0}".format(out))
# When in interactive mode, add color to identify sender
if not self.service and "src" in out:
out["color"] = self.colors.getColor(out["src"])
# Done
return out