summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r--gnuradio-core/src/lib/general/gr_firdes.cc6
-rw-r--r--gnuradio-core/src/lib/general/gr_firdes.h3
-rw-r--r--gnuradio-core/src/lib/general/gr_firdes.i3
3 files changed, 10 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_firdes.cc b/gnuradio-core/src/lib/general/gr_firdes.cc
index 3eaa9c8d9..8efeb3438 100644
--- a/gnuradio-core/src/lib/general/gr_firdes.cc
+++ b/gnuradio-core/src/lib/general/gr_firdes.cc
@@ -739,6 +739,12 @@ gr_firdes::window (win_type type, int ntaps, double beta)
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++)
diff --git a/gnuradio-core/src/lib/general/gr_firdes.h b/gnuradio-core/src/lib/general/gr_firdes.h
index 0ae34fed4..de775bd07 100644
--- a/gnuradio-core/src/lib/general/gr_firdes.h
+++ b/gnuradio-core/src/lib/general/gr_firdes.h
@@ -40,7 +40,8 @@ class gr_firdes {
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,
};
diff --git a/gnuradio-core/src/lib/general/gr_firdes.i b/gnuradio-core/src/lib/general/gr_firdes.i
index d77c15aba..d49434adf 100644
--- a/gnuradio-core/src/lib/general/gr_firdes.i
+++ b/gnuradio-core/src/lib/general/gr_firdes.i
@@ -34,7 +34,8 @@ class gr_firdes {
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 ...