add first integration of direwolf for aprs

This commit is contained in:
Jakob Ketterl 2019-06-07 15:11:04 +02:00
parent 0c59caa230
commit f49086a527
6 changed files with 2348 additions and 4 deletions

14
csdr.py
View File

@ -117,6 +117,11 @@ class dsp(object):
elif which == "ysf":
chain += "ysf_decoder --fifo {meta_pipe} | mbe_synthesizer -y -f -u {unvoiced_quality} | "
chain += "digitalvoice_filter -f | csdr agc_ff 160000 0.8 1 0.0000001 0.0005 | csdr convert_f_s16 | sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - "
elif which == "packet":
chain += "csdr fmdemod_quadri_cf | "
chain += last_decimation_block
chain += "csdr convert_f_s16 | "
chain += "direwolf -r {audio_rate} - 1>&2"
elif which == "am":
chain += "csdr amdemod_cf | csdr fastdcblock_ff | "
chain += last_decimation_block
@ -285,7 +290,7 @@ class dsp(object):
return self.output_rate
def get_audio_rate(self):
if self.isDigitalVoice():
if self.isDigitalVoice() or self.isPacket():
return 48000
return self.get_output_rate()
@ -294,6 +299,11 @@ class dsp(object):
demodulator = self.get_demodulator()
return demodulator in ["dmr", "dstar", "nxdn", "ysf"]
def isPacket(self, demodulator = None):
if demodulator is None:
demodulator = self.get_demodulator()
return demodulator == "packet"
def set_output_rate(self,output_rate):
self.output_rate=output_rate
self.calculate_decimation()
@ -407,7 +417,7 @@ class dsp(object):
flowcontrol=int(self.samp_rate*2), start_bufsize=self.base_bufsize*self.decimation, nc_port=self.nc_port,
squelch_pipe=self.squelch_pipe, smeter_pipe=self.smeter_pipe, meta_pipe=self.meta_pipe, iqtee_pipe=self.iqtee_pipe, iqtee2_pipe=self.iqtee2_pipe,
output_rate = self.get_output_rate(), smeter_report_every = int(self.if_samp_rate()/6000),
unvoiced_quality = self.get_unvoiced_quality())
unvoiced_quality = self.get_unvoiced_quality(), audio_rate = self.get_audio_rate())
logger.debug("[openwebrx-dsp-plugin:csdr] Command = %s", command)
my_env=os.environ.copy()

View File

@ -102,6 +102,9 @@
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-ysf"
style="display:none;" data-feature="digital_voice_digiham"
onclick="demodulator_analog_replace('ysf');">YSF</div>
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-packet"
style="display:none;" data-feature="packet"
onclick="demodulator_analog_replace('packet');">Packet</div>
</div>
<div class="openwebrx-panel-line">
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-dig" onclick="demodulator_digital_replace_last();">DIG</div>

2322
htdocs/libmbe.js Normal file

File diff suppressed because it is too large Load Diff

BIN
htdocs/libmbe.wasm Normal file

Binary file not shown.

View File

@ -443,6 +443,11 @@ function demodulator_default_analog(offset_frequency,subtype)
{
this.low_cut=-3250;
this.high_cut=3250;
}
else if(subtype=="packet")
{
this.low_cut=-4000;
this.high_cut=4000;
}
else if(subtype=="am")
{

View File

@ -17,7 +17,8 @@ class FeatureDetector(object):
"sdrplay": [ "rx_tools" ],
"hackrf": [ "hackrf_transfer" ],
"digital_voice_digiham": [ "digiham", "sox" ],
"digital_voice_dsd": [ "dsd", "sox" ]
"digital_voice_dsd": [ "dsd", "sox" ],
"packet": [ "direwolf" ]
}
def feature_availability(self):
@ -102,3 +103,6 @@ class FeatureDetector(object):
def has_sox(self):
return self.command_is_runnable("sox")
def has_direwolf(self):
return self.command_is_runnable("direwolf --help")