mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-17 14:10:04 +01:00
basic parsing of acars messages
This commit is contained in:
parent
4bce1024ba
commit
65efc0fa75
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue