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..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 @@ -282,7 +282,16 @@ 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; + 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); @@ -369,6 +378,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; @@ -991,7 +1002,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; }