From 135802e61d0e8d155e7f23561f0d6230b0471c45 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 31 May 2019 04:54:41 +0000 Subject: [PATCH] fixed peak bandwidth git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@524 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- gr-jay/lib/peak_detect_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gr-jay/lib/peak_detect_impl.cc b/gr-jay/lib/peak_detect_impl.cc index 15b385c..1422a5d 100644 --- a/gr-jay/lib/peak_detect_impl.cc +++ b/gr-jay/lib/peak_detect_impl.cc @@ -48,8 +48,8 @@ namespace gr { , m_fcenter (fcenter) , m_peak_thresh (peak_thresh) , m_peak_hysteresis (peak_hysteresis) - , m_peak_width_min (2*(int)((0.5f*m_vlen)/bandwidth*peak_width_min) + 1) - , m_peak_width_max (2*(int)((0.5f*m_vlen)/bandwidth*peak_width_max) + 1) + , m_peak_width_min ((int)((float)m_vlen/bandwidth*peak_width_min + 0.5f)) + , m_peak_width_max ((int)((float)m_vlen/bandwidth*peak_width_max + 0.5f)) , m_alpha_s (alpha_s) , m_alpha_m(alpha_m) , m_frameCount(0)