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
5b7b8bb0
Commit
5b7b8bb0
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
improving tdcp
parent
58c0e8e4
No related branches found
No related tags found
3 merge requests
!20
new tag
,
!19
new tag
,
!17
Resolve "TDCP batch implementation"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tdcp.cpp
+19
-19
19 additions, 19 deletions
src/tdcp.cpp
with
19 additions
and
19 deletions
src/tdcp.cpp
+
19
−
19
View file @
5b7b8bb0
...
@@ -34,8 +34,9 @@ TdcpOutput Tdcp(SnapshotPtr snapshot_r,
...
@@ -34,8 +34,9 @@ TdcpOutput Tdcp(SnapshotPtr snapshot_r,
auto
nav_k
=
snapshot_k
->
getNavigation
();
auto
nav_k
=
snapshot_k
->
getNavigation
();
if
(
tdcp_params
.
tdcp
.
use_old_nav
)
if
(
tdcp_params
.
tdcp
.
use_old_nav
)
{
{
snapshot_k
->
getSatellites
().
clear
();
auto
new_snapshot_k
=
std
::
make_shared
<
Snapshot
>
(
std
::
make_shared
<
Observations
>
(
*
snapshot_k
->
getObservations
()),
snapshot_k
->
setNavigation
(
snapshot_r
->
getNavigation
());
std
::
make_shared
<
Navigation
>
(
*
snapshot_k
->
getNavigation
()));
snapshot_k
=
new_snapshot_k
;
}
}
// COMPUTE SATELLITES POSITION
// COMPUTE SATELLITES POSITION
...
@@ -44,36 +45,35 @@ TdcpOutput Tdcp(SnapshotPtr snapshot_r,
...
@@ -44,36 +45,35 @@ TdcpOutput Tdcp(SnapshotPtr snapshot_r,
if
(
not
snapshot_k
->
satellitesComputed
())
if
(
not
snapshot_k
->
satellitesComputed
())
snapshot_k
->
computeSatellites
(
opt
.
sateph
);
snapshot_k
->
computeSatellites
(
opt
.
sateph
);
// FILTER SATELLITES (ALREADY DISCARDED, CORRUPTED DATA, WRONG POSITION, CONSTELLATION, ELEVATION and SNR)
snapshot_r
->
filterObservations
(
discarded_sats
,
x_r
,
false
,
true
,
opt
);
snapshot_k
->
filterObservations
(
discarded_sats
,
x_r
,
false
,
true
,
opt
);
// COMPUTE RANGES
// COMPUTE RANGES
if
(
not
snapshot_r
->
rangesComputed
())
if
(
not
snapshot_r
->
rangesComputed
())
snapshot_r
->
computeRanges
(
x_r
,
opt
);
snapshot_r
->
computeRanges
(
x_r
,
opt
);
if
(
not
snapshot_k
->
rangesComputed
())
if
(
not
snapshot_k
->
rangesComputed
())
snapshot_k
->
computeRanges
(
x_r
,
opt
);
// the x_r is only used to compute Azels -> corrections
snapshot_k
->
computeRanges
(
x_r
,
opt
);
// the x_r is only used to compute Azels -> corrections
// FILTER SATELLITES (ALREADY DISCARDED, CORRUPTED DATA, WRONG POSITION, CONSTELLATION, ELEVATION and SNR)
snapshot_r
->
filterObservations
(
discarded_sats
,
x_r
,
false
,
true
,
opt
);
snapshot_k
->
filterObservations
(
discarded_sats
,
x_r
,
false
,
true
,
opt
);
// FIND COMMON SATELLITES
// FIND COMMON SATELLITES
std
::
set
<
int
>
common_sats
=
Range
::
findCommonSatellites
(
snapshot_r
->
getRanges
(),
std
::
set
<
int
>
common_sats
=
Range
::
findCommonSatellites
(
snapshot_r
->
getRanges
(),
snapshot_k
->
getRanges
());
snapshot_k
->
getRanges
());
// COMPUTE TDCP
if
(
common_sats
.
empty
())
TdcpOutput
output
=
Tdcp
(
snapshot_r
,
snapshot_k
,
x_r
,
common_sats
,
d_0
,
tdcp_params
);
// UNDO temporary change navigation
if
(
tdcp_params
.
tdcp
.
use_old_nav
)
{
{
snapshot_k
->
setNavigation
(
nav_k
);
TdcpOutput
output
;
snapshot_k
->
computeSatellites
(
opt
.
sateph
);
output
.
success
=
false
;
output
.
msg
=
"No common satellites after filtering observations."
;
return
output
;
}
}
return
output
;
// COMPUTE TDCP
return
Tdcp
(
snapshot_r
,
snapshot_k
,
x_r
,
common_sats
,
d_0
,
tdcp_params
);
}
}
TdcpOutput
Tdcp
(
SnapshotPtr
snapshot_r
,
TdcpOutput
Tdcp
(
SnapshotPtr
snapshot_r
,
...
...
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