diff --git a/auto_rx/autorx/__init__.py b/auto_rx/autorx/__init__.py index e0fab7f..6cc9776 100644 --- a/auto_rx/autorx/__init__.py +++ b/auto_rx/autorx/__init__.py @@ -12,7 +12,7 @@ from queue import Queue # MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus. # PATCH - Small changes, or minor feature additions. -__version__ = "1.7.3" +__version__ = "1.7.4-beta1" # Global Variables diff --git a/auto_rx/autorx/decode.py b/auto_rx/autorx/decode.py index 6f57717..19f5095 100644 --- a/auto_rx/autorx/decode.py +++ b/auto_rx/autorx/decode.py @@ -977,7 +977,8 @@ class SondeDecoder(object): if self.save_decode_iq: demod_cmd += f" tee {self.save_decode_iq_path} |" - demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --stats=%d 2 %d %d - -" % ( + # NOTE - Using inverted soft decision outputs, so DFM type detection works correctly. + demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s -i --stats=%d 2 %d %d - -" % ( _lower, _upper, _stats_rate, diff --git a/utils/fsk_demod.c b/utils/fsk_demod.c index ecd5742..8b1adee 100644 --- a/utils/fsk_demod.c +++ b/utils/fsk_demod.c @@ -77,12 +77,14 @@ int main(int argc,char *argv[]){ int nsym = FSK_DEFAULT_NSYM; int mask = 0; int tx_tone_separation = 100; + int softinv = 0; int o = 0; int opt_idx = 0; while( o != -1 ){ static struct option long_opts[] = { {"help", no_argument, 0, 'h'}, + {"softinv", no_argument, 0, 'i'}, {"conv", required_argument, 0, 'p'}, {"cs16", no_argument, 0, 'c'}, {"cu8", no_argument, 0, 'd'}, @@ -96,7 +98,7 @@ int main(int argc,char *argv[]){ {0, 0, 0, 0} }; - o = getopt_long(argc,argv,"fhlp:cdt::sb:u:m",long_opts,&opt_idx); + o = getopt_long(argc,argv,"fhilp:cdt::sb:u:m",long_opts,&opt_idx); switch(o){ case 'c': @@ -110,6 +112,9 @@ int main(int argc,char *argv[]){ case 'f': testframe_mode = 1; break; + case 'i': + softinv = 1; + break; case 't': enable_stats = 1; if(optarg != NULL){ @@ -415,6 +420,13 @@ int main(int argc,char *argv[]){ } if(soft_dec_mode){ + // Invert soft decision polarity. + if(softinv){ + for(j=0; jNbits; j++) { + sdbuf[j] = sdbuf[j]*-1.0; + } + } + fwrite(sdbuf,sizeof(float),fsk->Nbits,fout); }else{ fwrite(bitbuf,sizeof(uint8_t),fsk->Nbits,fout);