Fixing minor stuff, VDL2 chain now wants 1050000 IQ stream.
This commit is contained in:
parent
9c8438aded
commit
af750faaa8
|
|
@ -1,4 +1,4 @@
|
|||
from csdr.chain.demodulator import ServiceDemodulator, DialFrequencyReceiver
|
||||
from csdr.chain.demodulator import ServiceDemodulator, DialFrequencyReceiver, FixedIfSampleRateChain
|
||||
from csdr.module.toolbox import Rtl433Module, MultimonModule, DumpHfdlModule, DumpVdl2Module
|
||||
from pycsdr.modules import FmDemod, AudioResampler, Convert, Agc, Squelch
|
||||
from pycsdr.types import Format
|
||||
|
|
@ -121,9 +121,9 @@ class HfdlDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class Vdl2Demodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
class Vdl2Demodulator(ServiceDemodulator, FixedIfSampleRateChain, DialFrequencyReceiver):
|
||||
def __init__(self, service: bool = False):
|
||||
self.sampleRate = 210000
|
||||
self.sampleRate = 1050000
|
||||
#self.parser = Vdl2Parser(service=service)
|
||||
workers = [
|
||||
Agc(Format.COMPLEX_FLOAT),
|
||||
|
|
@ -133,9 +133,13 @@ class Vdl2Demodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||
# Connect all the workers
|
||||
super().__init__(workers)
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
def getFixedIfSampleRate(self) -> int:
|
||||
return self.sampleRate
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
# This is not really used
|
||||
return 8000
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class DumpHfdlModule(PopenModule):
|
|||
|
||||
|
||||
class DumpVdl2Module(PopenModule):
|
||||
def __init__(self, sampleRate: int = 210000, jsonOutput: bool = False):
|
||||
def __init__(self, sampleRate: int = 1050000, jsonOutput: bool = False):
|
||||
self.sampleRate = sampleRate
|
||||
self.jsonOutput = jsonOutput
|
||||
super().__init__()
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class FeatureDetector(object):
|
|||
"selcall": ["multimon"],
|
||||
"ism": ["rtl433"],
|
||||
"hfdl": ["dumphfdl"],
|
||||
"vdl2": ["dumpvdl2"],
|
||||
"js8call": ["js8", "js8py"],
|
||||
"drm": ["dream"],
|
||||
"png": ["imagemagick"],
|
||||
|
|
@ -605,3 +606,11 @@ class FeatureDetector(object):
|
|||
"""
|
||||
return self.command_is_runnable("dumphfdl --help")
|
||||
|
||||
def has_dumpvdl2(self):
|
||||
"""
|
||||
OpenWebRX uses the [dumphfdl](https://github.com/szpajder/dumpvdl2) tool to decode VDL2
|
||||
aircraft communications. Dumpvdl2 is not yet available as a package and thus you will have
|
||||
to compile it from source.
|
||||
"""
|
||||
return self.command_is_runnable("dumpvdl2 --help")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue