1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-31 11:19:18 +00:00

Improve loops

This commit is contained in:
Carles Fernandez 2022-05-25 21:04:44 +02:00
parent 657a7298f3
commit ab40201783
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 6 additions and 10 deletions

View File

@ -651,12 +651,10 @@ rtklib_pvt_gs::~rtklib_pvt_gs()
{ {
ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out); ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
boost::archive::xml_oarchive xml(ofs); boost::archive::xml_oarchive xml(ofs);
// Annotate as GPS week number // Annotate as full GPS week number
for (auto gal_eph_iter = d_internal_pvt_solver->galileo_ephemeris_map.begin(); for (auto& gal_eph_iter : d_internal_pvt_solver->galileo_ephemeris_map)
gal_eph_iter != d_internal_pvt_solver->galileo_ephemeris_map.end();
++gal_eph_iter)
{ {
gal_eph_iter->second.WN += 1024; gal_eph_iter.second.WN += 1024;
} }
xml << boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", d_internal_pvt_solver->galileo_ephemeris_map); xml << boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", d_internal_pvt_solver->galileo_ephemeris_map);
LOG(INFO) << "Saved Galileo E1 Ephemeris map data"; LOG(INFO) << "Saved Galileo E1 Ephemeris map data";

View File

@ -414,12 +414,10 @@ bool Gnss_Sdr_Supl_Client::load_gal_ephemeris_xml(const std::string& file_name)
gal_ephemeris_map.clear(); gal_ephemeris_map.clear();
xml >> boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", this->gal_ephemeris_map); xml >> boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", this->gal_ephemeris_map);
LOG(INFO) << "Loaded Ephemeris map data with " << this->gal_ephemeris_map.size() << " satellites"; LOG(INFO) << "Loaded Ephemeris map data with " << this->gal_ephemeris_map.size() << " satellites";
// Convert to GPS week number // Convert to full GPS week number
for (auto gal_eph_iter = this->gal_ephemeris_map.begin(); for (auto& gal_eph_iter : this->gal_ephemeris_map)
gal_eph_iter != this->gal_ephemeris_map.end();
++gal_eph_iter)
{ {
gal_eph_iter->second.WN -= 1024; gal_eph_iter.second.WN -= 1024;
} }
} }
catch (std::exception& e) catch (std::exception& e)