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
e6fb46fa
Commit
e6fb46fa
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
bug in initialization of arrays and debugs couts removed
parent
c9c4657b
No related branches found
No related tags found
2 merge requests
!20
new tag
,
!19
new tag
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/gnss_utils.cpp
+1
-1
1 addition, 1 deletion
src/gnss_utils.cpp
src/navigation.cpp
+28
-1
28 additions, 1 deletion
src/navigation.cpp
src/ublox_raw.cpp
+8
-7
8 additions, 7 deletions
src/ublox_raw.cpp
with
37 additions
and
9 deletions
src/gnss_utils.cpp
+
1
−
1
View file @
e6fb46fa
...
...
@@ -24,7 +24,7 @@ namespace GNSSUtils
if
(
output
.
pos_stat
==
0
)
{
std
::
cout
<<
"
Bad computing
: "
<<
msg
<<
"
\n
"
;
std
::
cout
<<
"
computePos: error in computing positioning, message
: "
<<
msg
<<
"
\n
"
;
}
output
.
time
=
sol
.
time
.
time
;
...
...
This diff is collapsed.
Click to expand it.
src/navigation.cpp
+
28
−
1
View file @
e6fb46fa
...
...
@@ -4,12 +4,32 @@ using namespace GNSSUtils;
Navigation
::
Navigation
()
{
// initialization
// array initialization
nav_
.
n
=
nav_
.
nmax
=
nav_
.
ng
=
nav_
.
ngmax
=
nav_
.
ns
=
nav_
.
nsmax
=
nav_
.
ne
=
nav_
.
nemax
=
nav_
.
nc
=
nav_
.
ncmax
=
nav_
.
na
=
nav_
.
namax
=
nav_
.
nt
=
nav_
.
ntmax
=
nav_
.
nf
=
nav_
.
nfmax
=
0
;
nav_
.
eph
=
NULL
;
nav_
.
geph
=
NULL
;
nav_
.
seph
=
NULL
;
nav_
.
peph
=
NULL
;
nav_
.
pclk
=
NULL
;
nav_
.
alm
=
NULL
;
nav_
.
tec
=
NULL
;
nav_
.
fcb
=
NULL
;
clearNavigation
();
}
Navigation
::
Navigation
(
const
Navigation
&
nav
)
{
// array initialization
nav_
.
n
=
nav_
.
nmax
=
nav_
.
ng
=
nav_
.
ngmax
=
nav_
.
ns
=
nav_
.
nsmax
=
nav_
.
ne
=
nav_
.
nemax
=
nav_
.
nc
=
nav_
.
ncmax
=
nav_
.
na
=
nav_
.
namax
=
nav_
.
nt
=
nav_
.
ntmax
=
nav_
.
nf
=
nav_
.
nfmax
=
0
;
nav_
.
eph
=
NULL
;
nav_
.
geph
=
NULL
;
nav_
.
seph
=
NULL
;
nav_
.
peph
=
NULL
;
nav_
.
pclk
=
NULL
;
nav_
.
alm
=
NULL
;
nav_
.
tec
=
NULL
;
nav_
.
fcb
=
NULL
;
clearNavigation
();
setNavigation
(
nav
.
getNavigation
());
}
...
...
@@ -225,12 +245,19 @@ void Navigation::freeNavigationArrays()
{
// RTKLIB "freenav(&nav_,255)" doesn't check if is NULL before freeing
freeEphemeris
();
//std::cout << "freeing glonass ephemeris...\n";
freeGlonassEphemeris
();
//std::cout << "freeing sbas ephemeris...\n";
freeSbasEphemeris
();
//std::cout << "freeing precise ephemeris...\n";
freePreciseEphemeris
();
//std::cout << "freeing precise clock...\n";
freePreciseClock
();
//std::cout << "freeing almanac...\n";
freeAlmanac
();
//std::cout << "freeing tec...\n";
freeTecData
();
//std::cout << "freeing fcb...\n";
freeFcbData
();
}
...
...
This diff is collapsed.
Click to expand it.
src/ublox_raw.cpp
+
8
−
7
View file @
e6fb46fa
...
...
@@ -27,34 +27,35 @@ RawDataType UBloxRaw::addDataStream(const std::vector<u_int8_t>& data_stream)
switch
(
raw_data_type_
)
{
case
NO
:
//
//std::cout << "0 received!\n";
break
;
case
OBS
:
// Observations
std
::
cout
<<
"Observations received!
\n
"
;
//
std::cout << "Observations received!\n";
updateObservations
();
std
::
cout
<<
"Observations updated!
\n
"
;
//
std::cout << "Observations updated!\n";
break
;
case
NAV_EPH
:
// Ephemeris
std
::
cout
<<
"Ephemeris received!
\n
"
;
nav_
.
copyEphemeris
(
raw_data_
.
nav
);
std
::
cout
<<
"Ephemeris copied!
\n
"
;
//
std::cout << "Ephemeris copied!\n";
break
;
case
NAV_SBAS
:
// SBAS
std
::
cout
<<
"SBAS received!
\n
"
;
nav_
.
addSbasMessage
(
raw_data_
.
sbsmsg
);
std
::
cout
<<
"SBAS added!
\n
"
;
//
std::cout << "SBAS added!\n";
break
;
case
NAV_ALM
:
// Almanac and ion/utc parameters
std
::
cout
<<
"Almanac and ion/utc parameters received!
\n
"
;
nav_
.
freeAlmanac
();
std
::
cout
<<
"Almanac freed!
\n
"
;
//
std::cout << "Almanac freed!\n";
nav_
.
copyAlmanac
(
raw_data_
.
nav
);
std
::
cout
<<
"Almanac copied!
\n
"
;
//
std::cout << "Almanac copied!\n";
nav_
.
copyIonUtc
(
raw_data_
.
nav
);
std
::
cout
<<
"ION UTC copied!
\n
"
;
//
std::cout << "ION UTC copied!\n";
break
;
// Not handled messages
...
...
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