mirror of
https://github.com/jketterl/openwebrx.git
synced 2025-12-06 07:12:09 +01:00
tap into more modes
This commit is contained in:
parent
80319475c8
commit
c1b32990d9
|
|
@ -1,5 +1,4 @@
|
||||||
from csdr.module import JsonParser
|
from owrx.ism.rtl433 import Rtl433Module, IsmParser
|
||||||
from owrx.ism.rtl433 import Rtl433Module
|
|
||||||
from csdr.chain.demodulator import ServiceDemodulator
|
from csdr.chain.demodulator import ServiceDemodulator
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11,7 +10,7 @@ class Rtl433(ServiceDemodulator):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
[
|
[
|
||||||
Rtl433Module(),
|
Rtl433Module(),
|
||||||
JsonParser("ISM"),
|
IsmParser(),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ from math import sqrt, atan2, pi, floor, acos, cos
|
||||||
from owrx.map import IncrementalUpdate, Location, Map, Source
|
from owrx.map import IncrementalUpdate, Location, Map, Source
|
||||||
from owrx.metrics import Metrics, CounterMetric
|
from owrx.metrics import Metrics, CounterMetric
|
||||||
from owrx.aeronautical import AirplaneLocation, IcaoSource
|
from owrx.aeronautical import AirplaneLocation, IcaoSource
|
||||||
|
from owrx.reporting import ReportingEngine
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
@ -276,6 +277,7 @@ class ModeSParser(PickleModule):
|
||||||
data = {k: message[k] for k in AdsbLocation.mapKeys if k in message}
|
data = {k: message[k] for k in AdsbLocation.mapKeys if k in message}
|
||||||
loc = AdsbLocation(data)
|
loc = AdsbLocation(data)
|
||||||
Map.getSharedInstance().updateLocation(IcaoSource(message['icao']), loc, "ADS-B", None)
|
Map.getSharedInstance().updateLocation(IcaoSource(message['icao']), loc, "ADS-B", None)
|
||||||
|
ReportingEngine.getSharedInstance().spot(message)
|
||||||
|
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
from owrx.map import Map, LatLngLocation, Source
|
from owrx.map import Map, LatLngLocation, Source
|
||||||
from owrx.metrics import Metrics, CounterMetric
|
from owrx.metrics import Metrics, CounterMetric
|
||||||
from owrx.bands import Bandplan
|
from owrx.bands import Bandplan
|
||||||
|
from owrx.reporting import ReportingEngine
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from csdr.module import PickleModule
|
from csdr.module import PickleModule
|
||||||
import re
|
import re
|
||||||
|
|
@ -211,8 +212,10 @@ class AprsParser(PickleModule):
|
||||||
if self.isDirect(aprsData):
|
if self.isDirect(aprsData):
|
||||||
self.getMetric("direct").inc()
|
self.getMetric("direct").inc()
|
||||||
|
|
||||||
# the frontend uses this to distinguis hessages from the different parsers
|
# the frontend uses this to distinguish messages from the different parsers
|
||||||
aprsData["mode"] = "APRS"
|
aprsData["mode"] = "APRS"
|
||||||
|
|
||||||
|
ReportingEngine.getSharedInstance().spot(aprsData)
|
||||||
return aprsData
|
return aprsData
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("exception while parsing aprs data")
|
logger.exception("exception while parsing aprs data")
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ from pycsdr.types import Format
|
||||||
from owrx.aeronautical import AirplaneLocation, AcarsProcessor, IcaoSource, FlightSource
|
from owrx.aeronautical import AirplaneLocation, AcarsProcessor, IcaoSource, FlightSource
|
||||||
from owrx.map import Map
|
from owrx.map import Map
|
||||||
from owrx.metrics import Metrics, CounterMetric
|
from owrx.metrics import Metrics, CounterMetric
|
||||||
|
from owrx.reporting import ReportingEngine
|
||||||
from datetime import datetime, timezone, timedelta
|
from datetime import datetime, timezone, timedelta
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -62,6 +63,7 @@ class HFDLMessageParser(AcarsProcessor):
|
||||||
|
|
||||||
self.metrics.inc()
|
self.metrics.inc()
|
||||||
|
|
||||||
|
ReportingEngine.getSharedInstance().spot(msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
def processPosition(self, hfnpdu, icao=None):
|
def processPosition(self, hfnpdu, icao=None):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
from pycsdr.modules import ExecModule
|
from pycsdr.modules import ExecModule
|
||||||
from pycsdr.types import Format
|
from pycsdr.types import Format
|
||||||
|
from csdr.module import JsonParser
|
||||||
|
from owrx.reporting import ReportingEngine
|
||||||
|
|
||||||
|
|
||||||
class Rtl433Module(ExecModule):
|
class Rtl433Module(ExecModule):
|
||||||
|
|
@ -9,3 +11,13 @@ class Rtl433Module(ExecModule):
|
||||||
Format.CHAR,
|
Format.CHAR,
|
||||||
["rtl_433", "-r", "cf32:-", "-F", "json", "-M", "time:unix", "-C", "si", "-s", "1200000"]
|
["rtl_433", "-r", "cf32:-", "-F", "json", "-M", "time:unix", "-C", "si", "-s", "1200000"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class IsmParser(JsonParser):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__("ISM")
|
||||||
|
|
||||||
|
def process(self, line):
|
||||||
|
data = super().process(line)
|
||||||
|
ReportingEngine.getSharedInstance().spot(data)
|
||||||
|
return data
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ from owrx.aeronautical import AcarsProcessor
|
||||||
from owrx.map import Map
|
from owrx.map import Map
|
||||||
from owrx.aeronautical import AirplaneLocation, IcaoSource
|
from owrx.aeronautical import AirplaneLocation, IcaoSource
|
||||||
from owrx.metrics import Metrics, CounterMetric
|
from owrx.metrics import Metrics, CounterMetric
|
||||||
|
from owrx.reporting import ReportingEngine
|
||||||
from datetime import datetime, date, time, timezone
|
from datetime import datetime, date, time, timezone
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -66,6 +67,7 @@ class VDL2MessageParser(AcarsProcessor):
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("error processing VDL2 data")
|
logger.exception("error processing VDL2 data")
|
||||||
self.metrics.inc()
|
self.metrics.inc()
|
||||||
|
ReportingEngine.getSharedInstance().spot(msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
def processReport(self, report, icao):
|
def processReport(self, report, icao):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue