basic parsing of acars messages

This commit is contained in:
Jakob Ketterl 2023-09-21 20:50:12 +02:00
parent 4bce1024ba
commit 65efc0fa75
2 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,5 @@
from pycsdr.modules import AmDemod
from owrx.acars.acarsdec import AcarsDecModule
from owrx.acars.acarsdec import AcarsDecModule, AcarsParser
from csdr.chain.demodulator import ServiceDemodulator
from csdr.module import JsonParser
@ -9,8 +9,11 @@ class AcarsDec(ServiceDemodulator):
super().__init__([
AmDemod(),
AcarsDecModule(),
JsonParser("ACARS"),
AcarsParser(),
])
def getFixedAudioRate(self) -> int:
return 12500
def supportsSquelch(self) -> bool:
return False

View file

@ -1,5 +1,6 @@
from pycsdr.modules import ExecModule
from pycsdr.types import Format
from owrx.aeronautical import AcarsProcessor
class AcarsDecModule(ExecModule):
@ -9,3 +10,14 @@ class AcarsDecModule(ExecModule):
Format.CHAR,
["acarsdec", "-s", "-o", "4"]
)
class AcarsParser(AcarsProcessor):
def __init__(self):
super().__init__("ACARS")
def process(self, line):
msg = super().process(line)
if msg is not None:
if "libacars" in msg:
self.processAcars(msg)