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

Fix RTCM messages for the GPS L1 + Gal E1 + Gal E6 receiver

This commit is contained in:
Carles Fernandez 2022-09-15 13:27:30 +02:00
parent ac690d9f3b
commit b9f2a33fff

View File

@ -791,9 +791,7 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin(); auto gps_eph_iter = pvt_solver->gps_ephemeris_map.cbegin();
auto gal_eph_iter = pvt_solver->galileo_ephemeris_map.cbegin();
int gps_channel = 0; int gps_channel = 0;
int gal_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);
@ -809,26 +807,11 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
} }
} }
} }
if (gal_channel == 0)
{
if (system == "E")
{
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_eph_iter != pvt_solver->gps_ephemeris_map.cend()) if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
{ {
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)
@ -1419,10 +1402,8 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
} }
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 gps_channel = 0; int gps_channel = 0;
int gal_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);
@ -1438,26 +1419,11 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
} }
} }
} }
if (gal_channel == 0)
{
if (system == "E")
{
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_eph_iter != pvt_solver->gps_ephemeris_map.cend()) if (gps_eph_iter != pvt_solver->gps_ephemeris_map.cend())
{ {
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;