Working to understand sink block bin_statistics_f. Examining the User Manual, the sourcecode gr_bin_statistics_f.cc and related includes, and hacking qa_bin_statistics.py, this is my current understanding:
1. bin_statistics determines max values of vectors with length vlen over a number of samples dwell_delay after discarding tune_delay samples. 2. After processing N = dwell_delay samples, bin_statistics composes a message and inserts it in the message queue. 3. Each message from bin_statistics consists of a vector of max values, prefixed by the center frequency corresponding to the associated samples, i.e., it is just the frequency value delivered to bin_statistics with the input samples. I was hoping that bin_statistics would do more than the above, and perhaps I'm not yet understanding something. Any additional hints will be appreciated. In particular, I'd like to know the frequency of the highest peak in an FFT vector (see below). Unless I can find a better starting point, I intend to hack bin_statistics. I was also confused by some of the recent threads about usrp_spectrum_sense.py. In particular, there was the following advice from Firas Abbaz in this thread http://www.nabble.com/fft-realated-problems-td20308034.html#a20328754 ---------------------------------- Firas A. wrote: Hi, 1) use "--tune-delay" with 10e-3 ---------------------------------- Based on the above, I'd expect an integer tune delay parameter. Is 10e-3 just a way of specifying a value smaller than 1, so there's no tune delay? I actually need to do the following (I think) to implement a simple AFC: A. Find the highest peak in an FFT output vector. B. Compare highest peak freq to current tuning. If diff is significant, retune to new peak freq C. Allow settling time before looping If anyone is aware of existing code that would be a good starting point, please advise. Thanks. Paul Mathews Whidbey Island, WA _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio