summaryrefslogtreecommitdiff
path: root/gr-digital/lib/digital_impl_mpsk_snr_est.cc
diff options
context:
space:
mode:
authorTom Rondeau2013-04-07 09:59:46 -0400
committerTom Rondeau2013-04-07 09:59:46 -0400
commitb1f34f61dd4cb2d0aecf4f1763a59fd4a4fa0579 (patch)
tree73d3c9ee67e2047e346c5a4962d00220234fcc4b /gr-digital/lib/digital_impl_mpsk_snr_est.cc
parent6ed6dfae1925123941032c757346d16c0f84540e (diff)
downloadgnuradio-b1f34f61dd4cb2d0aecf4f1763a59fd4a4fa0579.tar.gz
gnuradio-b1f34f61dd4cb2d0aecf4f1763a59fd4a4fa0579.tar.bz2
gnuradio-b1f34f61dd4cb2d0aecf4f1763a59fd4a4fa0579.zip
digital: fixes for SNR ests.
set_history: you keep using that word. I do not think it means what you think it means.
Diffstat (limited to 'gr-digital/lib/digital_impl_mpsk_snr_est.cc')
-rw-r--r--gr-digital/lib/digital_impl_mpsk_snr_est.cc6
1 files changed, 3 insertions, 3 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;