[Top][All Lists]

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

[Discuss-gnuradio] Homing in on an RA detector chain

From: Marcus Leech
Subject: [Discuss-gnuradio] Homing in on an RA detector chain
Date: Thu, 05 Jan 2006 14:57:25 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040803

Here's a snippet of code that is a modified version of gr_probe_avg_mag_sqrd_c.cc:

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 
 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                          address@hidden

reply via email to

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