From fba6e2eaf729d15fbfb61743ea989f9dfcd37395 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Fri, 17 Dec 2021 11:45:02 +0100 Subject: [PATCH 1/3] set the tolerance of the doppler error to Acquisition.doppler_step in the acquisition performance test --- .../acquisition/acq_performance_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc index ef7fb777c..75807b28a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc @@ -991,7 +991,7 @@ TEST_F(AcquisitionPerformanceTest, ROC) for (int i = 0; i < num_clean_executions - 1; i++) { - if (abs(clean_delay_estimation_error(i)) < 0.5 and abs(clean_doppler_estimation_error(i)) < static_cast(config->property("Acquisition.doppler_step", 1)) / 2.0) + if (abs(clean_delay_estimation_error(i)) < 0.5 and abs(clean_doppler_estimation_error(i)) < static_cast(config->property("Acquisition.doppler_step", 1))) { correctly_detected = correctly_detected + 1.0; } From 36754cc63ff370e41a93cbcaaeeedea73a1d7e50 Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Fri, 17 Dec 2021 15:40:46 +0100 Subject: [PATCH 2/3] fixed the calculation of the number of measurements of the acquisition performance test --- .../acquisition/acq_performance_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc index 75807b28a..fc2c9e2fc 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc @@ -282,7 +282,8 @@ protected: num_thresholds = pfa_vector.size(); - int aux2 = ((generated_signal_duration_s * 900 - (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells)) / (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells)); + // the gnss simulator does not dump the trk observables for the last 100 ms of generated signal + int aux2 = floor((generated_signal_duration_s * ms_per_s - 100) / (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells) - 1); if ((FLAGS_acq_test_num_meas > 0) and (FLAGS_acq_test_num_meas < aux2)) { num_of_measurements = static_cast(FLAGS_acq_test_num_meas); @@ -369,6 +370,8 @@ protected: std::string signal_id; private: + static const uint32_t ms_per_s = 1000; + std::string generator_binary; std::string p1; std::string p2; From 1877d7d4e5ffc9f8b8e58ff32e2854d73f26d2ae Mon Sep 17 00:00:00 2001 From: Marc Majoral <=> Date: Tue, 21 Dec 2021 12:39:41 +0100 Subject: [PATCH 3/3] take into account bit_transition_flag for the calculation of the number of measurements --- .../acquisition/acq_performance_test.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc index fc2c9e2fc..e3bd0268f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc @@ -283,7 +283,15 @@ protected: num_thresholds = pfa_vector.size(); // the gnss simulator does not dump the trk observables for the last 100 ms of generated signal - int aux2 = floor((generated_signal_duration_s * ms_per_s - 100) / (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells) - 1); + int aux2; + if (FLAGS_acq_test_bit_transition_flag) + { + aux2 = floor((generated_signal_duration_s * ms_per_s - 100) / (FLAGS_acq_test_coherent_time_ms * 2.0) - 1); + } + else + { + aux2 = floor((generated_signal_duration_s * ms_per_s - 100) / (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells) - 1); + } if ((FLAGS_acq_test_num_meas > 0) and (FLAGS_acq_test_num_meas < aux2)) { num_of_measurements = static_cast(FLAGS_acq_test_num_meas);