From 9ec555814318a41de03650fe72004078f9791d2c Mon Sep 17 00:00:00 2001 From: Cillian O'Driscoll Date: Mon, 11 Sep 2017 15:22:32 +0100 Subject: [PATCH] Use cpu_multicorrelator_real_codes For galileo_e1_dll_pll_veml_tracking_cc and gps_l1_ca_dll_pll_tracking_cc Note this gives some significant performance improvement for higher sampling rates --- .../galileo_e1_dll_pll_veml_tracking_cc.cc | 6 +++--- .../gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h | 8 ++++---- .../gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc | 4 ++-- .../gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h | 7 ++++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc index d2319945c..9c23835dc 100755 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.cc @@ -11,7 +11,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -129,7 +129,7 @@ galileo_e1_dll_pll_veml_tracking_cc::galileo_e1_dll_pll_veml_tracking_cc( // Initialization of local code replica // Get space for a vector with the sinboc(1,1) replica sampled 2x/chip - d_ca_code = static_cast(volk_gnsssdr_malloc((2 * Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_ca_code = static_cast(volk_gnsssdr_malloc((2 * Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment())); // correlator outputs (scalar) d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late @@ -211,7 +211,7 @@ void galileo_e1_dll_pll_veml_tracking_cc::start_tracking() d_code_loop_filter.initialize(); // initialize the code filter // generate local reference ALWAYS starting at chip 1 (2 samples per chip) - galileo_e1_code_gen_complex_sampled(d_ca_code, + galileo_e1_code_gen_float_sampled(d_ca_code, d_acquisition_gnss_synchro->Signal, false, d_acquisition_gnss_synchro->PRN, diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h index 3377234cf..09e6fffe6 100755 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_dll_pll_veml_tracking_cc.h @@ -6,7 +6,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2017 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -39,7 +39,7 @@ #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" -#include "cpu_multicorrelator.h" +#include "cpu_multicorrelator_real_codes.h" class galileo_e1_dll_pll_veml_tracking_cc; @@ -120,10 +120,10 @@ private: double d_early_late_spc_chips; double d_very_early_late_spc_chips; - gr_complex* d_ca_code; + float* d_ca_code; float* d_local_code_shift_chips; gr_complex* d_correlator_outs; - cpu_multicorrelator multicorrelator_cpu; + cpu_multicorrelator_real_codes multicorrelator_cpu; gr_complex *d_Very_Early; gr_complex *d_Early; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc index 46b191d8c..903aea0d9 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc @@ -123,7 +123,7 @@ Gps_L1_Ca_Dll_Pll_Tracking_cc::Gps_L1_Ca_Dll_Pll_Tracking_cc( // Initialization of local code replica // Get space for a vector with the C/A code replica sampled 1x/chip - d_ca_code = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_ca_code = static_cast(volk_gnsssdr_malloc(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment())); // correlator outputs (scalar) d_n_correlator_taps = 3; // Early, Prompt, and Late @@ -233,7 +233,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking() d_code_loop_filter.initialize(); // initialize the code filter // generate local reference ALWAYS starting at chip 1 (1 sample per chip) - gps_l1_ca_code_gen_complex(d_ca_code, d_acquisition_gnss_synchro->PRN, 0); + gps_l1_ca_code_gen_float(d_ca_code, d_acquisition_gnss_synchro->PRN, 0); multicorrelator_cpu.set_local_code_and_taps(static_cast(GPS_L1_CA_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips); for (int n = 0; n < d_n_correlator_taps; n++) diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h index 92a5d4afb..da408d7d7 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.h @@ -3,6 +3,7 @@ * \brief Interface of a code DLL + carrier PLL tracking block * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com * Javier Arribas, 2011. jarribas(at)cttc.es + * Cillian O'Driscoll, 2017. cillian.odriscoll(at)gmail.com * * Code DLL + carrier PLL according to the algorithms described in: * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, @@ -44,7 +45,7 @@ #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" -#include "cpu_multicorrelator.h" +#include "cpu_multicorrelator_real_codes.h" class Gps_L1_Ca_Dll_Pll_Tracking_cc; @@ -126,10 +127,10 @@ private: double d_acq_carrier_doppler_hz; // correlator int d_n_correlator_taps; - gr_complex* d_ca_code; + float* d_ca_code; float* d_local_code_shift_chips; gr_complex* d_correlator_outs; - cpu_multicorrelator multicorrelator_cpu; + cpu_multicorrelator_real_codes multicorrelator_cpu; // tracking vars