From d4a13f2bbd1624b9525b0ccc8dbdc3f730774192 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 9 Apr 2018 22:14:15 +0200 Subject: [PATCH] Fix CN0 estimation --- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index d7fcdc160..8feeb7c5b 100755 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -1233,7 +1233,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) d_L_accu = *d_Late; // Check lock status - if (!cn0_and_tracking_lock_status(static_cast(d_correlation_length_ms) * 1000.0)) + if (!cn0_and_tracking_lock_status(static_cast(d_correlation_length_ms) / 1000.0)) { clear_tracking_vars(); d_state = 0; // loss-of-lock detected @@ -1411,7 +1411,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) save_correlation_results(); // check lock status - if (!cn0_and_tracking_lock_status(static_cast(d_correlation_length_ms) * 1000.0 * static_cast(trk_parameters.extend_correlation_symbols))) + if (!cn0_and_tracking_lock_status((static_cast(d_correlation_length_ms) / 1000.0) * static_cast(trk_parameters.extend_correlation_symbols))) { clear_tracking_vars(); d_state = 0; // loss-of-lock detected