[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-commit
Subject:    [Commit-gnuradio] r9070 - gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general
From:       trondeau () gnuradio ! org
Date:       2008-07-31 1:33:27
Message-ID: 20080731013327.D3784380074 () nyquist ! gnuradio ! org
[Download RAW message or body]

Author: trondeau
Date: 2008-07-30 19:33:27 -0600 (Wed, 30 Jul 2008)
New Revision: 9070

Modified:
   gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.cc
  gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.h
  gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.i
 Log:
first, adding the Blackman-harris window

Modified: gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.cc
 ===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.cc	2008-07-31 \
                01:21:47 UTC (rev 9069)
+++ gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.cc	2008-07-31 \
01:33:27 UTC (rev 9070) @@ -493,6 +493,12 @@
       taps[n] = 0.42 - 0.50 * cos ((2*M_PI * n) / (M-1)) - 0.08 * cos ((4*M_PI * n) \
/ (M-1));  break;
 
+  case WIN_BLACKMAN_hARRIS:
+    for (int n = -ntaps/2; n < ntaps/2; n++)
+      taps[n+ntaps/2] = 0.35875 + 0.48829*cos((2*M_PI * n) / (float)M) + 
+	0.14128*cos((4*M_PI * n) / (float)M) + 0.01168*cos((6*M_PI * n) / (float)M);
+    break;
+
 #if 0
   case WIN_KAISER:
     for (int n = 0; n < ntaps; n++)

Modified: gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.h
 ===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.h	2008-07-31 \
                01:21:47 UTC (rev 9069)
+++ gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.h	2008-07-31 \
01:33:27 UTC (rev 9070) @@ -40,7 +40,8 @@
     WIN_HANN = 1,	// max attenuation 44 dB
     WIN_BLACKMAN = 2,	// max attenuation 74 dB
     WIN_RECTANGULAR = 3,
-    WIN_KAISER = 4      // max attenuation a function of beta, google it
+    WIN_KAISER = 4,     // max attenuation a function of beta, google it
+    WIN_BLACKMAN_hARRIS = 5,
   };
 
 

Modified: gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.i
 ===================================================================
--- gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.i	2008-07-31 \
                01:21:47 UTC (rev 9069)
+++ gnuradio/branches/developers/trondeau/qtgui/gnuradio-core/src/lib/general/gr_firdes.i	2008-07-31 \
01:33:27 UTC (rev 9070) @@ -14,7 +14,8 @@
     WIN_HANN = 1,	// max attenuation 44 dB
     WIN_BLACKMAN = 2,	// max attenuation 74 dB
     WIN_RECTANGULAR = 3,
-    WIN_KAISER = 4      // max attenuation variable with beta, google it
+    WIN_KAISER = 4,     // max attenuation variable with beta, google it
+    WIN_BLACKMAN_hARRIS = 5,
   };
 
   // ... class methods ...


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic