From 52b9dfb8c058f85d3ca6d7e84f7f9010357323ec Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 13 Feb 2020 18:45:57 +0100 Subject: [PATCH] Do not add extra work for nothing --- .../gnuradio_blocks/dll_pll_veml_tracking.cc | 21 ++++++++++--------- .../dll_pll_veml_tracking_fpga.cc | 14 ++++++------- 2 files changed, 18 insertions(+), 17 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 bd16fe9d3..3d159fd69 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -1643,11 +1643,12 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) d_P_accu = *d_Prompt; d_L_accu = *d_Late; trk_parameters.spc = trk_parameters.early_late_space_chips; - if (std::string(trk_parameters.signal) == "E1") - { - trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - } + // if (std::string(trk_parameters.signal) == "E1") + // { + // trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // } + // fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period if (trk_parameters.bit_synchronization_time_limit_s < (d_sample_counter - d_acq_sample_stamp) / static_cast(trk_parameters.fs_in)) { @@ -1749,11 +1750,11 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) d_local_code_shift_chips[3] = trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); d_local_code_shift_chips[4] = trk_parameters.very_early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); trk_parameters.spc = trk_parameters.early_late_space_narrow_chips; - if (std::string(trk_parameters.signal) == "E1") - { - trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - } + // if (std::string(trk_parameters.signal) == "E1") + // { + // trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // } } else { 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 d2682bf10..c7f341d6f 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 @@ -1597,11 +1597,11 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un d_P_accu = *d_Prompt; d_L_accu = *d_Late; trk_parameters.spc = trk_parameters.early_late_space_chips; - if (std::string(trk_parameters.signal) == "E1") - { - trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - } + // if (std::string(trk_parameters.signal) == "E1") + // { + // trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // } // fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period if (trk_parameters.bit_synchronization_time_limit_s < (d_sample_counter - d_acq_sample_stamp) / static_cast(trk_parameters.fs_in)) @@ -1745,8 +1745,8 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un d_local_code_shift_chips[3] = trk_parameters.early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); d_local_code_shift_chips[4] = trk_parameters.very_early_late_space_narrow_chips * static_cast(d_code_samples_per_chip); trk_parameters.spc = trk_parameters.early_late_space_narrow_chips; - trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); - trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // trk_parameters.slope = -CalculateSlopeAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); + // trk_parameters.y_intercept = GetYInterceptAbs(&SinBocCorrelationFunction<1, 1>, trk_parameters.spc); } else {