1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00

Fix Galileo time when reading from XML ephemeris

This commit is contained in:
Carles Fernandez 2022-06-02 21:51:06 +02:00
parent cfa7a4af48
commit fa55a5b0b6
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 14 additions and 0 deletions

View File

@ -651,6 +651,11 @@ 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 full GPS week number
for (auto& gal_eph_iter : d_internal_pvt_solver->galileo_ephemeris_map)
{
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";
} }
@ -2049,6 +2054,10 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
store_valid_observable = true; store_valid_observable = true;
} }
} }
if (std::string(in[i][epoch].Signal) == std::string("E6"))
{
store_valid_observable = true;
}
if (store_valid_observable) if (store_valid_observable)
{ {

View File

@ -414,6 +414,11 @@ 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 full GPS week number
for (auto& gal_eph_iter : this->gal_ephemeris_map)
{
gal_eph_iter.second.WN -= 1024;
}
} }
catch (std::exception& e) catch (std::exception& e)
{ {