diff --git a/auto_rx/station.cfg.example b/auto_rx/station.cfg.example index 904da81..c836429 100644 --- a/auto_rx/station.cfg.example +++ b/auto_rx/station.cfg.example @@ -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 diff --git a/auto_rx/test/test_demod.py b/auto_rx/test/test_demod.py index 9bed4f2..86e5552 100644 --- a/auto_rx/test/test_demod.py +++ b/auto_rx/test/test_demod.py @@ -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