commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11278 - gnuradio/branches/developers/trondeau/pfb/gnu


From: trondeau
Subject: [Commit-gnuradio] r11278 - gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter
Date: Wed, 24 Jun 2009 19:46:40 -0600 (MDT)

Author: trondeau
Date: 2009-06-24 19:46:39 -0600 (Wed, 24 Jun 2009)
New Revision: 11278

Modified:
   
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/channelize.py
   
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/gr_pfb_filter_ccf.cc
Log:
Closer to working filter. I knew it was something simple with the output buffer 
indexing.

Modified: 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/channelize.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/channelize.py
        2009-06-24 07:42:34 UTC (rev 11277)
+++ 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/channelize.py
        2009-06-25 01:46:39 UTC (rev 11278)
@@ -13,7 +13,7 @@
 
         self._N = 200000
         self._fs = 10000
-        self._M = 10
+        self._M = 9
         self._taps = gr.firdes.low_pass(1, self._fs, 100, 10)
         fc = 200
 
@@ -25,7 +25,7 @@
         
         self.signals = list()
         self.add = gr.add_cc()
-        freqs = [10, 80]
+        freqs = [10, 1020, 2040, 3050, 4060]
         for i in xrange(len(freqs)):
             self.signals.append(gr.sig_source_c(self._fs, gr.GR_SIN_WAVE, 
freqs[i], 1))
             self.connect(self.signals[i], (self.add,i))

Modified: 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/gr_pfb_filter_ccf.cc
===================================================================
--- 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/gr_pfb_filter_ccf.cc
 2009-06-24 07:42:34 UTC (rev 11277)
+++ 
gnuradio/branches/developers/trondeau/pfb/gnuradio-core/src/lib/filter/gr_pfb_filter_ccf.cc
 2009-06-25 01:46:39 UTC (rev 11278)
@@ -70,7 +70,7 @@
   }
   
   // Create the FFT to handle the output de-spinning of the channels
-  d_fft = new gri_fft_complex (d_numchans, false);
+  d_fft = new gri_fft_complex (d_numchans, true);
   
   set_history (d_taps_per_filter);
 }
@@ -113,7 +113,8 @@
   //        yes, this will be optimized
   unsigned int i = 0, count = 0;
   gr_complex *flt_out = new gr_complex[d_numchans];
-  for(int i = 0; i < noutput_items; i++) {
+  //  for(int i = 0; i < noutput_items; i++) {
+  while((i < noutput_items) && (count < ninput_items[0])) {
     // Move through filters from bottom to top
     
     memset(flt_out, 0, d_numchans*sizeof(gr_complex));
@@ -134,7 +135,7 @@
     // despin through FFT
     memcpy(d_fft->get_inbuf(), &flt_out[0], d_numchans*sizeof(gr_complex));
     d_fft->execute();
-    memcpy(&out[i], d_fft->get_outbuf(), d_numchans*sizeof(gr_complex));
+    memcpy(&out[d_numchans*i], d_fft->get_outbuf(), 
d_numchans*sizeof(gr_complex));
     //memcpy(&out[i], flt_out, d_numchans*sizeof(gr_complex));
     i++;
   }
@@ -143,5 +144,5 @@
 
   printf("count: %d\n", count);
   consume_each(count);
-  return noutput_items;
+  return i;
 }





reply via email to

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