From 5a86de623b36207be6698ef3dd8a88960f7990d3 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Tue, 20 Mar 2018 17:24:16 +0100 Subject: [PATCH] Fix tests --- .../galileo_e1_dll_pll_veml_tracking.cc | 2 +- .../adapters/galileo_e5a_dll_pll_tracking.cc | 2 +- .../adapters/gps_l1_ca_dll_pll_tracking.cc | 2 +- .../adapters/gps_l5i_dll_pll_tracking.cc | 2 +- src/core/system_parameters/rtcm.h | 10 +- .../observables/hybrid_observables_test.cc | 208 +++++++++--------- .../gps_l1_ca_telemetry_decoder_test.cc | 3 +- .../gps_l1_ca_dll_pll_tracking_test.cc | 6 +- 8 files changed, 119 insertions(+), 116 deletions(-) diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc index 92cfaa450..6c80628f7 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -78,7 +78,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( extend_correlation_symbols = 1; std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl; } - if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) + if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) { std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; } diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc index ff181cf2d..816710efc 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -81,7 +81,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH; std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl; } - if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) + if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) { std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; } diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc index 9f0892222..5512836da 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc @@ -84,7 +84,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( { std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl; } - if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) + if ((symbols_extended_correlator > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) { std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; } diff --git a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc index 23f8c62a6..aa1885fd2 100644 --- a/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5i_dll_pll_tracking.cc @@ -80,7 +80,7 @@ GpsL5iDllPllTracking::GpsL5iDllPllTracking( extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH; std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl; } - if (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz) + if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) { std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl; } diff --git a/src/core/system_parameters/rtcm.h b/src/core/system_parameters/rtcm.h index d4ac17460..434038e21 100644 --- a/src/core/system_parameters/rtcm.h +++ b/src/core/system_parameters/rtcm.h @@ -641,7 +641,6 @@ private: { public: Rtcm_Session(boost::asio::ip::tcp::socket socket, Rtcm_Listener_Room& room) : socket_(std::move(socket)), room_(room) {} - inline void start() { room_.join(shared_from_this()); @@ -665,12 +664,13 @@ private: boost::asio::async_read(socket_, boost::asio::buffer(read_msg_.data(), Rtcm_Message::header_length), [this, self](boost::system::error_code ec, std::size_t /*length*/) { - if (!ec && read_msg_.decode_header()) + if (!ec and read_msg_.decode_header()) { do_read_message_body(); } - else if (!ec && !read_msg_.decode_header()) + else if (!ec and !read_msg_.decode_header()) { + /* TODO: The commented code throws an exception. Solve it! client_says += read_msg_.data(); bool first = true; while (client_says.length() >= 80) @@ -683,6 +683,7 @@ private: std::cout << client_says.substr(0, 80) << std::endl; client_says = client_says.substr(80, client_says.length() - 80); } + */ do_read_message_header(); } else @@ -719,8 +720,7 @@ private: { auto self(shared_from_this()); boost::asio::async_write(socket_, - boost::asio::buffer(write_msgs_.front().body(), - write_msgs_.front().body_length()), + boost::asio::buffer(write_msgs_.front().body(), write_msgs_.front().body_length()), [this, self](boost::system::error_code ec, std::size_t /*length*/) { if (!ec) { diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index 17c140cda..5b5c9ff12 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -184,17 +184,17 @@ public: int configure_generator(); int generate_signal(); void check_results_carrier_phase( - arma::mat& true_ch0, - arma::mat& true_ch1, - arma::vec& true_tow_s, - arma::mat& measured_ch0, - arma::mat& measured_ch1); + arma::mat& true_ch0, + arma::mat& true_ch1, + arma::vec& true_tow_s, + arma::mat& measured_ch0, + arma::mat& measured_ch1); void check_results_code_psudorange( - arma::mat& true_ch0, - arma::mat& true_ch1, - arma::vec& true_tow_s, - arma::mat& measured_ch0, - arma::mat& measured_ch1); + arma::mat& true_ch0, + arma::mat& true_ch1, + arma::vec& true_tow_s, + arma::mat& measured_ch0, + arma::mat& measured_ch1); HybridObservablesTest() { @@ -281,23 +281,23 @@ void HybridObservablesTest::configure_receiver() // Set Tracking config->set_property("Tracking_1C.item_type", "gr_complex"); - config->set_property("Tracking_1C.if", "0"); config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); config->set_property("Tracking_1C.pll_bw_hz", "35.0"); config->set_property("Tracking_1C.dll_bw_hz", "0.5"); config->set_property("Tracking_1C.early_late_space_chips", "0.5"); + config->set_property("Tracking_1C.unified", "true"); config->set_property("TelemetryDecoder_1C.dump", "true"); config->set_property("Observables.dump", "true"); } void HybridObservablesTest::check_results_carrier_phase( - arma::mat& true_ch0, - arma::mat& true_ch1, - arma::vec& true_tow_s, - arma::mat& measured_ch0, - arma::mat& measured_ch1) + arma::mat& true_ch0, + arma::mat& true_ch1, + arma::vec& true_tow_s, + arma::mat& measured_ch0, + arma::mat& measured_ch1) { //1. True value interpolation to match the measurement times @@ -358,12 +358,12 @@ void HybridObservablesTest::check_results_carrier_phase( << " [cycles]" << std::endl; std::cout.precision(ss); - ASSERT_LT(rmse_ch0, 5e-2); - ASSERT_LT(error_mean_ch0, 5e-2); + ASSERT_LT(rmse_ch0, 5e-2); + ASSERT_LT(error_mean_ch0, 5e-2); ASSERT_GT(error_mean_ch0, -5e-2); - ASSERT_LT(error_var_ch0, 5e-2); - ASSERT_LT(max_error_ch0, 5e-2); - ASSERT_GT(min_error_ch0, -5e-2); + ASSERT_LT(error_var_ch0, 5e-2); + ASSERT_LT(max_error_ch0, 5e-2); + ASSERT_GT(min_error_ch0, -5e-2); //5. report ss = std::cout.precision(); @@ -375,21 +375,21 @@ void HybridObservablesTest::check_results_carrier_phase( << " [cycles]" << std::endl; std::cout.precision(ss); - ASSERT_LT(rmse_ch1, 5e-2); - ASSERT_LT(error_mean_ch1, 5e-2); + ASSERT_LT(rmse_ch1, 5e-2); + ASSERT_LT(error_mean_ch1, 5e-2); ASSERT_GT(error_mean_ch1, -5e-2); - ASSERT_LT(error_var_ch1, 5e-2); - ASSERT_LT(max_error_ch1, 5e-2); - ASSERT_GT(min_error_ch1, -5e-2); + ASSERT_LT(error_var_ch1, 5e-2); + ASSERT_LT(max_error_ch1, 5e-2); + ASSERT_GT(min_error_ch1, -5e-2); } void HybridObservablesTest::check_results_code_psudorange( - arma::mat& true_ch0, - arma::mat& true_ch1, - arma::vec& true_tow_s, - arma::mat& measured_ch0, - arma::mat& measured_ch1) + arma::mat& true_ch0, + arma::mat& true_ch1, + arma::vec& true_tow_s, + arma::mat& measured_ch0, + arma::mat& measured_ch1) { //1. True value interpolation to match the measurement times @@ -438,12 +438,12 @@ void HybridObservablesTest::check_results_code_psudorange( << " [meters]" << std::endl; std::cout.precision(ss); - ASSERT_LT(rmse, 0.5); - ASSERT_LT(error_mean, 0.5); + ASSERT_LT(rmse, 0.5); + ASSERT_LT(error_mean, 0.5); ASSERT_GT(error_mean, -0.5); - ASSERT_LT(error_var, 0.5); - ASSERT_LT(max_error, 2.0); - ASSERT_GT(min_error, -2.0); + ASSERT_LT(error_var, 0.5); + ASSERT_LT(max_error, 2.0); + ASSERT_GT(min_error, -2.0); } @@ -543,7 +543,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) boost::shared_ptr tlm_msg_rx_ch2 = HybridObservablesTest_tlm_msg_rx_make(); //Observables - std::shared_ptr observables(new HybridObservables(config.get(), "Observables",3, 2)); + std::shared_ptr observables(new HybridObservables(config.get(), "Observables", 3, 2)); ASSERT_NO_THROW({ tracking_ch0->set_channel(gnss_synchro_ch0.Channel_ID); @@ -604,10 +604,10 @@ TEST_F(HybridObservablesTest, ValidationOfResults) true_observables_reader true_observables; ASSERT_NO_THROW({ - if(true_observables.open_obs_file(std::string("./obs_out.bin")) == false) - { - throw std::exception(); - } + if (true_observables.open_obs_file(std::string("./obs_out.bin")) == false) + { + throw std::exception(); + } }) << "Failure opening true observables file"; unsigned int nepoch = static_cast(true_observables.num_epochs()); @@ -620,27 +620,27 @@ TEST_F(HybridObservablesTest, ValidationOfResults) true_observables.restart(); long int epoch_counter = 0; ASSERT_NO_THROW({ - while(true_observables.read_binary_obs()) - { - if(round(true_observables.prn[0]) != gnss_synchro_ch0.PRN) - { - std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; - throw std::exception(); - } - if(round(true_observables.prn[1]) != gnss_synchro_ch1.PRN) - { - std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; - throw std::exception(); - } - true_ch0(epoch_counter, 0) = true_observables.gps_time_sec[0]; - true_ch0(epoch_counter, 1) = true_observables.dist_m[0]; - true_ch0(epoch_counter, 2) = true_observables.doppler_l1_hz[0]; - true_ch0(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[0]; + while (true_observables.read_binary_obs()) + { + if (round(true_observables.prn[0]) != gnss_synchro_ch0.PRN) + { + std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; + throw std::exception(); + } + if (round(true_observables.prn[1]) != gnss_synchro_ch1.PRN) + { + std::cout << "True observables SV PRN does not match " << round(true_observables.prn[1]) << std::endl; + throw std::exception(); + } + true_ch0(epoch_counter, 0) = true_observables.gps_time_sec[0]; + true_ch0(epoch_counter, 1) = true_observables.dist_m[0]; + true_ch0(epoch_counter, 2) = true_observables.doppler_l1_hz[0]; + true_ch0(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[0]; - true_ch1(epoch_counter, 0) = true_observables.gps_time_sec[1]; - true_ch1(epoch_counter, 1) = true_observables.dist_m[1]; - true_ch1(epoch_counter, 2) = true_observables.doppler_l1_hz[1]; - true_ch1(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[1]; + true_ch1(epoch_counter, 0) = true_observables.gps_time_sec[1]; + true_ch1(epoch_counter, 1) = true_observables.dist_m[1]; + true_ch1(epoch_counter, 2) = true_observables.doppler_l1_hz[1]; + true_ch1(epoch_counter, 3) = true_observables.acc_carrier_phase_l1_cycles[1]; epoch_counter++; } @@ -649,10 +649,10 @@ TEST_F(HybridObservablesTest, ValidationOfResults) //read measured values observables_dump_reader estimated_observables(2); //two channels ASSERT_NO_THROW({ - if(estimated_observables.open_obs_file(std::string("./observables.dat")) == false) - { - throw std::exception(); - } + if (estimated_observables.open_obs_file(std::string("./observables.dat")) == false) + { + throw std::exception(); + } }) << "Failure opening dump observables file"; nepoch = static_cast(estimated_observables.num_epochs()); @@ -665,43 +665,51 @@ TEST_F(HybridObservablesTest, ValidationOfResults) estimated_observables.restart(); epoch_counter = 0; long int epoch_counter2 = 0; - while(estimated_observables.read_binary_obs()) - { - if(static_cast(estimated_observables.valid[0])) + while (estimated_observables.read_binary_obs()) { - measured_ch0(epoch_counter, 0) = estimated_observables.RX_time[0]; - measured_ch0(epoch_counter, 1) = estimated_observables.TOW_at_current_symbol_s[0]; - measured_ch0(epoch_counter, 2) = estimated_observables.Carrier_Doppler_hz[0]; - measured_ch0(epoch_counter, 3) = estimated_observables.Acc_carrier_phase_hz[0]; - measured_ch0(epoch_counter, 4) = estimated_observables.Pseudorange_m[0]; - epoch_counter++; + if (static_cast(estimated_observables.valid[0])) + { + measured_ch0(epoch_counter, 0) = estimated_observables.RX_time[0]; + measured_ch0(epoch_counter, 1) = estimated_observables.TOW_at_current_symbol_s[0]; + measured_ch0(epoch_counter, 2) = estimated_observables.Carrier_Doppler_hz[0]; + measured_ch0(epoch_counter, 3) = estimated_observables.Acc_carrier_phase_hz[0]; + measured_ch0(epoch_counter, 4) = estimated_observables.Pseudorange_m[0]; + epoch_counter++; + } + if (static_cast(estimated_observables.valid[1])) + { + measured_ch1(epoch_counter2, 0) = estimated_observables.RX_time[1]; + measured_ch1(epoch_counter2, 1) = estimated_observables.TOW_at_current_symbol_s[1]; + measured_ch1(epoch_counter2, 2) = estimated_observables.Carrier_Doppler_hz[1]; + measured_ch1(epoch_counter2, 3) = estimated_observables.Acc_carrier_phase_hz[1]; + measured_ch1(epoch_counter2, 4) = estimated_observables.Pseudorange_m[1]; + epoch_counter2++; + } } - if(static_cast(estimated_observables.valid[1])) - { - measured_ch1(epoch_counter2, 0) = estimated_observables.RX_time[1]; - measured_ch1(epoch_counter2, 1) = estimated_observables.TOW_at_current_symbol_s[1]; - measured_ch1(epoch_counter2, 2) = estimated_observables.Carrier_Doppler_hz[1]; - measured_ch1(epoch_counter2, 3) = estimated_observables.Acc_carrier_phase_hz[1]; - measured_ch1(epoch_counter2, 4) = estimated_observables.Pseudorange_m[1]; - epoch_counter2++; - } - } //Cut measurement tail zeros arma::uvec index = arma::find(measured_ch0.col(0) > 0.0, 1, "last"); - if((index.size() > 0) and index(0) < (nepoch - 1)) - { measured_ch0.shed_rows(index(0) + 1, nepoch - 1); } + if ((index.size() > 0) and index(0) < (nepoch - 1)) + { + measured_ch0.shed_rows(index(0) + 1, nepoch - 1); + } index = arma::find(measured_ch1.col(0) > 0.0, 1, "last"); - if((index.size() > 0) and index(0) < (nepoch - 1)) - { measured_ch1.shed_rows(index(0) + 1, nepoch - 1); } + if ((index.size() > 0) and index(0) < (nepoch - 1)) + { + measured_ch1.shed_rows(index(0) + 1, nepoch - 1); + } //Cut measurement initial transitory of the measurements index = arma::find(measured_ch0.col(0) >= true_ch0(0, 0), 1, "first"); - if((index.size() > 0) and (index(0) > 0)) - { measured_ch0.shed_rows(0, index(0)); } + if ((index.size() > 0) and (index(0) > 0)) + { + measured_ch0.shed_rows(0, index(0)); + } index = arma::find(measured_ch1.col(0) >= true_ch1(0, 0), 1, "first"); - if((index.size() > 0) and (index(0) > 0)) - { measured_ch1.shed_rows(0, index(0)); } + if ((index.size() > 0) and (index(0) > 0)) + { + measured_ch1.shed_rows(0, index(0)); + } //Correct the clock error using true values (it is not possible for a receiver to correct //the receiver clock offset error at the observables level because it is required the @@ -709,14 +717,14 @@ TEST_F(HybridObservablesTest, ValidationOfResults) //Find the reference satellite (the nearest) and compute the receiver time offset at observable level arma::vec receiver_time_offset_s; - if(measured_ch0(0, 4) < measured_ch1(0, 4)) - { - receiver_time_offset_s = true_ch0.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; - } + if (measured_ch0(0, 4) < measured_ch1(0, 4)) + { + receiver_time_offset_s = true_ch0.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; + } else - { - receiver_time_offset_s = true_ch1.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; - } + { + receiver_time_offset_s = true_ch1.col(1) / GPS_C_m_s - GPS_STARTOFFSET_ms / 1000.0; + } arma::vec corrected_reference_TOW_s = true_ch0.col(0) - receiver_time_offset_s; std::cout << "Receiver time offset: " << receiver_time_offset_s(0) * 1e3 << " [ms]" << std::endl; @@ -724,5 +732,5 @@ TEST_F(HybridObservablesTest, ValidationOfResults) check_results_code_psudorange(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1); check_results_carrier_phase(true_ch0, true_ch1, corrected_reference_TOW_s, measured_ch0, measured_ch1); - std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl; + std::cout << "Test completed in " << elapsed_seconds.count() << " [s]" << std::endl; } diff --git a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc index 340e472e5..ddeeda281 100644 --- a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc @@ -265,13 +265,12 @@ void GpsL1CATelemetryDecoderTest::configure_receiver() // Set Tracking config->set_property("Tracking_1C.item_type", "gr_complex"); - config->set_property("Tracking_1C.if", "0"); config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); config->set_property("Tracking_1C.pll_bw_hz", "20.0"); config->set_property("Tracking_1C.dll_bw_hz", "1.5"); config->set_property("Tracking_1C.early_late_space_chips", "0.5"); - + config->set_property("Tracking_1C.unified", "true"); config->set_property("TelemetryDecoder_1C.dump", "true"); } diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 7ed7741da..f9357d4fd 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -225,11 +225,7 @@ void GpsL1CADllPllTrackingTest::configure_receiver() config->set_property("Tracking_1C.pll_bw_hz", "20.0"); config->set_property("Tracking_1C.dll_bw_hz", "2.0"); config->set_property("Tracking_1C.early_late_space_chips", "0.5"); - config->set_property("Tracking_1C.pll_bw_narrow_hz", "20.0"); - config->set_property("Tracking_1C.dll_bw_narrow_hz", "2.0"); - config->set_property("Tracking_1C.early_late_space_narrow_chips", "0.5"); config->set_property("Tracking_1C.unified", "true"); - config->set_property("Tracking_1C.extend_correlation_ms", "1"); config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); } @@ -395,7 +391,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) true_obs_data.restart(); std::cout << "Initial Doppler [Hz]=" << true_obs_data.doppler_l1_hz << " Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << std::endl; - gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * baseband_sampling_freq * GPS_L1_CA_CODE_PERIOD; + gnss_synchro.Acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD; gnss_synchro.Acq_doppler_hz = true_obs_data.doppler_l1_hz; gnss_synchro.Acq_samplestamp_samples = 0;