> Hi all,
> I have been building a simple block that can detect energy at a
> particular frequency, i.e. a tone detection block. The signal
> processing seemed simple enough for me, so I directly coded it.
> Essentially my tone_sink takes in float point samples of the input
> signal (passed through a narrow bandpass filter), squares them and
> keeps a short term and long term average (I use an EWMA with
> different alpha's). I then generate a message if the short term avg
> is becomes much greater than the long term average. here is the .cc
> code
Assuming that you've subclassed gr_sync_block, you shouldn't be
calling consume_each.
FWIW, you may want to look at the Goertzel algorithm for computing
power at a single frequency.
Eric
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment