1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-18 21:23:02 +00:00

Fix RTCM messages in the presence of E6 observables

This commit is contained in:
Carles Fernandez 2022-09-16 11:27:56 +02:00
parent 8a9c28f0a0
commit 0d393dcc7e
2 changed files with 52 additions and 2 deletions

View File

@ -3994,6 +3994,8 @@ std::map<std::string, int> Rtcm::galileo_signal_map = [] {
galileo_signal_map_["5I"] = 22; galileo_signal_map_["5I"] = 22;
galileo_signal_map_["5Q"] = 23; galileo_signal_map_["5Q"] = 23;
galileo_signal_map_["5X"] = 24; galileo_signal_map_["5X"] = 24;
galileo_signal_map_["E6"] = 10;
return galileo_signal_map_; return galileo_signal_map_;
}(); }();

View File

@ -781,18 +781,38 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
Print_Rtcm_MT1019(gps_eph_iter.second); Print_Rtcm_MT1019(gps_eph_iter.second);
} }
} }
if (rtcm_MT1045_rate_ms != 0)
{
for (const auto& gal_eph_iter : pvt_solver->galileo_ephemeris_map)
{
Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin(); auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
int gal_channel = 0;
int gps_channel = 0; int gps_channel = 0;
for (const auto& gnss_observables_iter : gnss_observables_map) for (const auto& gnss_observables_iter : gnss_observables_map)
{ {
const std::string system(gnss_observables_iter.second.System, 1); const std::string system(gnss_observables_iter.second.System, 1);
if (gal_channel == 0)
{
if (system == "E")
{
// This is a channel with valid GPS signal
gal_eph_iter = pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
{
gal_channel = 1;
}
}
}
if (gps_channel == 0) if (gps_channel == 0)
{ {
if (system == "G") if (system == "G")
{ {
// This is a channel with valid GPS signal
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN); gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend()) if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
{ {
@ -805,6 +825,10 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
{ {
Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false); Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
} }
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
{
Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
}
} }
break; break;
case 107: // GPS L1 C/A + Galileo E6B (print only GPS data) case 107: // GPS L1 C/A + Galileo E6B (print only GPS data)
@ -1386,18 +1410,38 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
Print_Rtcm_MT1019(gps_eph_iter.second); Print_Rtcm_MT1019(gps_eph_iter.second);
} }
} }
if (rtcm_MT1045_rate_ms != 0)
{
for (const auto& gal_eph_iter : pvt_solver->galileo_ephemeris_map)
{
Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (rtcm_MSM_rate_ms != 0) if (rtcm_MSM_rate_ms != 0)
{ {
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin(); auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
int gal_channel = 0;
int gps_channel = 0; int gps_channel = 0;
for (const auto& gnss_observables_iter : gnss_observables_map) for (const auto& gnss_observables_iter : gnss_observables_map)
{ {
const std::string system(gnss_observables_iter.second.System, 1); const std::string system(gnss_observables_iter.second.System, 1);
if (gal_channel == 0)
{
if (system == "E")
{
// This is a channel with valid GPS signal
gal_eph_iter = pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
{
gal_channel = 1;
}
}
}
if (gps_channel == 0) if (gps_channel == 0)
{ {
if (system == "G") if (system == "G")
{ {
// This is a channel with valid GPS signal
gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN); gps_eph_iter = pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend()) if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
{ {
@ -1410,6 +1454,10 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
{ {
Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false); Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
} }
if (gal_eph_iter != pvt_solver->galileo_ephemeris_map.cend())
{
Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, rx_time, gnss_observables_map, enable_rx_clock_correction, 0, 0, false, false);
}
} }
d_rtcm_writing_started = true; d_rtcm_writing_started = true;
break; break;