From 144fa44ed2e0378e2ec585c3991108926d9449be Mon Sep 17 00:00:00 2001 From: trondeau Date: Sat, 25 Oct 2008 23:29:43 +0000 Subject: Merging qtgui branch-r9068:9837: this ads a qtgui_sink_c and qtgui_sink_f that displays the time, PSD, and spectrogram plots of a signal put into it. It requires qt4, qwt, and qwtplot3d and has not been tested on OSX. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9853 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/lib/general/gr_firdes.cc | 6 ++++++ gnuradio-core/src/lib/general/gr_firdes.h | 3 ++- gnuradio-core/src/lib/general/gr_firdes.i | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src/lib/general') 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 ... -- cgit