1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Revert "Declare more data members private"

This reverts commit 73b6613a3d.
This commit is contained in:
Carles Fernandez 2017-08-16 17:33:29 +02:00
parent 6532e0c57d
commit 6a2fe514d0
4 changed files with 99 additions and 124 deletions

View File

@ -98,7 +98,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
<< "inserted with Toe="<< gps_eph->d_Toe<<" and GPS Week="
<< gps_eph->i_GPS_week;
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->get_gps_ephemeris_map()[gps_eph->i_satellite_PRN] = *gps_eph;
d_ls_pvt->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph;
}
else if(pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_Iono>) )
{
@ -122,7 +122,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
std::shared_ptr<Gps_CNAV_Ephemeris> gps_cnav_ephemeris;
gps_cnav_ephemeris = boost::any_cast<std::shared_ptr<Gps_CNAV_Ephemeris>>(pmt::any_ref(msg));
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->get_gps_cnav_ephemeris_map()[gps_cnav_ephemeris->i_satellite_PRN] = *gps_cnav_ephemeris;
d_ls_pvt->gps_cnav_ephemeris_map[gps_cnav_ephemeris->i_satellite_PRN] = *gps_cnav_ephemeris;
LOG(INFO) << "New GPS CNAV ephemeris record has arrived ";
}
else if(pmt::any_ref(msg).type() == typeid(std::shared_ptr<Gps_CNAV_Iono>) )
@ -153,7 +153,7 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
<< ", GALILEO Week Number =" << galileo_eph->WN_5
<< " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris;
// update/insert new ephemeris record to the global ephemeris map
d_ls_pvt->get_galileo_ephemeris_map()[galileo_eph->i_satellite_PRN] = *galileo_eph;
d_ls_pvt->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph;
}
else if(pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Iono>) )
{
@ -194,9 +194,9 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
}
std::map<int,Gps_Ephemeris> rtklib_pvt_cc::get_GPS_L1_ephemeris_map() const
std::map<int,Gps_Ephemeris> rtklib_pvt_cc::get_GPS_L1_ephemeris_map()
{
return d_ls_pvt->get_gps_ephemeris_map();
return d_ls_pvt->gps_ephemeris_map;
}
@ -337,14 +337,13 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
//save GPS L2CM ephemeris to XML file
std::string file_name = "eph_GPS_L2CM.xml";
if (d_ls_pvt->get_gps_cnav_ephemeris_map().size() > 0)
if (d_ls_pvt->gps_cnav_ephemeris_map.size() > 0)
{
try
{
std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
std::map<int, Gps_CNAV_Ephemeris> eph_map = d_ls_pvt->get_gps_cnav_ephemeris_map();
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->gps_cnav_ephemeris_map);
ofs.close();
LOG(INFO) << "Saved GPS L2CM Ephemeris map data";
}
@ -361,14 +360,13 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
//save GPS L1 CA ephemeris to XML file
file_name = "eph_GPS_L1CA.xml";
if (d_ls_pvt->get_gps_ephemeris_map().size() > 0)
if (d_ls_pvt->gps_ephemeris_map.size() > 0)
{
try
{
std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
std::map<int, Gps_Ephemeris> eph_map = d_ls_pvt->get_gps_ephemeris_map();
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->gps_ephemeris_map);
ofs.close();
LOG(INFO) << "Saved GPS L1 CA Ephemeris map data";
}
@ -385,14 +383,13 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
//save Galileo E1 ephemeris to XML file
file_name = "eph_Galileo_E1.xml";
if (d_ls_pvt->get_galileo_ephemeris_map().size() > 0)
if (d_ls_pvt->galileo_ephemeris_map.size() > 0)
{
try
{
std::ofstream ofs(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs);
std::map<int, Galileo_Ephemeris> eph_map = d_ls_pvt->get_galileo_ephemeris_map();
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", d_ls_pvt->galileo_ephemeris_map);
ofs.close();
LOG(INFO) << "Saved Galileo E1 Ephemeris map data";
}
@ -467,9 +464,9 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if (in[i][epoch].Flag_valid_pseudorange == true)
{
std::map<int,Gps_Ephemeris>::iterator tmp_eph_iter_gps = d_ls_pvt->get_gps_ephemeris_map().find(in[i][epoch].PRN);
std::map<int,Galileo_Ephemeris>::iterator tmp_eph_iter_gal = d_ls_pvt->get_galileo_ephemeris_map().find(in[i][epoch].PRN);
std::map<int,Gps_CNAV_Ephemeris>::iterator tmp_eph_iter_cnav = d_ls_pvt->get_gps_cnav_ephemeris_map().find(in[i][epoch].PRN);
std::map<int,Gps_Ephemeris>::iterator tmp_eph_iter_gps = d_ls_pvt->gps_ephemeris_map.find(in[i][epoch].PRN);
std::map<int,Galileo_Ephemeris>::iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN);
std::map<int,Gps_CNAV_Ephemeris>::iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN);
if(((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0))
|| ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0))
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0))
@ -479,25 +476,25 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
gnss_observables_map.insert(std::pair<int,Gnss_Synchro>(i, in[i][epoch]));
}
if(d_ls_pvt->get_gps_ephemeris_map().size() > 0)
if(d_ls_pvt->gps_ephemeris_map.size() > 0)
{
if(tmp_eph_iter_gps != d_ls_pvt->get_gps_ephemeris_map().end())
if(tmp_eph_iter_gps != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->lock_time(d_ls_pvt->get_gps_ephemeris_map().find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
d_rtcm_printer->lock_time(d_ls_pvt->gps_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
}
}
if(d_ls_pvt->get_galileo_ephemeris_map().size() > 0)
if(d_ls_pvt->galileo_ephemeris_map.size() > 0)
{
if(tmp_eph_iter_gal != d_ls_pvt->get_galileo_ephemeris_map().end())
if(tmp_eph_iter_gal != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->lock_time(d_ls_pvt->get_galileo_ephemeris_map().find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
d_rtcm_printer->lock_time(d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
}
}
if(d_ls_pvt->get_gps_cnav_ephemeris_map().size() > 0)
if(d_ls_pvt->gps_cnav_ephemeris_map.size() > 0)
{
if(tmp_eph_iter_cnav != d_ls_pvt->get_gps_cnav_ephemeris_map().end())
if(tmp_eph_iter_cnav != d_ls_pvt->gps_cnav_ephemeris_map.end())
{
d_rtcm_printer->lock_time(d_ls_pvt->get_gps_cnav_ephemeris_map().find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
d_rtcm_printer->lock_time(d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
}
}
}
@ -627,13 +624,13 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if (!b_rinex_header_written) // & we have utc data in nav message!
{
galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin();
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
gps_cnav_ephemeris_iter = d_ls_pvt->get_gps_cnav_ephemeris_map().begin();
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
if(type_of_rx == 1) // GPS L1 C/A only
{
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time);
rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
@ -643,7 +640,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 2) // GPS L2C only
{
if (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end())
if (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end())
{
rp->rinex_obs_header(rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time);
rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model);
@ -652,7 +649,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 4) // Galileo E1B only
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time);
rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
@ -662,7 +659,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(type_of_rx == 5) // Galileo E5a only
{
std::string signal("5X");
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
@ -672,7 +669,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(type_of_rx == 6) // Galileo E5b only
{
std::string signal("7X");
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
@ -681,7 +678,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
{
if ((gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end()))
if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()))
{
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time);
rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
@ -691,7 +688,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(type_of_rx == 9) // GPS L1 C/A + Galileo E1B
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) && (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
{
std::string gal_signal("1B");
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
@ -701,7 +698,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 10) // GPS L1 C/A + Galileo E5a
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) && (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
{
std::string gal_signal("5X");
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
@ -711,7 +708,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 11) // GPS L1 C/A + Galileo E5b
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) && (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
{
std::string gal_signal("7X");
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
@ -721,7 +718,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 14) // Galileo E1B + Galileo E5a
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) )
{
std::string gal_signal("1B 5X");
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
@ -731,7 +728,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 15) // Galileo E1B + Galileo E5b
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) )
{
std::string gal_signal("1B 7X");
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
@ -746,39 +743,39 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(type_of_rx == 1) // GPS L1 C/A only
{
rp->log_rinex_nav(rp->navFile, d_ls_pvt->get_gps_ephemeris_map());
rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_ephemeris_map);
}
if(type_of_rx == 2) // GPS L2C only
{
rp->log_rinex_nav(rp->navFile, d_ls_pvt->get_gps_cnav_ephemeris_map());
rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_cnav_ephemeris_map);
}
if( (type_of_rx == 4) || (type_of_rx == 5) || (type_of_rx == 6) ) // Galileo
{
rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->get_galileo_ephemeris_map());
rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map);
}
if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
{
rp->log_rinex_nav(rp->navFile, d_ls_pvt->get_gps_cnav_ephemeris_map());
rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_cnav_ephemeris_map);
}
if((type_of_rx == 9) || (type_of_rx == 10) || (type_of_rx == 11)) // GPS L1 C/A + Galileo
{
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->get_gps_ephemeris_map(), d_ls_pvt->get_galileo_ephemeris_map());
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->gps_ephemeris_map, d_ls_pvt->galileo_ephemeris_map);
}
if((type_of_rx == 14) || (type_of_rx == 15)) // Galileo E1B + Galileo E5a
{
rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->get_galileo_ephemeris_map());
rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map);
}
}
galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin();
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
gps_cnav_ephemeris_iter = d_ls_pvt->get_gps_cnav_ephemeris_map().begin();
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
// Log observables into the RINEX file
if(flag_write_RINEX_obs_output)
{
if(type_of_rx == 1) // GPS L1 C/A only
{
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, d_rx_time, gnss_observables_map);
}
@ -791,7 +788,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 2) // GPS L2C only
{
if (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end())
if (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, gnss_observables_map);
}
@ -804,7 +801,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 4) // Galileo E1B only
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, "1B");
}
@ -817,7 +814,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 5) // Galileo E5a only
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, "5X");
}
@ -830,7 +827,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 6) // Galileo E5b only
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, "7X");
}
@ -843,7 +840,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
{
if( (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end()) )
if( (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) )
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gnss_observables_map);
}
@ -856,7 +853,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 9) // GPS L1 C/A + Galileo E1B
{
if ((galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end()) && (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) )
if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map);
}
@ -869,7 +866,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 14) // Galileo E1B + Galileo E5a
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, "1B 5X");
}
@ -882,7 +879,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 15) // Galileo E1B + Galileo E5b
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, "1B 7X");
}
@ -903,7 +900,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(flag_write_RTCM_1019_output == true)
{
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
@ -911,9 +908,9 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(flag_write_RTCM_MSM_output == true)
{
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -923,7 +920,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(flag_write_RTCM_1045_output == true)
{
for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin(); gal_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end(); gal_ephemeris_iter++ )
for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second);
}
@ -931,8 +928,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(flag_write_RTCM_MSM_output == true)
{
std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter;
gal_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin();
if (gal_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -942,7 +939,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(flag_write_RTCM_1019_output == true)
{
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
@ -950,10 +947,10 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(flag_write_RTCM_MSM_output == true)
{
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
gps_cnav_ephemeris_iter = d_ls_pvt->get_gps_cnav_ephemeris_map().begin();
if ((gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end()) )
gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) )
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -963,22 +960,22 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(flag_write_RTCM_1019_output == true)
{
for(gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
}
if(flag_write_RTCM_1045_output == true)
{
for(galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin(); galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end(); galileo_ephemeris_iter++ )
for(galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); galileo_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1045(galileo_ephemeris_iter->second);
}
}
if(flag_write_RTCM_MSM_output == true)
{
//gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().end();
//galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().end();
//gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end();
//galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end();
unsigned int i = 0;
for (gnss_observables_iter = gnss_observables_map.begin(); gnss_observables_iter != gnss_observables_map.end(); gnss_observables_iter++)
{
@ -988,8 +985,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(system.compare("G") == 0)
{
// This is a channel with valid GPS signal
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().find(gnss_observables_iter->second.PRN);
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.find(gnss_observables_iter->second.PRN);
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
gps_channel = i;
}
@ -999,8 +996,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(system.compare("E") == 0)
{
galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().find(gnss_observables_iter->second.PRN);
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN);
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
gal_channel = i;
}
@ -1011,14 +1008,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(flag_write_RTCM_MSM_output == true)
{
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
}
if(flag_write_RTCM_MSM_output == true)
{
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -1031,14 +1028,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(type_of_rx == 1) // GPS L1 C/A
{
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -1047,14 +1044,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if((type_of_rx == 4) || (type_of_rx == 5) || (type_of_rx == 6) || (type_of_rx == 14) || (type_of_rx == 15)) // Galileo
{
for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin(); gal_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end(); gal_ephemeris_iter++ )
for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second);
}
std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin();
std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
if (gal_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -1062,15 +1059,15 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
}
if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
{
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin();
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter = d_ls_pvt->get_gps_cnav_ephemeris_map().begin();
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
if ((gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->get_gps_cnav_ephemeris_map().end()))
if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()))
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
@ -1080,14 +1077,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(d_rtcm_MT1019_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().begin(); gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end(); gps_ephemeris_iter++ )
for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
}
}
if(d_rtcm_MT1045_rate_ms != 0)
{
for(galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().begin(); galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end(); galileo_ephemeris_iter++ )
for(galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); galileo_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1045(galileo_ephemeris_iter->second);
}
@ -1102,8 +1099,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if(system.compare("G") == 0)
{
// This is a channel with valid GPS signal
gps_ephemeris_iter = d_ls_pvt->get_gps_ephemeris_map().find(gnss_observables_iter->second.PRN);
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end())
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.find(gnss_observables_iter->second.PRN);
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
{
gps_channel = i;
}
@ -1113,8 +1110,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
{
if(system.compare("E") == 0)
{
galileo_ephemeris_iter = d_ls_pvt->get_galileo_ephemeris_map().find(gnss_observables_iter->second.PRN);
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end())
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN);
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
gal_channel = i;
}
@ -1123,12 +1120,12 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
i++;
}
if (gps_ephemeris_iter != d_ls_pvt->get_gps_ephemeris_map().end() && (d_rtcm_MT1077_rate_ms != 0))
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end() && (d_rtcm_MT1077_rate_ms != 0))
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}
if (galileo_ephemeris_iter != d_ls_pvt->get_galileo_ephemeris_map().end() && (d_rtcm_MT1097_rate_ms != 0) )
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end() && (d_rtcm_MT1097_rate_ms != 0) )
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
}

View File

@ -168,7 +168,7 @@ public:
*
* It is used to save the assistance data at the receiver shutdown
*/
std::map<int,Gps_Ephemeris> get_GPS_L1_ephemeris_map() const;
std::map<int,Gps_Ephemeris> get_GPS_L1_ephemeris_map();
~rtklib_pvt_cc(); //!< Default destructor

View File

@ -108,24 +108,6 @@ rtklib_solver::~rtklib_solver()
}
std::map<int,Galileo_Ephemeris> rtklib_solver::get_galileo_ephemeris_map() const
{
return galileo_ephemeris_map;
}
std::map<int,Gps_Ephemeris> rtklib_solver::get_gps_ephemeris_map() const
{
return gps_ephemeris_map;
}
std::map<int,Gps_CNAV_Ephemeris> rtklib_solver::get_gps_cnav_ephemeris_map() const
{
return gps_cnav_ephemeris_map;
}
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>::const_iterator gnss_observables_iter;

View File

@ -77,21 +77,15 @@ private:
sol_t pvt_sol;
bool d_flag_dump_enabled;
int d_nchannels; // Number of available channels for positioning
int count_valid_position;
std::map<int,Galileo_Ephemeris> galileo_ephemeris_map;
std::map<int,Gps_Ephemeris> gps_ephemeris_map;
std::map<int,Gps_CNAV_Ephemeris> gps_cnav_ephemeris_map;
public:
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, rtk_t & rtk);
~rtklib_solver();
bool get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_map, double Rx_time, bool flag_averaging);
std::map<int,Galileo_Ephemeris> get_galileo_ephemeris_map() const; //!< Get map storing new Galileo_Ephemeris
std::map<int,Gps_Ephemeris> get_gps_ephemeris_map() const; //!< Get map storing new GPS_Ephemeris
std::map<int,Gps_CNAV_Ephemeris> get_gps_cnav_ephemeris_map() const; //!< Get map storing new GPS_CNAV_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_CNAV_Ephemeris> gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris
Galileo_Utc_Model galileo_utc_model;
Galileo_Iono galileo_iono;
@ -102,6 +96,8 @@ public:
Gps_CNAV_Iono gps_cnav_iono;
Gps_CNAV_Utc_Model gps_cnav_utc_model;
int count_valid_position;
};
#endif