diff --git a/apps/fft-multi-decoder_auto_freqs_slider-update.grc b/apps/fft-multi-decoder_auto_freqs_slider-update.grc index 285974c..675a38c 100644 --- a/apps/fft-multi-decoder_auto_freqs_slider-update.grc +++ b/apps/fft-multi-decoder_auto_freqs_slider-update.grc @@ -1856,7 +1856,7 @@ _enabled - True + 1 _coordinate @@ -1880,7 +1880,7 @@ n - 150 + 1000 type diff --git a/apps/ifft-RDS-decoder_hier-block.grc b/apps/ifft-RDS-decoder_hier-block.grc index 9c25750..7c37d66 100644 --- a/apps/ifft-RDS-decoder_hier-block.grc +++ b/apps/ifft-RDS-decoder_hier-block.grc @@ -2402,7 +2402,7 @@ log - True + False maxoutbuf diff --git a/python/max_freq.py b/python/max_freq.py index 5b2d3d1..32ff34a 100644 --- a/python/max_freq.py +++ b/python/max_freq.py @@ -94,7 +94,7 @@ class max_freq(gr.sync_block): else: self.center_freq = int(freq) def work(self, input_items, output_items): - if time.time()-self.timer<1:#every 1 seconds + if time.time()-self.timer<2:#every 2 seconds return len(input_items[0]) elif self.searchMode: #in0 = input_items[0] @@ -104,11 +104,13 @@ class max_freq(gr.sync_block): numbers=np.delete(input_items[0][0],range(carrier-carrier_width,carrier+carrier_width+1))#read input and disregard center (hackrf LO) #threshold=40# uni #threshold=60#home - threshold=np.mean(numbers)#2017-03-21 fft-multi-decoder + #threshold=np.mean(numbers)#2017-03-21 fft-multi-decoder + threshold=0.5*np.mean(numbers)#2017-05-18 fft-multi-decoder #minimum number of consecutive maximums (in fft domain) to consider signal as station: #min_consec_max_threshold=1#uni #min_consec_max_threshold=3#home - min_consec_max_threshold=6#2017-03-21 fft-multi-decoder + #min_consec_max_threshold=6#2017-03-21 fft-multi-decoder + min_consec_max_threshold=4#2017-05-18 fft-multi-decoder fuzzyness=2#uni #fuzzyness=10#home @@ -172,11 +174,9 @@ class max_freq(gr.sync_block): del station_indices_trunc[self.num_decoders:]#remove non decodable (too quiet) incidices station_indices_tune=[0]*self.num_decoders - same_station_threshold=int(500000*self.fft_len/self.samp_rate)#0.5mhz - #same_station_threshold=3 new_stations=[] - #add fixed stations: + #add fixed stations (currently unused): for i,old_freq in enumerate(self.last_station_indices): if self.index_fixed[i]: station_indices_tune[i]=old_freq @@ -190,14 +190,19 @@ class max_freq(gr.sync_block): if not added: new_stations.append(new_freq) #print("tune1:%s"%station_indices_tune) - #print("new_1 %s"%new_stations) + if self.debug: + print("tunc:%s"%station_indices_trunc) + print("new_1:%s"%new_stations) for i,tune_freq in enumerate(station_indices_tune): - if tune_freq == 0 and len(new_stations)>0: + if tune_freq == 0 and len(new_stations)>0:#add new stations to empty decoders station_indices_tune[i]=new_stations.pop() #print("tune2:%s"%station_indices_tune) - #print("new_2 %s"%new_stations) + if self.debug: + print("new_2:%s"%new_stations) + print("last_index:%s"%self.last_station_indices) + print("tune_index:%s"%station_indices_tune) self.last_station_indices=station_indices_tune#save current stations to compare againts next station_strength=[] @@ -206,7 +211,7 @@ class max_freq(gr.sync_block): for index in station_indices_tune: startfreq=self.center_freq-self.samp_rate/2 freq=self.samp_rate*index/self.fft_len+startfreq - freq+=30000#add 30k because detected max often too low + #freq+=30000#add 30k because detected max often too low num_decimals=int(round(math.log(self.snapto,10))) station_freqs.append(round(freq,-num_decimals)) station_strength.append(round(numbers[index],-2))