Tuesday, May 18, 2010

Re: [Discuss-gnuradio] Modifying .cc file of gr_peak_detector. Change number of output ports ?

On Tue, May 18, 2010 at 12:29:17AM -0700, grc007 wrote:
>
> Hello all,
> I try to modify the C++ code of the gr_peak_detector2_fb.cc.
> The peak_detector gives only 1 or 0 out if it found a peak. I want that it
> will give me also where the peak is and the amplitude of the peak.
> My questions are:
> - Which variables in the code can give me these information (amplitude, time
> of occur) ?
> - At the moment gr_peak_detector2 has only one output, how can I change it
> to get 2 or more outputs ?
>
> Thanks in advance for for reply.
> gr007
> http://old.nabble.com/file/p28592508/gr_peak_detector2_fb.cc
> gr_peak_detector2_fb.cc

If you look at the code, you will see that it will output either one
or two streams of information. The first stream is the peak/no-peak
information. The second stream (float), is the current average at
that sample.

To figure out when it occurred, you can count samples.

Eric

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment