mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Pass map of observables by reference
This commit is contained in:
parent
07113fd89d
commit
6c19437520
@ -93,14 +93,24 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
|||||||
|
|
||||||
|
|
||||||
rtklib_solver::~rtklib_solver()
|
rtklib_solver::~rtklib_solver()
|
||||||
|
{
|
||||||
|
if (d_dump_file.is_open() == true)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
d_dump_file.close();
|
d_dump_file.close();
|
||||||
}
|
}
|
||||||
|
catch(const std::exception & ex)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "Exception in destructor closing the dump file " << ex.what();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging)
|
bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_map, double Rx_time, bool flag_averaging)
|
||||||
{
|
{
|
||||||
std::map<int,Gnss_Synchro>::iterator gnss_observables_iter;
|
std::map<int,Gnss_Synchro>::const_iterator gnss_observables_iter;
|
||||||
std::map<int,Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
std::map<int,Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||||
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
||||||
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
|
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
|
||||||
@ -115,8 +125,8 @@ bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
|||||||
obsd_t obs_data[MAXOBS];
|
obsd_t obs_data[MAXOBS];
|
||||||
eph_t eph_data[MAXOBS];
|
eph_t eph_data[MAXOBS];
|
||||||
|
|
||||||
for(gnss_observables_iter = gnss_observables_map.begin();
|
for(gnss_observables_iter = gnss_observables_map.cbegin();
|
||||||
gnss_observables_iter != gnss_observables_map.end();
|
gnss_observables_iter != gnss_observables_map.cend();
|
||||||
gnss_observables_iter++)
|
gnss_observables_iter++)
|
||||||
{
|
{
|
||||||
switch(gnss_observables_iter->second.System)
|
switch(gnss_observables_iter->second.System)
|
||||||
@ -186,7 +196,6 @@ bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
|||||||
{
|
{
|
||||||
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -71,17 +71,21 @@
|
|||||||
class rtklib_solver : public Pvt_Solution
|
class rtklib_solver : public Pvt_Solution
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
rtk_t rtk_;
|
||||||
|
std::string d_dump_filename;
|
||||||
|
std::ofstream d_dump_file;
|
||||||
|
sol_t pvt_sol;
|
||||||
|
bool d_flag_dump_enabled;
|
||||||
|
int d_nchannels; // Number of available channels for positioning
|
||||||
public:
|
public:
|
||||||
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t & rtk);
|
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t & rtk);
|
||||||
~rtklib_solver();
|
~rtklib_solver();
|
||||||
|
|
||||||
bool get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging);
|
bool get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_map, double Rx_time, bool flag_averaging);
|
||||||
int d_nchannels; //!< Number of available channels for positioning
|
|
||||||
|
|
||||||
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
||||||
std::map<int,Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
std::map<int,Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
||||||
std::map<int,Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map;
|
std::map<int,Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris
|
||||||
|
|
||||||
Galileo_Utc_Model galileo_utc_model;
|
Galileo_Utc_Model galileo_utc_model;
|
||||||
Galileo_Iono galileo_iono;
|
Galileo_Iono galileo_iono;
|
||||||
@ -94,14 +98,6 @@ public:
|
|||||||
Gps_CNAV_Utc_Model gps_cnav_utc_model;
|
Gps_CNAV_Utc_Model gps_cnav_utc_model;
|
||||||
|
|
||||||
int count_valid_position;
|
int count_valid_position;
|
||||||
|
|
||||||
bool d_flag_dump_enabled;
|
|
||||||
|
|
||||||
sol_t pvt_sol;
|
|
||||||
rtk_t rtk_;
|
|
||||||
|
|
||||||
std::string d_dump_filename;
|
|
||||||
std::ofstream d_dump_file;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user