1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-01 09:23:15 +00:00

Add IGM01, IGM02, IGM03 and IGM05 messages to the Rtcm_Printer

This commit is contained in:
Carles Fernandez 2021-11-12 17:01:29 +01:00
parent c49e7184e6
commit 1e19fd9aff
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 86 additions and 2 deletions

View File

@ -1462,6 +1462,40 @@ void Rtcm_Printer::Print_Rtcm_Messages(const Rtklib_Solver* pvt_solver,
}
void Rtcm_Printer::Print_IGM_Messages(const Galileo_HAS_data& has_data)
{
try
{
if (has_data.header.orbit_correction_flag && has_data.header.clock_fullset_flag)
{
Print_IGM03(has_data);
}
if (has_data.header.orbit_correction_flag && !has_data.header.clock_fullset_flag)
{
Print_IGM01(has_data);
}
if (!has_data.header.orbit_correction_flag && has_data.header.clock_fullset_flag)
{
Print_IGM02(has_data);
}
if (has_data.header.code_bias_flag)
{
Print_IGM05(has_data);
}
}
catch (const boost::exception& ex)
{
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << '\n';
LOG(ERROR) << "RTCM boost exception: " << boost::diagnostic_information(ex);
}
catch (const std::exception& ex)
{
std::cout << "RTCM std exception: " << ex.what() << '\n';
LOG(ERROR) << "RTCM std exception: " << ex.what();
}
}
bool Rtcm_Printer::Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
{
const std::string m1001 = rtcm->print_MT1001(gps_eph, obs_time, observables, station_id);
@ -1601,7 +1635,7 @@ bool Rtcm_Printer::Print_Rtcm_MSM(uint32_t msm_number, const Gps_Ephemeris& gps_
}
bool Rtcm_Printer::Print_Rtcm_IGM01(const Galileo_HAS_data& has_data)
bool Rtcm_Printer::Print_IGM01(const Galileo_HAS_data& has_data)
{
const std::vector<std::string> msgs = rtcm->print_IGM01(has_data);
if (msgs.empty())
@ -1616,6 +1650,51 @@ bool Rtcm_Printer::Print_Rtcm_IGM01(const Galileo_HAS_data& has_data)
}
bool Rtcm_Printer::Print_IGM02(const Galileo_HAS_data& has_data)
{
const std::vector<std::string> msgs = rtcm->print_IGM02(has_data);
if (msgs.empty())
{
return false;
}
for (const auto& s : msgs)
{
Rtcm_Printer::Print_Message(s);
}
return true;
}
bool Rtcm_Printer::Print_IGM03(const Galileo_HAS_data& has_data)
{
const std::vector<std::string> msgs = rtcm->print_IGM03(has_data);
if (msgs.empty())
{
return false;
}
for (const auto& s : msgs)
{
Rtcm_Printer::Print_Message(s);
}
return true;
}
bool Rtcm_Printer::Print_IGM05(const Galileo_HAS_data& has_data)
{
const std::vector<std::string> msgs = rtcm->print_IGM05(has_data);
if (msgs.empty())
{
return false;
}
for (const auto& s : msgs)
{
Rtcm_Printer::Print_Message(s);
}
return true;
}
int Rtcm_Printer::init_serial(const std::string& serial_device)
{
/*

View File

@ -99,6 +99,8 @@ public:
*/
uint32_t lock_time(const Glonass_Gnav_Ephemeris& eph, double obs_time, const Gnss_Synchro& gnss_synchro);
void Print_IGM_Messages(const Galileo_HAS_data& has_data);
std::string print_MT1005_test(); //!< For testing purposes
private:
@ -179,7 +181,10 @@ private:
bool divergence_free,
bool more_messages);
bool Print_Rtcm_IGM01(const Galileo_HAS_data& has_data); // SSR Orbit Corrections
bool Print_IGM01(const Galileo_HAS_data& has_data); // SSR Orbit Corrections
bool Print_IGM02(const Galileo_HAS_data& has_data); // SSR Clock Corrections
bool Print_IGM03(const Galileo_HAS_data& has_data); // SSR Combined Orbit & Clock Corrections
bool Print_IGM05(const Galileo_HAS_data& has_data); // SSR Bias Corrections
int32_t init_serial(const std::string& serial_device); // serial port control
void close_serial() const;