From 6dd47336066d41da69352b18bedbb5af28c9df58 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 29 Nov 2018 21:29:21 +0100 Subject: [PATCH] Fix duplicated satellites observables test to not demand true observables file --- .../observables/hybrid_observables_test.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 9422e144a..4883b3c60 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 @@ -1763,8 +1763,11 @@ TEST_F(HybridObservablesTest, ValidationOfResults) } else { - ASSERT_EQ(ReadRinexObs(&true_obs_vec, gnss_synchro_master), true) - << "Failure reading RINEX file"; + if (!FLAGS_duplicated_satellites_test) + { + ASSERT_EQ(ReadRinexObs(&true_obs_vec, gnss_synchro_master), true) + << "Failure reading RINEX file"; + } } //read measured values observables_dump_reader estimated_observables(tracking_ch_vec.size()); @@ -1825,10 +1828,13 @@ TEST_F(HybridObservablesTest, ValidationOfResults) measured_obs_vec.at(n).shed_rows(0, index(0)); } - index = arma::find(measured_obs_vec.at(n).col(0) >= true_obs_vec.at(n)(0, 0), 1, "first"); - if ((index.size() > 0) and (index(0) > 0)) + if (!FLAGS_duplicated_satellites_test) { - measured_obs_vec.at(n).shed_rows(0, index(0)); + index = arma::find(measured_obs_vec.at(n).col(0) >= true_obs_vec.at(n)(0, 0), 1, "first"); + if ((index.size() > 0) and (index(0) > 0)) + { + measured_obs_vec.at(n).shed_rows(0, index(0)); + } } }