Skip to content
Snippets Groups Projects
Commit 3a959a6a authored by Pep Martí Saumell's avatar Pep Martí Saumell
Browse files

Receiver: Navigation and Observation attributes

parent 1faefa4d
No related branches found
No related tags found
1 merge request!2Resolve "Enable Standard Point Positioning (SPP) computation"
......@@ -4,6 +4,8 @@
#include <vector>
#include <iostream>
#include <memory>
#include "observations.h"
#include "navigation.h"
extern "C"
{
......@@ -15,32 +17,16 @@ namespace GNSSUtils
class Receiver
{
public:
// Public objects
// Constructor & Destructor
Receiver();
~Receiver();
// Public objects
// Public methods
/* - Observations - */
void clearObservations();
void pushObservation(obsd_t obs);
std::vector<obsd_t> getObservations();
/* - Navigation - */
void clearNavigation();
void setNavigation(nav_t nav);
nav_t getNavigation();
const std::shared_ptr<GNSSUtils::Observations> getObs();
const std::shared_ptr<GNSSUtils::Navigation> getNav();
/* - Processing Options - */
......@@ -73,13 +59,13 @@ namespace GNSSUtils
int computeSPP(double *azel, char *msg);
private:
protected:
// Private objects
// rtklib-like attribute to represent the different observation msgs for a given epoch
std::vector<obsd_t> _obsVector;
// GNSSUtils::Observation attribute to represent the different observation msgs for a given epoch
std::shared_ptr<GNSSUtils::Observations> obs_ptr_;
// rtklib-like attribute to represent the different navigation msgs for a given epoch
nav_t _nav;
// GNSSUtils::Navigation attribute to represent the different navigation msgs for a given epoch
std::shared_ptr<GNSSUtils::Navigation> nav_ptr_;
// rtklib-like attribute to represent the different options for a given epoch
prcopt_t _opt;
......
......@@ -6,7 +6,8 @@ using namespace GNSSUtils;
Receiver::Receiver()
{
obs_ptr_ = std::make_shared<GNSSUtils::Observations>();
nav_ptr_ = std::make_shared<GNSSUtils::Navigation>();
}
Receiver::~Receiver()
......@@ -14,43 +15,16 @@ Receiver::~Receiver()
}
/* - 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)
const std::shared_ptr<GNSSUtils::Observations> Receiver::getObs()
{
_nav = nav;
return obs_ptr_;
}
nav_t Receiver::getNavigation()
const std::shared_ptr<GNSSUtils::Navigation> Receiver::getNav()
{
return this->_nav;
return nav_ptr_;
}
/* - Processing options - */
void Receiver::clearOptions()
......@@ -109,20 +83,16 @@ ssat_t Receiver::getSatStatus()
int Receiver::computeSPP(double *azel, char *msg)
{
/*
const obsd_t *obs = &this->_obsVector[0];
int n = this->_obsVector.size();
/*
const nav_t *nav = this->_nav;
const prcopt_t *opt = this->_opt;
sol_t *sol = this->_sol;
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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment