Skip to content
Snippets Groups Projects
Commit 37b79819 authored by Pep Martí Saumell's avatar Pep Martí Saumell
Browse files

[test] common observations

parent ebef2b76
No related branches found
No related tags found
3 merge requests!20new tag,!19new tag,!6Resolve "observation_tests"
......@@ -101,7 +101,6 @@ TEST(ObservationsTest, data)
Observations observations;
observations.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt);
for (int ii = 0; ii < obs.n; ++ii)
{
// We do this check like this because both loading functions load the rinex file and then sort the observations
......@@ -116,13 +115,31 @@ TEST(ObservationsTest, HasSatellite)
Observations observations;
observations.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt);
for (int ii = 0; ii < obs.n; ++ii)
{
ASSERT_TRUE(observations.hasSatellite(obs.data[ii].sat));
}
}
TEST(ObservationsTest, FindCommonObservations)
{
loadRinex();
Observations observations1;
observations1.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt);
Observations observations2(observations1);
Observations common1;
Observations common2;
Observations::findCommonObservations(observations1, observations2, common1, common2);
for (auto obs = common1.getObservations().begin(); obs != common1.getObservations().end(); ++obs)
{
ASSERT_TRUE(equalObservations(common1.getObservationBySat(obs->sat), common2.getObservationBySat(obs->sat)));
}
}
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment