The new 'stats' block is derived from gr_sync_block so we override the work() method to implement the statistics gathering. Using the old gr_bin_statistics_f as a template I arrived at a more streamlined detector based on a constant threshold value. I feel that solidifying this implementation will ease future work on an adaptive threshold.
'stats':
- for each FFT frame, calculate the average energy for a given filter bank
- accrue up to N (window size) stats
- when you have N stats gathered, generated a message with a decision
- if T > threshold, return a 1 otherwise a 0
- as new FFT frames become available, pop the oldest value and push the new one on
This also seems interesting !!
ReplyDelete