From 0e9fc67e0ebfa48e9db3ce93d9296796bba41619 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Tue, 5 Nov 2019 13:05:01 +0100 Subject: [PATCH 1/2] Improved prn length estimation when performing extended correlation in the FPGA. --- .../gnuradio_blocks/dll_pll_veml_tracking_fpga.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 c93ee9906..bb5596e55 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 @@ -1860,8 +1860,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un // this must be computed for the secondary prn code if (d_secondary) { - uint32_t first_prn_length = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast(std::floor(T_prn_samples)); - uint32_t next_prn_length = static_cast(std::floor(T_prn_samples)); + uint32_t next_prn_length = d_current_integration_length_samples/d_fpga_integration_period; + uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length*(d_fpga_integration_period - 1); multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length); } @@ -1913,8 +1913,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un // this must be computed for the secondary prn code if (d_secondary) { - uint32_t first_prn_length = d_current_integration_length_samples - (d_fpga_integration_period - 1) * static_cast(std::floor(T_prn_samples)); - uint32_t next_prn_length = static_cast(std::floor(T_prn_samples)); + uint32_t next_prn_length = d_current_integration_length_samples/d_fpga_integration_period; + uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length*(d_fpga_integration_period - 1); multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length); } From 39382d38e9fd9647065d0e01d3f66d5c11d2696c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 5 Nov 2019 16:07:24 +0100 Subject: [PATCH 2/2] Apply clang-format --- .../gnuradio_blocks/dll_pll_veml_tracking_fpga.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 bb5596e55..df64357b1 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 @@ -1860,8 +1860,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un // this must be computed for the secondary prn code if (d_secondary) { - uint32_t next_prn_length = d_current_integration_length_samples/d_fpga_integration_period; - uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length*(d_fpga_integration_period - 1); + uint32_t next_prn_length = d_current_integration_length_samples / d_fpga_integration_period; + uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length * (d_fpga_integration_period - 1); multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length); } @@ -1913,8 +1913,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un // this must be computed for the secondary prn code if (d_secondary) { - uint32_t next_prn_length = d_current_integration_length_samples/d_fpga_integration_period; - uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length*(d_fpga_integration_period - 1); + uint32_t next_prn_length = d_current_integration_length_samples / d_fpga_integration_period; + uint32_t first_prn_length = d_current_integration_length_samples - next_prn_length * (d_fpga_integration_period - 1); multicorrelator_fpga->update_prn_code_length(first_prn_length, next_prn_length); }