From 6f656bc7447c5076e7f7b0e7a57ca58fc44551ef Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Fri, 26 Jul 2019 10:10:12 +0200 Subject: [PATCH] solved minor bug in cn0_and_tracking_lock_status --- .../gnuradio_blocks/dll_pll_veml_tracking_fpga.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc index 150ab3f27..4acb3cab4 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -597,14 +597,11 @@ bool dll_pll_veml_tracking_fpga::cn0_and_tracking_lock_status(double coh_integra if (d_cn0_estimation_counter < trk_parameters.cn0_samples) { // fill buffer with prompt correlator output values - d_Prompt_buffer[d_cn0_estimation_counter] = d_P_accu; - d_cn0_estimation_counter++; + d_Prompt_buffer[d_cn0_estimation_counter++] = d_P_accu; return true; } - - d_cn0_estimation_counter = 0; - d_Prompt_buffer[d_cn0_estimation_counter++] = d_P_accu; - d_cn0_estimation_counter++; + d_cn0_estimation_counter = 0; + d_Prompt_buffer[d_cn0_estimation_counter++] = d_P_accu; // Code lock indicator float d_CN0_SNV_dB_Hz_raw = cn0_svn_estimator(d_Prompt_buffer.data(), trk_parameters.cn0_samples, static_cast(coh_integration_time_s)); d_CN0_SNV_dB_Hz = d_cn0_smoother.smooth(d_CN0_SNV_dB_Hz_raw);