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
6e8e228b
Commit
6e8e228b
authored
5 years ago
by
Pep Martí Saumell
Browse files
Options
Downloads
Patches
Plain Diff
Add option to computePos
parent
7874a467
No related branches found
No related tags found
2 merge requests
!20
new tag
,
!19
new tag
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/gnss_utils/gnss_utils.h
+4
-3
4 additions, 3 deletions
include/gnss_utils/gnss_utils.h
src/gnss_utils.cpp
+17
-16
17 additions, 16 deletions
src/gnss_utils.cpp
with
21 additions
and
19 deletions
include/gnss_utils/gnss_utils.h
+
4
−
3
View file @
6e8e228b
...
...
@@ -19,7 +19,7 @@ extern "C"
namespace
GNSSUtils
{
struct
get
PosOutput
{
struct
fix
PosOutput
{
time_t
time
;
double
sec
;
Eigen
::
Vector3d
pos
;
// position (m)
...
...
@@ -37,8 +37,9 @@ namespace GNSSUtils
Eigen
::
Vector3d
lat_lon
;
// latitude_longitude_altitude
};
GNSSUtils
::
getPosOutput
getPos
(
const
std
::
shared_ptr
<
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
Navigation
>
&
_navigation
);
GNSSUtils
::
fixPosOutput
computePos
(
const
std
::
shared_ptr
<
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
Navigation
>
&
_navigation
,
const
std
::
shared_ptr
<
prcopt_t
>
&
_prcopt
);
Eigen
::
Vector3d
ecefToLatLon
(
const
Eigen
::
Vector3d
&
_ecef
);
}
...
...
This diff is collapsed.
Click to expand it.
src/gnss_utils.cpp
+
17
−
16
View file @
6e8e228b
...
...
@@ -2,36 +2,37 @@
namespace
GNSSUtils
{
GNSSUtils
::
getPosOutput
getPos
(
const
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
&
_navigation
)
GNSSUtils
::
fixPosOutput
computePos
(
const
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
&
_observations
,
const
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
&
_navigation
,
const
std
::
shared_ptr
<
prcopt_t
>
&
_prcopt
)
{
// Remove duplicated satellites
uniqnav
(
&
(
_navigation
->
getNavigation
()));
// Define processing options
prcopt_t
prcopt
=
prcopt_default
;
prcopt
.
mode
=
PMODE_SINGLE
;
prcopt
.
soltype
=
0
;
prcopt
.
nf
=
1
;
prcopt
.
navsys
=
SYS_GPS
;
//prcopt.elmin = 1.05; // 60 degrees = 1.05 rad
prcopt
.
sateph
=
EPHOPT_BRDC
;
prcopt
.
ionoopt
=
IONOOPT_OFF
;
prcopt
.
tropopt
=
TROPOPT_OFF
;
prcopt
.
dynamics
=
0
;
prcopt
.
tidecorr
=
0
;
prcopt
.
sbascorr
=
SBSOPT_FCORR
;
//
prcopt_t prcopt = prcopt_default;
//
prcopt.mode = PMODE_SINGLE;
//
prcopt.soltype = 0;
//
prcopt.nf = 1;
//
prcopt.navsys = SYS_GPS;
//
//prcopt.elmin = 1.05; // 60 degrees = 1.05 rad
//
prcopt.sateph = EPHOPT_BRDC;
//
prcopt.ionoopt = IONOOPT_OFF;
//
prcopt.tropopt = TROPOPT_OFF;
//
prcopt.dynamics = 0;
//
prcopt.tidecorr = 0;
//
prcopt.sbascorr = SBSOPT_FCORR;
// Define error msg
char
msg
[
128
]
=
""
;
GNSSUtils
::
get
PosOutput
output
;
GNSSUtils
::
fix
PosOutput
output
;
sol_t
sol
;
sol
=
{{
0
}};
output
.
pos_stat
=
pntpos
(
&
(
_observations
->
getObservations
()[
0
]),
_observations
->
getObservations
().
size
(),
&
(
_navigation
->
getNavigation
()),
&
prcopt
,
&
sol
,
NULL
,
NULL
,
msg
);
_
prcopt
.
get
()
,
&
sol
,
NULL
,
NULL
,
msg
);
output
.
time
=
sol
.
time
.
time
;
output
.
time
=
sol
.
time
.
sec
;
...
...
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