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
3a959a6a
Commit
3a959a6a
authored
6 years ago
by
Pep Martí Saumell
Browse files
Options
Downloads
Patches
Plain Diff
Receiver: Navigation and Observation attributes
parent
1faefa4d
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Resolve "Enable Standard Point Positioning (SPP) computation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/gnss_utils.h
+11
-25
11 additions, 25 deletions
include/gnss_utils.h
src/gnss_utils.cpp
+11
-41
11 additions, 41 deletions
src/gnss_utils.cpp
with
22 additions
and
66 deletions
include/gnss_utils.h
+
11
−
25
View file @
3a959a6a
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
#include
<vector>
#include
<vector>
#include
<iostream>
#include
<iostream>
#include
<memory>
#include
<memory>
#include
"observations.h"
#include
"navigation.h"
extern
"C"
extern
"C"
{
{
...
@@ -15,32 +17,16 @@ namespace GNSSUtils
...
@@ -15,32 +17,16 @@ namespace GNSSUtils
class
Receiver
class
Receiver
{
{
public:
public:
// Public objects
// Constructor & Destructor
// Constructor & Destructor
Receiver
();
Receiver
();
~
Receiver
();
~
Receiver
();
// Public objects
// Public methods
// Public methods
const
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
getObs
();
const
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
getNav
();
/* - Observations - */
void
clearObservations
();
void
pushObservation
(
obsd_t
obs
);
std
::
vector
<
obsd_t
>
getObservations
();
/* - Navigation - */
void
clearNavigation
();
void
setNavigation
(
nav_t
nav
);
nav_t
getNavigation
();
/* - Processing Options - */
/* - Processing Options - */
...
@@ -73,13 +59,13 @@ namespace GNSSUtils
...
@@ -73,13 +59,13 @@ namespace GNSSUtils
int
computeSPP
(
double
*
azel
,
char
*
msg
);
int
computeSPP
(
double
*
azel
,
char
*
msg
);
pr
ivate
:
pr
otected
:
// Private objects
// Private objects
//
rtklib-like
attribute to represent the different observation msgs for a given epoch
//
GNSSUtils::Observation
attribute to represent the different observation msgs for a given epoch
std
::
vector
<
obsd_t
>
_
obs
Vector
;
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
obs
_ptr_
;
//
rtklib-like
attribute to represent the different navigation msgs for a given epoch
//
GNSSUtils::Navigation
attribute to represent the different navigation msgs for a given epoch
nav_t
_nav
;
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
nav_ptr_
;
// rtklib-like attribute to represent the different options for a given epoch
// rtklib-like attribute to represent the different options for a given epoch
prcopt_t
_opt
;
prcopt_t
_opt
;
...
...
This diff is collapsed.
Click to expand it.
src/gnss_utils.cpp
+
11
−
41
View file @
3a959a6a
...
@@ -6,7 +6,8 @@ using namespace GNSSUtils;
...
@@ -6,7 +6,8 @@ using namespace GNSSUtils;
Receiver
::
Receiver
()
Receiver
::
Receiver
()
{
{
obs_ptr_
=
std
::
make_shared
<
GNSSUtils
::
Observations
>
();
nav_ptr_
=
std
::
make_shared
<
GNSSUtils
::
Navigation
>
();
}
}
Receiver
::~
Receiver
()
Receiver
::~
Receiver
()
...
@@ -14,43 +15,16 @@ Receiver::~Receiver()
...
@@ -14,43 +15,16 @@ Receiver::~Receiver()
}
}
const
std
::
shared_ptr
<
GNSSUtils
::
Observations
>
Receiver
::
getObs
()
/* - Observation - */
void
Receiver
::
clearObservations
()
{
_obsVector
.
clear
();
}
void
Receiver
::
pushObservation
(
obsd_t
obs
)
{
_obsVector
.
push_back
(
obs
);
}
std
::
vector
<
obsd_t
>
Receiver
::
getObservations
()
{
return
this
->
_obsVector
;
}
/* - Navigation - */
void
Receiver
::
clearNavigation
()
{
//_nav = NULL;
}
void
Receiver
::
setNavigation
(
nav_t
nav
)
{
{
_nav
=
nav
;
return
obs_ptr_
;
}
}
nav_t
Receiver
::
getNav
igation
()
const
std
::
shared_ptr
<
GNSSUtils
::
Navigation
>
Receiver
::
getNav
()
{
{
return
this
->
_nav
;
return
nav_ptr_
;
}
}
/* - Processing options - */
/* - Processing options - */
void
Receiver
::
clearOptions
()
void
Receiver
::
clearOptions
()
...
@@ -109,20 +83,16 @@ ssat_t Receiver::getSatStatus()
...
@@ -109,20 +83,16 @@ ssat_t Receiver::getSatStatus()
int
Receiver
::
computeSPP
(
double
*
azel
,
char
*
msg
)
int
Receiver
::
computeSPP
(
double
*
azel
,
char
*
msg
)
{
{
/*
const obsd_t *obs = &this->_obsVector[0];
const obsd_t *obs = &this->_obsVector[0];
int n = this->_obsVector.size();
int n = this->_obsVector.size();
/*
const nav_t *nav = this->_nav;
const nav_t *nav = this->_nav;
const prcopt_t *opt = this->_opt;
const prcopt_t *opt = this->_opt;
sol_t *sol = this->_sol;
sol_t *sol = this->_sol;
ssat_t *ssat = this->_ssat;
ssat_t *ssat = this->_ssat;
*/
*/
return
pntpos
(
obs
,
n
,
&
_nav
,
&
_opt
,
&
_sol
,
azel
,
&
_ssat
,
msg
);
}
// return pntpos(obs, n, &_nav, &_opt, &_sol, azel, &_ssat, msg);
return
0
;
}
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