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
f5248437
Commit
f5248437
authored
5 years ago
by
Pep Martí Saumell
Browse files
Options
Downloads
Patches
Plain Diff
[ublox] new data notifiers
parent
10a3a2b6
No related branches found
Branches containing commit
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/ublox_raw.h
+8
-2
8 additions, 2 deletions
include/gnss_utils/ublox_raw.h
src/ublox_raw.cpp
+18
-2
18 additions, 2 deletions
src/ublox_raw.cpp
with
26 additions
and
4 deletions
include/gnss_utils/ublox_raw.h
+
8
−
2
View file @
f5248437
...
@@ -14,8 +14,11 @@ class UBloxRaw
...
@@ -14,8 +14,11 @@ class UBloxRaw
int
addDataStream
(
const
std
::
vector
<
u_int8_t
>&
data_stream
);
int
addDataStream
(
const
std
::
vector
<
u_int8_t
>&
data_stream
);
const
Observations
&
getObservations
()
const
;
Observations
getObservations
();
const
Navigation
&
getNavigation
()
const
;
Navigation
getNavigation
();
inline
bool
newObsData
(){
return
new_obs_
;};
inline
bool
newNavData
(){
return
new_nav_
;};
private
:
private
:
raw_t
raw_data_
;
raw_t
raw_data_
;
...
@@ -23,6 +26,9 @@ class UBloxRaw
...
@@ -23,6 +26,9 @@ class UBloxRaw
Observations
obs_
;
Observations
obs_
;
Navigation
nav_
;
Navigation
nav_
;
bool
new_obs_
;
bool
new_nav_
;
void
updateObservations
();
void
updateObservations
();
};
};
...
...
This diff is collapsed.
Click to expand it.
src/ublox_raw.cpp
+
18
−
2
View file @
f5248437
...
@@ -9,6 +9,9 @@ UBloxRaw::UBloxRaw()
...
@@ -9,6 +9,9 @@ UBloxRaw::UBloxRaw()
assert
(
"Failed when allocating memory for raw_t"
);
assert
(
"Failed when allocating memory for raw_t"
);
return
;
return
;
}
}
new_obs_
=
false
;
new_nav_
=
false
;
};
};
UBloxRaw
::~
UBloxRaw
(){};
UBloxRaw
::~
UBloxRaw
(){};
...
@@ -26,6 +29,7 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
...
@@ -26,6 +29,7 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
{
{
case
1
:
case
1
:
updateObservations
();
updateObservations
();
new_obs_
=
true
;
break
;
break
;
case
2
:
case
2
:
// Ephemeris
// Ephemeris
...
@@ -35,6 +39,7 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
...
@@ -35,6 +39,7 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
nav_
.
addEphemeris
(
*
(
raw_data_
.
nav
.
eph
));
nav_
.
addEphemeris
(
*
(
raw_data_
.
nav
.
eph
));
nav_
.
addGLONASSEphemeris
(
*
(
raw_data_
.
nav
.
geph
));
nav_
.
addGLONASSEphemeris
(
*
(
raw_data_
.
nav
.
geph
));
nav_
.
addSBASEphemeris
(
*
(
raw_data_
.
nav
.
seph
));
nav_
.
addSBASEphemeris
(
*
(
raw_data_
.
nav
.
seph
));
new_nav_
=
true
;
break
;
break
;
case
3
:
case
3
:
// SBAS
// SBAS
...
@@ -45,19 +50,30 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
...
@@ -45,19 +50,30 @@ int UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
nav_
.
addGLONASSEphemeris
(
*
(
raw_data_
.
nav
.
geph
));
nav_
.
addGLONASSEphemeris
(
*
(
raw_data_
.
nav
.
geph
));
nav_
.
addSBASEphemeris
(
*
(
raw_data_
.
nav
.
seph
));
nav_
.
addSBASEphemeris
(
*
(
raw_data_
.
nav
.
seph
));
updateObservations
();
updateObservations
();
new_obs_
=
true
;
new_nav_
=
true
;
break
;
break
;
case
9
:
case
9
:
// Almanac
// Almanac
nav_
.
clearAlmanac
();
nav_
.
clearAlmanac
();
nav_
.
addAlmanac
(
*
(
raw_data_
.
nav
.
alm
));
nav_
.
addAlmanac
(
*
(
raw_data_
.
nav
.
alm
));
new_nav_
=
true
;
break
;
break
;
}
}
return
update_type
;
return
update_type
;
}
}
const
Observations
&
UBloxRaw
::
getObservations
()
const
{
return
obs_
;}
Observations
UBloxRaw
::
getObservations
()
const
Navigation
&
UBloxRaw
::
getNavigation
()
const
{
return
nav_
;}
{
new_obs_
=
false
;
return
obs_
;
}
Navigation
UBloxRaw
::
getNavigation
()
{
new_nav_
=
false
;
return
nav_
;
}
void
UBloxRaw
::
updateObservations
()
void
UBloxRaw
::
updateObservations
()
{
{
...
...
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