Here's a snippet of code that is a modified version of
gr_probe_avg_mag_sqrd_c.cc:
int
gr_total_power_cf::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
const gr_complex *in = (const gr_complex *) input_items[0];
double *out = (double *)output_items[0];
for (int i = 0; i < noutput_items; i++){
double mag_sqrd = in[i].real()*in[i].real() + in[i].imag()*in[i].imag();
out[i] = d_iir.filter(mag_sqrd);
}
return noutput_items;
}
I think what I would like to do after the IIR filter is to decimate down to
a much-lower sample rate--probably some small multiple of the "corner"
frequency of the IIR filter. Can I call the gr_sync_decimator directly inside
my
work function here, and how?
I admit to never having become a C++ programmer. I'm one of those dinosaurs
who learned C back in 1979, and it pretty-much "stuck".
--
Marcus Leech Mail: Dept 1A12, M/S: 04352P16
Security Standards Advisor Phone: (ESN) 393-9145 +1 613 763 9145
Strategic Standards
Nortel Networks [EMAIL PROTECTED]
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio