Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gnss_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
algorithms
gnss_utils
Commits
37b79819
Commit
37b79819
authored
5 years ago
by
Pep Martí Saumell
Browse files
Options
Downloads
Patches
Plain Diff
[test] common observations
parent
ebef2b76
No related branches found
No related tags found
3 merge requests
!20
new tag
,
!19
new tag
,
!6
Resolve "observation_tests"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/gtest_observations.cpp
+19
-2
19 additions, 2 deletions
test/gtest_observations.cpp
with
19 additions
and
2 deletions
test/gtest_observations.cpp
+
19
−
2
View file @
37b79819
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment