summaryrefslogtreecommitdiff
path: root/gr-digital/lib/digital_impl_mpsk_snr_est.cc
diff options
context:
space:
mode:
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;