[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] block that does simple tone detection

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] block that does simple tone detection
Date: Fri, 26 Feb 2010 14:49:48 -0800
User-agent: Mutt/1.5.20 (2009-08-17)

On Fri, Feb 26, 2010 at 02:26:53PM -0800, Affan Syed wrote:
> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]