Update test_demod for new fsk demodulator options.

pull/185/head
Mark Jessop 2019-05-25 21:42:25 +09:30
rodzic bf619780b6
commit c6d41ef7b4
2 zmienionych plików z 30 dodań i 29 usunięć

Wyświetl plik

@ -215,10 +215,11 @@ ozi_enabled = False
# Set to 8942 to send packets directly into OziPlotter, or set to 55681 to send via OziMux
ozi_port = 8942
# Payload summary UDP output, which is the preferred input if using ChaseMapper
# Payload summary UDP output, which is the preferred input if using ChaseMapper.
# Using this output allows multiple sondes to be plotted in Chasemapper.
payload_summary_enabled = False
payload_summary_port = 55672
# As of 2019-05, this is enabled by default.
payload_summary_enabled = True
payload_summary_port = 55673

Wyświetl plik

@ -120,9 +120,9 @@ processing_type = {
'demod' : "| csdr shift_addition_cc 0.25 2>/dev/null | csdr convert_f_s16 | ../fsk_demod --cs16 -b 1 -u 45000 --stats=100 2 96000 4800 - - 2>stats.txt |",
# Decode using rs41ecc
'decode': "../rs41mod --ecc --ptu --crc --bin 2>/dev/null",
'decode': "../rs41mod --ecc --ptu --crc --bin --json 2>/dev/null",
# Count the number of telemetry lines.
"post_process" : " | grep 00000 | wc -l",
"post_process" : " | grep frame | wc -l",
'files' : "./generated/rs41*"
},
# # RS92 Decoding
@ -183,34 +183,34 @@ _sample_fs = 96000.0 # Sample rate of input. Always 96k at the moment.
# # RS41
# _fm_rate = 15000
# # Calculate the necessary conversions
# _rtlfm_oversampling = 8.0 # Viproz's hacked rtl_fm oversamples by 8x.
# _shift = -2.0*_fm_rate/_sample_fs # rtl_fm tunes 'up' by rate*2, so we need to shift the signal down by this amount.
_fm_rate = 15000
# Calculate the necessary conversions
_rtlfm_oversampling = 8.0 # Viproz's hacked rtl_fm oversamples by 8x.
_shift = -2.0*_fm_rate/_sample_fs # rtl_fm tunes 'up' by rate*2, so we need to shift the signal down by this amount.
# _resample = (_fm_rate*_rtlfm_oversampling)/_sample_fs
_resample = (_fm_rate*_rtlfm_oversampling)/_sample_fs
# if _resample != 1.0:
# # We will need to resample.
# _resample_command = "csdr convert_f_s16 | ./tsrc - - %.4f | csdr convert_s16_f |" % _resample
# _shift = (-2.0*_fm_rate)/(_sample_fs*_resample)
# else:
# _resample_command = ""
if _resample != 1.0:
# We will need to resample.
_resample_command = "csdr convert_f_s16 | ./tsrc - - %.4f | csdr convert_s16_f |" % _resample
_shift = (-2.0*_fm_rate)/(_sample_fs*_resample)
else:
_resample_command = ""
# _demod_command = "| %s csdr shift_addition_cc %.5f 2>/dev/null | csdr convert_f_u8 |" % (_resample_command, _shift)
# _demod_command += " ./rtl_fm_stdin -M fm -f 401000000 -F9 -s %d 2>/dev/null|" % (int(_fm_rate))
# _demod_command += " sox -t raw -r %d -e s -b 16 -c 1 - -r 48000 -b 8 -t wav - highpass 20 lowpass 2600 2>/dev/null |" % int(_fm_rate)
_demod_command = "| %s csdr shift_addition_cc %.5f 2>/dev/null | csdr convert_f_u8 |" % (_resample_command, _shift)
_demod_command += " ./rtl_fm_stdin -M fm -f 401000000 -F9 -s %d 2>/dev/null|" % (int(_fm_rate))
_demod_command += " sox -t raw -r %d -e s -b 16 -c 1 - -r 48000 -b 8 -t wav - highpass 20 lowpass 2600 2>/dev/null |" % int(_fm_rate)
# processing_type['rs41_rtlfm'] = {
# # Shift signal to -30 kHz, resample to 120 kHz, (8x 15 khz output rate), then convert to u8 before passing into rtl_fm_stdin.
# # Currently using a timeout to kill rtl_fm as it doesnt notice the end of the incoming samples.
# 'demod': _demod_command,
# # Decode using rs41ecc
# 'decode': "../rs41mod --ptu --crc --ecc2 2>/dev/null",
# # Count the number of telemetry lines.
# "post_process" : " | grep 00000 | wc -l",
# 'files' : "./generated/rs41*.bin"
# }
processing_type['rs41_rtlfm'] = {
# Shift signal to -30 kHz, resample to 120 kHz, (8x 15 khz output rate), then convert to u8 before passing into rtl_fm_stdin.
# Currently using a timeout to kill rtl_fm as it doesnt notice the end of the incoming samples.
'demod': _demod_command,
# Decode using rs41ecc
'decode': "../rs41mod --ptu --crc --ecc2 --json 2>/dev/null",
# Count the number of telemetry lines.
"post_process" : " | grep frame | wc -l",
'files' : "./generated/rs41*.bin"
}
# # RS92