diff --git a/auto_rx/autorx/decode.py b/auto_rx/autorx/decode.py index 882f320..c3625b3 100644 --- a/auto_rx/autorx/decode.py +++ b/auto_rx/autorx/decode.py @@ -531,7 +531,12 @@ class SondeDecoder(object): # This fsk_demod command *almost* works (using the updated fsk_demod) # rtl_fm -p 0 -d 0 -M raw -F9 -s 307712 -f 1676000000 2>/dev/null |~/Dev/codec2-upstream/build/src/fsk_demod --cs16 -p 32 --mask=100000 --stats=5 2 307712 9616 - - 2> stats.txt | python ./test/bit_to_samples.py 48080 9616 | sox -t raw -r 48080 -e unsigned-integer -b 8 -c 1 - -r 48080 -b 8 -t wav - 2>/dev/null| ./mk2a_lms1680 --json - decode_cmd = "%s %s-p %d -d %s %s-M raw -F9 -s 250k -f %d 2>/dev/null |" % ( + # Notes: + # - Have dropped the low-leakage FIR filter (-F9) to save a bit of CPU + # Have scaled back sample rate to 220 kHz to again save CPU. + # mk2mod runs at ~90% CPU on a RPi 3, with rtl_fm using ~50% of another core. + + decode_cmd = "%s %s-p %d -d %s %s-M raw -s 220k -f %d 2>/dev/null |" % ( self.sdr_fm, bias_option, int(self.ppm), @@ -545,7 +550,7 @@ class SondeDecoder(object): decode_cmd += " tee decode_IQ_%s.bin |" % str(self.device_idx) # LMS6-1680 decoder - decode_cmd += f"./mk2mod --iq 0.0 --lpIQ --lpbw 160 --lpFM --dc --crc --json {self.raw_file_option} - 250000 16 2>/dev/null" + decode_cmd += f"./mk2mod --iq 0.0 --lpIQ --lpbw 160 --lpFM --dc --crc --json {self.raw_file_option} - 220000 16 2>/dev/null" # Settings for old decoder, which cares about FM inversion. # if self.inverted: # self.log_debug("Using inverted MK2A decoder.") diff --git a/auto_rx/build.sh b/auto_rx/build.sh index f126eee..5779802 100755 --- a/auto_rx/build.sh +++ b/auto_rx/build.sh @@ -47,7 +47,7 @@ gcc mp3h1mod.c demod_mod.o -lm -O3 -o mp3h1mod -w $VERS_FLAG # Build LMS6-1680 Decoder echo "Building LMS6-1680 demod." cd ../../mk2a/ -gcc mk2a1680mod.c -O3 -lm -o mk2mod $VERS_FLAG +gcc mk2a1680mod.c -Ofast -lm -o mk2mod $VERS_FLAG echo "Building iMet-4 demod." cd ../imet/