1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Fix duplicated satellites observables test to not demand true observables file

This commit is contained in:
Javier Arribas 2018-11-29 21:29:21 +01:00
parent 1302614613
commit 6dd4733606

View File

@ -1762,10 +1762,13 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
}); });
} }
else else
{
if (!FLAGS_duplicated_satellites_test)
{ {
ASSERT_EQ(ReadRinexObs(&true_obs_vec, gnss_synchro_master), true) ASSERT_EQ(ReadRinexObs(&true_obs_vec, gnss_synchro_master), true)
<< "Failure reading RINEX file"; << "Failure reading RINEX file";
} }
}
//read measured values //read measured values
observables_dump_reader estimated_observables(tracking_ch_vec.size()); observables_dump_reader estimated_observables(tracking_ch_vec.size());
ASSERT_NO_THROW({ ASSERT_NO_THROW({
@ -1825,12 +1828,15 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
measured_obs_vec.at(n).shed_rows(0, index(0)); measured_obs_vec.at(n).shed_rows(0, index(0));
} }
if (!FLAGS_duplicated_satellites_test)
{
index = arma::find(measured_obs_vec.at(n).col(0) >= true_obs_vec.at(n)(0, 0), 1, "first"); 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 ((index.size() > 0) and (index(0) > 0))
{ {
measured_obs_vec.at(n).shed_rows(0, index(0)); measured_obs_vec.at(n).shed_rows(0, index(0));
} }
} }
}
if (FLAGS_duplicated_satellites_test) if (FLAGS_duplicated_satellites_test)