kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Remove invert flag for dfm decoder, replace with --auto flag.
rodzic
7aff59344b
commit
70494086d4
|
|
@ -244,26 +244,14 @@ class SondeDecoder(object):
|
|||
|
||||
elif self.sonde_type == "DFM":
|
||||
# DFM06/DFM09 Sondes.
|
||||
|
||||
# We need to handle inversion of DFM sondes in a bit of an odd way.
|
||||
# Using our current receive chain (rtl_fm), rs_detect will detect:
|
||||
# DFM06's as non-inverted ('DFM')
|
||||
# DFM09's as inverted ('-DFM')
|
||||
# HOWEVER, dfm09dm_ecc makes the assumption that the incoming signal is a DFM09, and
|
||||
# inverts by default.
|
||||
# So, to be able to support DFM06s, we need to flip the invert flag.
|
||||
self.inverted = not self.inverted
|
||||
|
||||
if self.inverted:
|
||||
_invert_flag = "-i"
|
||||
else:
|
||||
_invert_flag = ""
|
||||
# As of 2019-02-10, dfm09ecc auto-detects if the signal is inverted,
|
||||
# so we don't need to specify an invert flag.
|
||||
|
||||
# Note: Have removed a 'highpass 20' filter from the sox line, will need to re-evaluate if adding that is useful in the future.
|
||||
decode_cmd = "%s %s-p %d -d %s %s-M fm -F9 -s 15k -f %d 2>/dev/null |" % (self.sdr_fm, bias_option, int(self.ppm), str(self.device_idx), gain_param, self.sonde_freq)
|
||||
decode_cmd += "sox -t raw -r 15k -e s -b 16 -c 1 - -r 48000 -b 8 -t wav - highpass 20 lowpass 2000 2>/dev/null |"
|
||||
# DFM decoder
|
||||
decode_cmd += "./dfm09ecc -vv --ecc --json %s 2>/dev/null" % _invert_flag
|
||||
decode_cmd += "./dfm09ecc -vv --ecc --json --auto 2>/dev/null"
|
||||
|
||||
elif self.sonde_type == "M10":
|
||||
# M10 Sondes
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue