diff options
Diffstat (limited to 'gr-digital')
-rw-r--r-- | gr-digital/lib/digital_impl_mpsk_snr_est.cc | 6 | ||||
-rw-r--r-- | gr-digital/lib/digital_mpsk_snr_est_cc.cc | 2 | ||||
-rwxr-xr-x | gr-digital/python/qa_mpsk_snr_est.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/gr-digital/lib/digital_impl_mpsk_snr_est.cc b/gr-digital/lib/digital_impl_mpsk_snr_est.cc index 38177083f..b2ad0369f 100644 --- a/gr-digital/lib/digital_impl_mpsk_snr_est.cc +++ b/gr-digital/lib/digital_impl_mpsk_snr_est.cc @@ -236,9 +236,9 @@ digital_impl_mpsk_snr_est_svr::update( int noutput_items, const gr_complex *in) { - for (int i = 0; i < noutput_items; i++){ - double x = abs(in[i]); - double x1 = abs(in[i-1]); + for(int i = 0; i < noutput_items; i++) { + double x = abs(in[i+1]); + double x1 = abs(in[i]); double y1 = (x*x)*(x1*x1); d_y1 = d_alpha*y1 + d_beta*d_y1; diff --git a/gr-digital/lib/digital_mpsk_snr_est_cc.cc b/gr-digital/lib/digital_mpsk_snr_est_cc.cc index b5a60f0d3..38a452ac2 100644 --- a/gr-digital/lib/digital_mpsk_snr_est_cc.cc +++ b/gr-digital/lib/digital_mpsk_snr_est_cc.cc @@ -82,7 +82,7 @@ digital_mpsk_snr_est_cc::work(int noutput_items, // Update, calculate, and issue an SNR tag every d_nsamples int index = 0, x = 0; int64_t nwritten = nitems_written(0); - while(index + (d_nsamples-d_count) <= noutput_items) { + while(index + (d_nsamples-d_count) < noutput_items) { x = d_nsamples - d_count; nwritten += x; diff --git a/gr-digital/python/qa_mpsk_snr_est.py b/gr-digital/python/qa_mpsk_snr_est.py index d392567bf..e21bad831 100755 --- a/gr-digital/python/qa_mpsk_snr_est.py +++ b/gr-digital/python/qa_mpsk_snr_est.py @@ -88,7 +88,7 @@ class test_mpsk_snr_est (gr_unittest.TestCase): self.assertFloatTuplesAlmostEqual (expected_result, actual_result, 2) def test_mpsk_snr_est_svn (self): - expected_result = [10.90, 6.00, 4.76, 4.97, 5.49] + expected_result = [10.92, 6.02, 4.78, 4.98, 5.51] N = 10000 alpha = 0.001 |