mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-26 12:04:55 +00:00
Reduce number of warnings raised by bugprone-* clang-tidy checks
This commit is contained in:
@@ -48,10 +48,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
|
||||
{
|
||||
Pvt_Conf pvt_output_parameters = Pvt_Conf();
|
||||
// dump parameters
|
||||
std::string default_dump_filename = "./pvt.dat";
|
||||
std::string default_nmea_dump_filename = "./nmea_pvt.nmea";
|
||||
std::string default_nmea_dump_devname = "/dev/tty1";
|
||||
std::string default_rtcm_dump_devname = "/dev/pts/1";
|
||||
const std::string default_dump_filename("./pvt.dat");
|
||||
const std::string default_nmea_dump_filename("./nmea_pvt.nmea");
|
||||
const std::string default_nmea_dump_devname("/dev/tty1");
|
||||
const std::string default_rtcm_dump_devname("/dev/pts/1");
|
||||
DLOG(INFO) << "role " << role;
|
||||
pvt_output_parameters.dump = configuration->property(role + ".dump", false);
|
||||
pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
@@ -73,27 +73,11 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
|
||||
|
||||
// RINEX version
|
||||
pvt_output_parameters.rinex_version = configuration->property(role + ".rinex_version", 3);
|
||||
if (FLAGS_RINEX_version == "3.01")
|
||||
if (FLAGS_RINEX_version == "3.01" || FLAGS_RINEX_version == "3.02" || FLAGS_RINEX_version == "3")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version == "3.02")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version == "3")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version == "2.11")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 2;
|
||||
}
|
||||
else if (FLAGS_RINEX_version == "2.10")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 2;
|
||||
}
|
||||
else if (FLAGS_RINEX_version == "2")
|
||||
else if (FLAGS_RINEX_version == "2.10" || FLAGS_RINEX_version == "2.11" || FLAGS_RINEX_version == "2")
|
||||
{
|
||||
pvt_output_parameters.rinex_version = 2;
|
||||
}
|
||||
|
||||
@@ -1090,17 +1090,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
switch (d_type_of_rx)
|
||||
{
|
||||
case 1: // GPS L1 C/A only
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_eph);
|
||||
break;
|
||||
case 8: // L1+L5
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_eph);
|
||||
break;
|
||||
case 9: // GPS L1 C/A + Galileo E1B
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 9: // GPS L1 C/A + Galileo E1B
|
||||
case 10: // GPS L1 C/A + Galileo E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 11: // GPS L1 C/A + Galileo E5b
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
@@ -1125,8 +1119,6 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
}
|
||||
break;
|
||||
case 32: // L1+E1+L5+E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 33: // L1+E1+E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
@@ -1201,11 +1193,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
switch (d_type_of_rx)
|
||||
{
|
||||
case 2: // GPS L2C only
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_cnav_eph);
|
||||
break;
|
||||
case 3: // GPS L5 only
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_cnav_eph);
|
||||
break;
|
||||
case 7: // GPS L1 C/A + GPS L2C
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_cnav_eph);
|
||||
break;
|
||||
@@ -1213,8 +1201,6 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_cnav_eph, new_gal_eph);
|
||||
break;
|
||||
case 28: // GPS L2C + GLONASS L1 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_cnav_eph, new_glo_eph);
|
||||
break;
|
||||
case 31: // GPS L2C + GLONASS L2 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_cnav_eph, new_glo_eph);
|
||||
break;
|
||||
@@ -1303,20 +1289,12 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
switch (d_type_of_rx)
|
||||
{
|
||||
case 4: // Galileo E1B only
|
||||
d_rp->log_rinex_nav(d_rp->navGalFile, new_gal_eph);
|
||||
break;
|
||||
case 5: // Galileo E5a only
|
||||
d_rp->log_rinex_nav(d_rp->navGalFile, new_gal_eph);
|
||||
break;
|
||||
case 6: // Galileo E5b only
|
||||
d_rp->log_rinex_nav(d_rp->navGalFile, new_gal_eph);
|
||||
break;
|
||||
case 9: // GPS L1 C/A + Galileo E1B
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 9: // GPS L1 C/A + Galileo E1B
|
||||
case 10: // GPS L1 C/A + Galileo E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 11: // GPS L1 C/A + Galileo E5b
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
@@ -1327,17 +1305,11 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
d_rp->log_rinex_nav(d_rp->navGalFile, new_gal_eph);
|
||||
break;
|
||||
case 27: // Galileo E1B + GLONASS L1 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_gal_eph, new_glo_eph);
|
||||
break;
|
||||
case 30: // Galileo E1B + GLONASS L2 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_gal_eph, new_glo_eph);
|
||||
break;
|
||||
case 32: // L1+E1+L5+E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 33: // L1+E1+E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
case 32: // L1+E1+L5+E5a
|
||||
case 33: // L1+E1+E5a
|
||||
case 1001: // L1+E1+L2+L5+E5a
|
||||
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
|
||||
break;
|
||||
@@ -1463,11 +1435,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
switch (d_type_of_rx)
|
||||
{
|
||||
case 23: // GLONASS L1 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navGloFile, new_glo_eph);
|
||||
break;
|
||||
case 24: // GLONASS L2 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navGloFile, new_glo_eph);
|
||||
break;
|
||||
case 25: // GLONASS L1 C/A + GLONASS L2 C/A
|
||||
d_rp->log_rinex_nav(d_rp->navGloFile, new_glo_eph);
|
||||
break;
|
||||
@@ -1574,8 +1542,6 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
||||
switch (d_type_of_rx)
|
||||
{
|
||||
case 500: // BDS B1I only
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_bds_eph);
|
||||
break;
|
||||
case 600: // BDS B3I only
|
||||
d_rp->log_rinex_nav(d_rp->navFile, new_bds_eph);
|
||||
break;
|
||||
@@ -1830,17 +1796,11 @@ void rtklib_pvt_gs::apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observabl
|
||||
switch (d_mapStringValues[observables_iter->second.Signal])
|
||||
{
|
||||
case evGPS_1C:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * TWO_PI;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5 * TWO_PI;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * TWO_PI;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * TWO_PI;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
case evGAL_5X:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5 * TWO_PI;
|
||||
break;
|
||||
@@ -1932,17 +1892,11 @@ void rtklib_pvt_gs::initialize_and_apply_carrier_phase_offset()
|
||||
switch (d_mapStringValues[observables_iter->second.Signal])
|
||||
{
|
||||
case evGPS_1C:
|
||||
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ1;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ5;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ1;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ1;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
case evGAL_5X:
|
||||
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ5;
|
||||
break;
|
||||
@@ -2688,35 +2642,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
|
||||
break;
|
||||
case 503: // BeiDou B1I + GLONASS L1 C/A
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
// d_rp->rinex_obs_header(d_rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
|
||||
// d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||
// d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->beidou_dnav_ephemeris_map);
|
||||
d_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 504: // BeiDou B1I + GPS L1 C/A + Galileo E1B
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
// d_rp->rinex_obs_header(d_rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
|
||||
// d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||
// d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->beidou_dnav_ephemeris_map);
|
||||
d_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 505: // BeiDou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
// d_rp->rinex_obs_header(d_rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B1");
|
||||
// d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||
// d_rp->log_rinex_nav(d_rp->navFile, d_user_pvt_solver->beidou_dnav_ephemeris_map);
|
||||
d_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 506: // BeiDou B1I + Beidou B3I
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
@@ -2738,23 +2665,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
|
||||
break;
|
||||
case 601: // BeiDou B3I + GPS L2C
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
d_rp->rinex_obs_header(d_rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
|
||||
// d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||
d_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 602: // BeiDou B3I + GLONASS L2 C/A
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
d_rp->rinex_obs_header(d_rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3");
|
||||
// d_rp->rinex_nav_header(d_rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model);
|
||||
d_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
|
||||
break;
|
||||
case 603: // BeiDou B3I + GPS L2C + GLONASS L2 C/A
|
||||
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
|
||||
{
|
||||
@@ -2818,17 +2729,6 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
}
|
||||
break;
|
||||
case 2: // GPS L2C only
|
||||
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||
{
|
||||
d_rp->log_rinex_obs(d_rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time, d_gnss_observables_map);
|
||||
}
|
||||
if (!d_rinex_header_updated and (d_user_pvt_solver->gps_cnav_utc_model.d_A0 != 0))
|
||||
{
|
||||
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->gps_cnav_utc_model);
|
||||
d_rp->update_nav_header(d_rp->navFile, d_user_pvt_solver->gps_cnav_utc_model, d_user_pvt_solver->gps_cnav_iono);
|
||||
d_rinex_header_updated = true;
|
||||
}
|
||||
break;
|
||||
case 3: // GPS L5
|
||||
if (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||
{
|
||||
|
||||
@@ -379,15 +379,10 @@ std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_
|
||||
std::stringstream sentence_str;
|
||||
|
||||
boost::posix_time::time_duration td = d_position_UTC_time.time_of_day();
|
||||
int utc_hours;
|
||||
int utc_mins;
|
||||
int utc_seconds;
|
||||
int utc_milliseconds;
|
||||
|
||||
utc_hours = td.hours();
|
||||
utc_mins = td.minutes();
|
||||
utc_seconds = td.seconds();
|
||||
utc_milliseconds = td.total_milliseconds() - td.total_seconds() * 1000;
|
||||
int utc_hours = td.hours();
|
||||
int utc_mins = td.minutes();
|
||||
int utc_seconds = td.seconds();
|
||||
auto utc_milliseconds = static_cast<int>(td.total_milliseconds() - td.total_seconds() * 1000);
|
||||
|
||||
if (utc_hours < 10)
|
||||
{
|
||||
|
||||
@@ -916,7 +916,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& gali
|
||||
{
|
||||
} // Avoid compiler warning
|
||||
// Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
if (galileo_utc_model.A_0G_10)
|
||||
if (galileo_utc_model.A_0G_10 > 0.0)
|
||||
{
|
||||
}
|
||||
std::string line;
|
||||
@@ -1884,7 +1884,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
|
||||
// -------- Line 6 leap seconds
|
||||
// For leap second information, see https://endruntechnologies.com/support/leap-seconds
|
||||
line.clear();
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
@@ -2282,7 +2282,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_M
|
||||
// -------- Line 6 leap seconds
|
||||
// For leap second information, see https://endruntechnologies.com/support/leap-seconds
|
||||
line.clear();
|
||||
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.d_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.i_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.d_DeltaT_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(bds_dnav_utc_model.i_DN), 6);
|
||||
@@ -3504,7 +3504,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal
|
||||
{
|
||||
} // Avoid compiler warning
|
||||
// Avoid compiler warning, there is not time system correction between Galileo and GLONASS
|
||||
if (galileo_utc_model.A_0G_10)
|
||||
if (galileo_utc_model.A_0G_10 > 0.0)
|
||||
{
|
||||
}
|
||||
std::vector<std::string> data;
|
||||
@@ -3655,7 +3655,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
}
|
||||
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
@@ -4838,7 +4838,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Bei
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& glonass_bands)
|
||||
{
|
||||
if (eph.d_m)
|
||||
if (eph.d_m > 0.0)
|
||||
{
|
||||
} // Avoid compiler warning
|
||||
std::string line;
|
||||
@@ -5171,7 +5171,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -5527,7 +5527,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -5847,7 +5847,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& galileo_bands, const std::string& glonass_bands)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -6679,7 +6679,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation, const std::string& gps_bands)
|
||||
{
|
||||
if (eph_cnav.d_i_0)
|
||||
if (eph_cnav.d_i_0 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -7890,7 +7890,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& galileo_bands)
|
||||
{
|
||||
if (galileo_eph.e_1)
|
||||
if (galileo_eph.e_1 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -8415,7 +8415,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Beidou_Dnav_Epheme
|
||||
|
||||
void Rinex_Printer::update_obs_header(std::fstream& out __attribute__((unused)), const Glonass_Gnav_Utc_Model& utc_model)
|
||||
{
|
||||
if (utc_model.d_N_4)
|
||||
if (utc_model.d_N_4 > 0.0)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
@@ -8644,7 +8644,7 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
if (line_str.find("TIME OF FIRST OBS", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
@@ -8940,7 +8940,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -9285,7 +9285,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -9543,7 +9543,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double galileo_obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
if (glonass_gnav_eph.d_m)
|
||||
if (glonass_gnav_eph.d_m > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -10176,7 +10176,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band)
|
||||
{
|
||||
if (eph_cnav.d_i_0)
|
||||
if (eph_cnav.d_i_0 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
// RINEX observations timestamps are GPS timestamps.
|
||||
@@ -10658,7 +10658,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
if (galileo_eph.e_1)
|
||||
if (galileo_eph.e_1 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -10930,7 +10930,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables)
|
||||
{
|
||||
if (galileo_eph.e_1)
|
||||
if (galileo_eph.e_1 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
@@ -11224,10 +11224,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band)
|
||||
{
|
||||
if (galileo_eph.e_1)
|
||||
if (galileo_eph.e_1 > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
if (gps_cnav_eph.d_e_eccentricity)
|
||||
if (gps_cnav_eph.d_e_eccentricity > 0.0)
|
||||
{
|
||||
} // avoid warning, not needed
|
||||
std::string line;
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#include "GPS_L2C.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "Galileo_E5b.h"
|
||||
#include "Galileo_FNAV.h"
|
||||
#include "Galileo_INAV.h"
|
||||
#include <boost/algorithm/string.hpp> // for to_upper_copy
|
||||
#include <boost/crc.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
@@ -1896,7 +1899,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
glonass_gnav_eph.d_B_n = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
|
||||
glonass_gnav_eph.d_P_2 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
glonass_gnav_eph.d_P_2 = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
|
||||
glonass_gnav_eph.d_t_b = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 7))) * 15 * 60.0;
|
||||
@@ -1930,7 +1933,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
glonass_gnav_eph.d_AZn = static_cast<double>(Rtcm::bin_to_sint(message_bin.substr(index, 5))) * TWO_N30;
|
||||
index += 5;
|
||||
|
||||
glonass_gnav_eph.d_P_3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
glonass_gnav_eph.d_P_3 = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
|
||||
glonass_gnav_eph.d_gamma_n = static_cast<double>(Rtcm::bin_to_sint(message_bin.substr(index, 11))) * TWO_N30;
|
||||
@@ -1939,7 +1942,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
glonass_gnav_eph.d_P = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 2)));
|
||||
index += 2;
|
||||
|
||||
glonass_gnav_eph.d_l3rd_n = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
glonass_gnav_eph.d_l3rd_n = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
|
||||
glonass_gnav_eph.d_tau_n = static_cast<double>(Rtcm::bin_to_sint(message_bin.substr(index, 22))) * TWO_N30;
|
||||
@@ -1951,7 +1954,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
glonass_gnav_eph.d_E_n = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 5)));
|
||||
index += 5;
|
||||
|
||||
glonass_gnav_eph.d_P_4 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
glonass_gnav_eph.d_P_4 = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
index += 1;
|
||||
|
||||
glonass_gnav_eph.d_F_T = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 4)));
|
||||
@@ -2007,12 +2010,7 @@ std::string Rtcm::print_MT1029(uint32_t ref_id, const Gps_Ephemeris& gps_eph, do
|
||||
std::string text_binary;
|
||||
for (char c : message)
|
||||
{
|
||||
if (isgraph(c))
|
||||
{
|
||||
i++;
|
||||
first = true;
|
||||
}
|
||||
else if (c == ' ')
|
||||
if (isgraph(c) || c == ' ')
|
||||
{
|
||||
i++;
|
||||
first = true;
|
||||
@@ -4529,14 +4527,14 @@ int32_t Rtcm::set_DF107(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF108(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
DF108 = std::bitset<1>(glonass_gnav_eph.d_B_n);
|
||||
DF108 = std::bitset<1>(static_cast<bool>(glonass_gnav_eph.d_B_n));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32_t Rtcm::set_DF109(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
DF109 = std::bitset<1>(glonass_gnav_eph.d_P_2);
|
||||
DF109 = std::bitset<1>(static_cast<bool>(glonass_gnav_eph.d_P_2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5289,11 +5287,7 @@ int32_t Rtcm::set_DF397(const Gnss_Synchro& gnss_synchro)
|
||||
|
||||
uint32_t int_ms = 0;
|
||||
|
||||
if (rough_range_s == 0.0)
|
||||
{
|
||||
int_ms = 255;
|
||||
}
|
||||
else if ((rough_range_s < 0.0) || (rough_range_s > meters_to_miliseconds * 255.0))
|
||||
if (rough_range_s == 0.0 || ((rough_range_s < 0.0) || (rough_range_s > meters_to_miliseconds * 255.0)))
|
||||
{
|
||||
int_ms = 255;
|
||||
}
|
||||
@@ -5349,7 +5343,7 @@ int32_t Rtcm::set_DF399(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
if (sig == "7X")
|
||||
{
|
||||
lambda = SPEED_OF_LIGHT_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
|
||||
lambda = SPEED_OF_LIGHT_M_S / GALILEO_E5B_FREQ_HZ;
|
||||
}
|
||||
|
||||
double rough_phase_range_rate_ms = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda);
|
||||
@@ -5376,11 +5370,7 @@ int32_t Rtcm::set_DF400(const Gnss_Synchro& gnss_synchro)
|
||||
|
||||
psrng_s = gnss_synchro.Pseudorange_m - rough_range_m;
|
||||
|
||||
if (psrng_s == 0)
|
||||
{
|
||||
fine_pseudorange = -16384;
|
||||
}
|
||||
else if (std::fabs(psrng_s) > 292.7)
|
||||
if (psrng_s == 0 || (std::fabs(psrng_s) > 292.7))
|
||||
{
|
||||
fine_pseudorange = -16384; // 4000h: invalid value
|
||||
}
|
||||
@@ -5424,7 +5414,7 @@ int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
if ((sig == "7X") && (sys == "E"))
|
||||
{
|
||||
lambda = SPEED_OF_LIGHT_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
|
||||
lambda = SPEED_OF_LIGHT_M_S / GALILEO_E5B_FREQ_HZ;
|
||||
}
|
||||
if ((sig == "1C") && (sys == "R"))
|
||||
{
|
||||
@@ -5447,11 +5437,7 @@ int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
phrng_m -= cp;
|
||||
|
||||
if (phrng_m == 0.0)
|
||||
{
|
||||
fine_phaserange = -2097152;
|
||||
}
|
||||
else if (std::fabs(phrng_m) > 1171.0)
|
||||
if (phrng_m == 0.0 || (std::fabs(phrng_m) > 1171.0))
|
||||
{
|
||||
fine_phaserange = -2097152;
|
||||
}
|
||||
@@ -5484,11 +5470,7 @@ int32_t Rtcm::set_DF402(const Gps_Ephemeris& ephNAV, const Gps_CNAV_Ephemeris& e
|
||||
{
|
||||
lock_time_period_s = Rtcm::lock_time(ephFNAV, obs_time, gnss_synchro);
|
||||
}
|
||||
if ((sig_ == "1C") && (sys == "R"))
|
||||
{
|
||||
lock_time_period_s = Rtcm::lock_time(ephGNAV, obs_time, gnss_synchro);
|
||||
}
|
||||
if ((sig_ == "2C") && (sys == "R"))
|
||||
if (((sig_ == "1C") && (sys == "R")) || ((sig_ == "2C") && (sys == "R")))
|
||||
{
|
||||
lock_time_period_s = Rtcm::lock_time(ephGNAV, obs_time, gnss_synchro);
|
||||
}
|
||||
@@ -5533,7 +5515,7 @@ int32_t Rtcm::set_DF404(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
if ((sig_ == "7X") && (sys_ == "E"))
|
||||
{
|
||||
lambda = SPEED_OF_LIGHT_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
|
||||
lambda = SPEED_OF_LIGHT_M_S / GALILEO_E5B_FREQ_HZ;
|
||||
}
|
||||
if ((sig_ == "1C") && (sys_ == "R"))
|
||||
{
|
||||
@@ -5547,11 +5529,7 @@ int32_t Rtcm::set_DF404(const Gnss_Synchro& gnss_synchro)
|
||||
double rough_phase_range_rate = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda);
|
||||
double phrr = (-gnss_synchro.Carrier_Doppler_hz * lambda - rough_phase_range_rate);
|
||||
|
||||
if (phrr == 0.0)
|
||||
{
|
||||
fine_phaserange_rate = -16384;
|
||||
}
|
||||
else if (std::fabs(phrr) > 1.6384)
|
||||
if (phrr == 0.0 || (std::fabs(phrr) > 1.6384))
|
||||
{
|
||||
fine_phaserange_rate = -16384;
|
||||
}
|
||||
@@ -5574,11 +5552,7 @@ int32_t Rtcm::set_DF405(const Gnss_Synchro& gnss_synchro)
|
||||
|
||||
psrng_s = gnss_synchro.Pseudorange_m - rough_range_m;
|
||||
|
||||
if (psrng_s == 0.0)
|
||||
{
|
||||
fine_pseudorange = -524288;
|
||||
}
|
||||
else if (std::fabs(psrng_s) > 292.7)
|
||||
if (psrng_s == 0.0 || (std::fabs(psrng_s) > 292.7))
|
||||
{
|
||||
fine_pseudorange = -524288;
|
||||
}
|
||||
@@ -5620,7 +5594,7 @@ int32_t Rtcm::set_DF406(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
if ((sig_ == "7X") && (sys_ == "E"))
|
||||
{
|
||||
lambda = SPEED_OF_LIGHT_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
|
||||
lambda = SPEED_OF_LIGHT_M_S / GALILEO_E5B_FREQ_HZ;
|
||||
}
|
||||
if ((sig_ == "1C") && (sys_ == "R"))
|
||||
{
|
||||
@@ -5642,11 +5616,7 @@ int32_t Rtcm::set_DF406(const Gnss_Synchro& gnss_synchro)
|
||||
}
|
||||
phrng_m -= cp;
|
||||
|
||||
if (phrng_m == 0.0)
|
||||
{
|
||||
fine_phaserange_ex = -8388608;
|
||||
}
|
||||
else if (std::fabs(phrng_m) > 1171.0)
|
||||
if (phrng_m == 0.0 || (std::fabs(phrng_m) > 1171.0))
|
||||
{
|
||||
fine_phaserange_ex = -8388608;
|
||||
}
|
||||
|
||||
@@ -890,7 +890,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
nav_data.utc_cmp[1] = beidou_dnav_utc_model.d_A1_UTC;
|
||||
nav_data.utc_cmp[2] = 0.0; // ??
|
||||
nav_data.utc_cmp[3] = 0.0; // ??
|
||||
nav_data.leaps = beidou_dnav_utc_model.d_DeltaT_LS;
|
||||
nav_data.leaps = beidou_dnav_utc_model.i_DeltaT_LS;
|
||||
}
|
||||
|
||||
/* update carrier wave length using native function call in RTKlib */
|
||||
@@ -928,7 +928,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
|
||||
std::vector<double> azel;
|
||||
azel.reserve(used_sats * 2);
|
||||
unsigned int index_aux = 0;
|
||||
int index_aux = 0;
|
||||
for (auto &i : rtk_.ssat)
|
||||
{
|
||||
if (i.vs == 1)
|
||||
|
||||
Reference in New Issue
Block a user