From 7758ff6541e32c376d355705c4106cbe25a57cd9 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 8 Sep 2023 19:58:38 +0200 Subject: [PATCH 1/3] enable vdl2 as a service --- owrx/modes.py | 1 + owrx/service/__init__.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/owrx/modes.py b/owrx/modes.py index 5b995419..94c67744 100644 --- a/owrx/modes.py +++ b/owrx/modes.py @@ -197,6 +197,7 @@ class Modes(object): underlying=["empty"], bandpass=Bandpass(-12500, 12500), requirements=["dumpvdl2"], + service=True, squelch=False, ) ] diff --git a/owrx/service/__init__.py b/owrx/service/__init__.py index 2c86142b..9c20f5de 100644 --- a/owrx/service/__init__.py +++ b/owrx/service/__init__.py @@ -318,6 +318,9 @@ class ServiceHandler(SdrSourceEventClient): elif mod == "hfdl": from csdr.chain.dumphfdl import DumpHFDL return DumpHFDL() + elif mod == "vdl2": + from csdr.chain.dumpvdl2 import DumpVDL2 + return DumpVDL2() raise ValueError("unsupported service modulation: {}".format(mod)) From 8d9b7e2f3bd65d38250fe54679e860a2432b8b35 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 8 Sep 2023 19:58:53 +0200 Subject: [PATCH 2/3] strip leading periods from registration --- owrx/aeronautical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owrx/aeronautical.py b/owrx/aeronautical.py index a01feb47..3665ef13 100644 --- a/owrx/aeronautical.py +++ b/owrx/aeronautical.py @@ -49,7 +49,7 @@ class AcarsProcessor(JsonParser, metaclass=ABCMeta): if "flight" in acars: flight_id = acars["flight"] elif "reg" in acars: - flight_id = acars['reg'] + flight_id = acars['reg'].lstrip(".") else: return From d0c0d6fe5f2e9b3a9905e73ad36ae9eeec42e88f Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 8 Sep 2023 19:59:18 +0200 Subject: [PATCH 3/3] pass icao when available --- owrx/vdl2/dumpvdl2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owrx/vdl2/dumpvdl2.py b/owrx/vdl2/dumpvdl2.py index baebaa50..c01918ac 100644 --- a/owrx/vdl2/dumpvdl2.py +++ b/owrx/vdl2/dumpvdl2.py @@ -38,7 +38,7 @@ class VDL2MessageParser(AcarsProcessor): src = avlc["src"]["addr"] if avlc["frame_type"] == "I": if "acars" in avlc: - self.processAcars(avlc["acars"]) + self.processAcars(avlc["acars"], icao=src) elif "x25" in avlc: x25 = avlc["x25"] if "clnp" in x25: