mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Give more natural, consistent names to ephemeris / iono / utc parameters exposed outside the receiver via XML files
Create a base class for GPS, Galileo and BeiDou ephemeris, allowing to remove some duplicated code Use BOOST_SERIALIZATION_NVP macro, less error prone than boost::serialization::make_nvp Update .xsd files
This commit is contained in:
		| @@ -667,7 +667,7 @@ rtklib_pvt_gs::~rtklib_pvt_gs() | ||||
|  | ||||
|                     // Save Galileo UTC model parameters | ||||
|                     file_name = d_xml_base_path + "gal_utc_model.xml"; | ||||
|                     if (d_internal_pvt_solver->galileo_utc_model.Delta_tLS_6 != 0.0) | ||||
|                     if (d_internal_pvt_solver->galileo_utc_model.Delta_tLS != 0.0) | ||||
|                         { | ||||
|                             std::ofstream ofs; | ||||
|                             try | ||||
| @@ -757,7 +757,7 @@ rtklib_pvt_gs::~rtklib_pvt_gs() | ||||
|  | ||||
|                     // Save Galileo iono parameters | ||||
|                     file_name = d_xml_base_path + "gal_iono.xml"; | ||||
|                     if (d_internal_pvt_solver->galileo_iono.ai0_5 != 0.0) | ||||
|                     if (d_internal_pvt_solver->galileo_iono.ai0 != 0.0) | ||||
|                         { | ||||
|                             std::ofstream ofs; | ||||
|                             try | ||||
| @@ -1074,10 +1074,10 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     // ### GPS EPHEMERIS ### | ||||
|                     const auto gps_eph = boost::any_cast<std::shared_ptr<Gps_Ephemeris>>(pmt::any_ref(msg)); | ||||
|                     DLOG(INFO) << "Ephemeris record has arrived from SAT ID " | ||||
|                                << gps_eph->i_satellite_PRN << " (Block " | ||||
|                                << gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")" | ||||
|                                << "inserted with Toe=" << gps_eph->d_Toe << " and GPS Week=" | ||||
|                                << gps_eph->i_GPS_week; | ||||
|                                << gps_eph->PRN << " (Block " | ||||
|                                << gps_eph->satelliteBlock[gps_eph->PRN] << ")" | ||||
|                                << "inserted with Toe=" << gps_eph->toe << " and GPS Week=" | ||||
|                                << gps_eph->WN; | ||||
|  | ||||
|                     // todo: Send only new sets of ephemeris (new TOE), not sent to the client | ||||
|                     // send the new eph to the eph monitor (if enabled) | ||||
| @@ -1089,13 +1089,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     if (d_rinex_output_enabled && d_rp->is_rinex_header_written())  // The header is already written, we can now log the navigation message data | ||||
|                         { | ||||
|                             bool new_annotation = false; | ||||
|                             if (d_internal_pvt_solver->gps_ephemeris_map.find(gps_eph->i_satellite_PRN) == d_internal_pvt_solver->gps_ephemeris_map.cend()) | ||||
|                             if (d_internal_pvt_solver->gps_ephemeris_map.find(gps_eph->PRN) == d_internal_pvt_solver->gps_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     new_annotation = true; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (d_internal_pvt_solver->gps_ephemeris_map[gps_eph->i_satellite_PRN].d_Toe != gps_eph->d_Toe) | ||||
|                                     if (d_internal_pvt_solver->gps_ephemeris_map[gps_eph->PRN].toe != gps_eph->toe) | ||||
|                                         { | ||||
|                                             new_annotation = true; | ||||
|                                         } | ||||
| @@ -1104,14 +1104,14 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                                 { | ||||
|                                     // New record! | ||||
|                                     std::map<int32_t, Gps_Ephemeris> new_eph; | ||||
|                                     new_eph[gps_eph->i_satellite_PRN] = *gps_eph; | ||||
|                                     new_eph[gps_eph->PRN] = *gps_eph; | ||||
|                                     d_rp->log_rinex_nav_gps_nav(d_type_of_rx, new_eph); | ||||
|                                 } | ||||
|                         } | ||||
|                     d_internal_pvt_solver->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph; | ||||
|                     d_internal_pvt_solver->gps_ephemeris_map[gps_eph->PRN] = *gps_eph; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph; | ||||
|                             d_user_pvt_solver->gps_ephemeris_map[gps_eph->PRN] = *gps_eph; | ||||
|                         } | ||||
|                 } | ||||
|             else if (msg_type_hash_code == d_gps_iono_sptr_type_hash_code) | ||||
| @@ -1144,13 +1144,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     if (d_rinex_output_enabled && d_rp->is_rinex_header_written())  // The header is already written, we can now log the navigation message data | ||||
|                         { | ||||
|                             bool new_annotation = false; | ||||
|                             if (d_internal_pvt_solver->gps_cnav_ephemeris_map.find(gps_cnav_ephemeris->i_satellite_PRN) == d_internal_pvt_solver->gps_cnav_ephemeris_map.cend()) | ||||
|                             if (d_internal_pvt_solver->gps_cnav_ephemeris_map.find(gps_cnav_ephemeris->PRN) == d_internal_pvt_solver->gps_cnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     new_annotation = true; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->i_satellite_PRN].d_Toe1 != gps_cnav_ephemeris->d_Toe1) | ||||
|                                     if (d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN].toe1 != gps_cnav_ephemeris->toe1) | ||||
|                                         { | ||||
|                                             new_annotation = true; | ||||
|                                         } | ||||
| @@ -1159,14 +1159,14 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                                 { | ||||
|                                     // New record! | ||||
|                                     std::map<int32_t, Gps_CNAV_Ephemeris> new_cnav_eph; | ||||
|                                     new_cnav_eph[gps_cnav_ephemeris->i_satellite_PRN] = *gps_cnav_ephemeris; | ||||
|                                     new_cnav_eph[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris; | ||||
|                                     d_rp->log_rinex_nav_gps_cnav(d_type_of_rx, new_cnav_eph); | ||||
|                                 } | ||||
|                         } | ||||
|                     d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->i_satellite_PRN] = *gps_cnav_ephemeris; | ||||
|                     d_internal_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->i_satellite_PRN] = *gps_cnav_ephemeris; | ||||
|                             d_user_pvt_solver->gps_cnav_ephemeris_map[gps_cnav_ephemeris->PRN] = *gps_cnav_ephemeris; | ||||
|                         } | ||||
|                     DLOG(INFO) << "New GPS CNAV ephemeris record has arrived "; | ||||
|                 } | ||||
| @@ -1196,10 +1196,10 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                 { | ||||
|                     // ### GPS ALMANAC ### | ||||
|                     const auto gps_almanac = boost::any_cast<std::shared_ptr<Gps_Almanac>>(pmt::any_ref(msg)); | ||||
|                     d_internal_pvt_solver->gps_almanac_map[gps_almanac->i_satellite_PRN] = *gps_almanac; | ||||
|                     d_internal_pvt_solver->gps_almanac_map[gps_almanac->PRN] = *gps_almanac; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->gps_almanac_map[gps_almanac->i_satellite_PRN] = *gps_almanac; | ||||
|                             d_user_pvt_solver->gps_almanac_map[gps_almanac->PRN] = *gps_almanac; | ||||
|                         } | ||||
|                     DLOG(INFO) << "New GPS almanac record has arrived "; | ||||
|                 } | ||||
| @@ -1210,8 +1210,8 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     // ### Galileo EPHEMERIS ### | ||||
|                     const auto galileo_eph = boost::any_cast<std::shared_ptr<Galileo_Ephemeris>>(pmt::any_ref(msg)); | ||||
|                     // insert new ephemeris record | ||||
|                     DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5 | ||||
|                                << ", GALILEO Week Number =" << galileo_eph->WN_5 | ||||
|                     DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->tow | ||||
|                                << ", GALILEO Week Number =" << galileo_eph->WN | ||||
|                                << " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris; | ||||
|                     // todo: Send only new sets of ephemeris (new TOE), not sent to the client | ||||
|                     // send the new eph to the eph monitor (if enabled) | ||||
| @@ -1223,13 +1223,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     if (d_rinex_output_enabled && d_rp->is_rinex_header_written())  // The header is already written, we can now log the navigation message data | ||||
|                         { | ||||
|                             bool new_annotation = false; | ||||
|                             if (d_internal_pvt_solver->galileo_ephemeris_map.find(galileo_eph->i_satellite_PRN) == d_internal_pvt_solver->galileo_ephemeris_map.cend()) | ||||
|                             if (d_internal_pvt_solver->galileo_ephemeris_map.find(galileo_eph->PRN) == d_internal_pvt_solver->galileo_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     new_annotation = true; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->i_satellite_PRN].t0e_1 != galileo_eph->t0e_1) | ||||
|                                     if (d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN].toe != galileo_eph->toe) | ||||
|                                         { | ||||
|                                             new_annotation = true; | ||||
|                                         } | ||||
| @@ -1238,14 +1238,14 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                                 { | ||||
|                                     // New record! | ||||
|                                     std::map<int32_t, Galileo_Ephemeris> new_gal_eph; | ||||
|                                     new_gal_eph[galileo_eph->i_satellite_PRN] = *galileo_eph; | ||||
|                                     new_gal_eph[galileo_eph->PRN] = *galileo_eph; | ||||
|                                     d_rp->log_rinex_nav_gal_nav(d_type_of_rx, new_gal_eph); | ||||
|                                 } | ||||
|                         } | ||||
|                     d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph; | ||||
|                     d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN] = *galileo_eph; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph; | ||||
|                             d_user_pvt_solver->galileo_ephemeris_map[galileo_eph->PRN] = *galileo_eph; | ||||
|                         } | ||||
|                 } | ||||
|             else if (msg_type_hash_code == d_galileo_iono_sptr_type_hash_code) | ||||
| @@ -1278,28 +1278,28 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     const Galileo_Almanac sv2 = galileo_almanac_helper->get_almanac(2); | ||||
|                     const Galileo_Almanac sv3 = galileo_almanac_helper->get_almanac(3); | ||||
|  | ||||
|                     if (sv1.i_satellite_PRN != 0) | ||||
|                     if (sv1.PRN != 0) | ||||
|                         { | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv1.i_satellite_PRN] = sv1; | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv1.PRN] = sv1; | ||||
|                             if (d_enable_rx_clock_correction == true) | ||||
|                                 { | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv1.i_satellite_PRN] = sv1; | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv1.PRN] = sv1; | ||||
|                                 } | ||||
|                         } | ||||
|                     if (sv2.i_satellite_PRN != 0) | ||||
|                     if (sv2.PRN != 0) | ||||
|                         { | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv2.i_satellite_PRN] = sv2; | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv2.PRN] = sv2; | ||||
|                             if (d_enable_rx_clock_correction == true) | ||||
|                                 { | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv2.i_satellite_PRN] = sv2; | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv2.PRN] = sv2; | ||||
|                                 } | ||||
|                         } | ||||
|                     if (sv3.i_satellite_PRN != 0) | ||||
|                     if (sv3.PRN != 0) | ||||
|                         { | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv3.i_satellite_PRN] = sv3; | ||||
|                             d_internal_pvt_solver->galileo_almanac_map[sv3.PRN] = sv3; | ||||
|                             if (d_enable_rx_clock_correction == true) | ||||
|                                 { | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv3.i_satellite_PRN] = sv3; | ||||
|                                     d_user_pvt_solver->galileo_almanac_map[sv3.PRN] = sv3; | ||||
|                                 } | ||||
|                         } | ||||
|                     DLOG(INFO) << "New Galileo Almanac data have arrived "; | ||||
| @@ -1309,10 +1309,10 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     // ### Galileo Almanac ### | ||||
|                     const auto galileo_alm = boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg)); | ||||
|                     // update/insert new almanac record to the global almanac map | ||||
|                     d_internal_pvt_solver->galileo_almanac_map[galileo_alm->i_satellite_PRN] = *galileo_alm; | ||||
|                     d_internal_pvt_solver->galileo_almanac_map[galileo_alm->PRN] = *galileo_alm; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->galileo_almanac_map[galileo_alm->i_satellite_PRN] = *galileo_alm; | ||||
|                             d_user_pvt_solver->galileo_almanac_map[galileo_alm->PRN] = *galileo_alm; | ||||
|                         } | ||||
|                 } | ||||
|  | ||||
| @@ -1331,13 +1331,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     if (d_rinex_output_enabled && d_rp->is_rinex_header_written())  // The header is already written, we can now log the navigation message data | ||||
|                         { | ||||
|                             bool new_annotation = false; | ||||
|                             if (d_internal_pvt_solver->glonass_gnav_ephemeris_map.find(glonass_gnav_eph->i_satellite_PRN) == d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
|                             if (d_internal_pvt_solver->glonass_gnav_ephemeris_map.find(glonass_gnav_eph->PRN) == d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     new_annotation = true; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->i_satellite_PRN].d_t_b != glonass_gnav_eph->d_t_b) | ||||
|                                     if (d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN].d_t_b != glonass_gnav_eph->d_t_b) | ||||
|                                         { | ||||
|                                             new_annotation = true; | ||||
|                                         } | ||||
| @@ -1346,14 +1346,14 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                                 { | ||||
|                                     // New record! | ||||
|                                     std::map<int32_t, Glonass_Gnav_Ephemeris> new_glo_eph; | ||||
|                                     new_glo_eph[glonass_gnav_eph->i_satellite_PRN] = *glonass_gnav_eph; | ||||
|                                     new_glo_eph[glonass_gnav_eph->PRN] = *glonass_gnav_eph; | ||||
|                                     d_rp->log_rinex_nav_glo_gnav(d_type_of_rx, new_glo_eph); | ||||
|                                 } | ||||
|                         } | ||||
|                     d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->i_satellite_PRN] = *glonass_gnav_eph; | ||||
|                     d_internal_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN] = *glonass_gnav_eph; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->i_satellite_PRN] = *glonass_gnav_eph; | ||||
|                             d_user_pvt_solver->glonass_gnav_ephemeris_map[glonass_gnav_eph->PRN] = *glonass_gnav_eph; | ||||
|                         } | ||||
|                 } | ||||
|             else if (msg_type_hash_code == d_glonass_gnav_utc_model_sptr_type_hash_code) | ||||
| @@ -1386,21 +1386,21 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                     // ### Beidou EPHEMERIS ### | ||||
|                     const auto bds_dnav_eph = boost::any_cast<std::shared_ptr<Beidou_Dnav_Ephemeris>>(pmt::any_ref(msg)); | ||||
|                     DLOG(INFO) << "Ephemeris record has arrived from SAT ID " | ||||
|                                << bds_dnav_eph->i_satellite_PRN << " (Block " | ||||
|                                << bds_dnav_eph->satelliteBlock[bds_dnav_eph->i_satellite_PRN] << ")" | ||||
|                                << "inserted with Toe=" << bds_dnav_eph->d_Toe << " and BDS Week=" | ||||
|                                << bds_dnav_eph->i_BEIDOU_week; | ||||
|                                << bds_dnav_eph->PRN << " (Block " | ||||
|                                << bds_dnav_eph->satelliteBlock[bds_dnav_eph->PRN] << ")" | ||||
|                                << "inserted with Toe=" << bds_dnav_eph->toe << " and BDS Week=" | ||||
|                                << bds_dnav_eph->WN; | ||||
|                     // update/insert new ephemeris record to the global ephemeris map | ||||
|                     if (d_rinex_output_enabled && d_rp->is_rinex_header_written())  // The header is already written, we can now log the navigation message data | ||||
|                         { | ||||
|                             bool new_annotation = false; | ||||
|                             if (d_internal_pvt_solver->beidou_dnav_ephemeris_map.find(bds_dnav_eph->i_satellite_PRN) == d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend()) | ||||
|                             if (d_internal_pvt_solver->beidou_dnav_ephemeris_map.find(bds_dnav_eph->PRN) == d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     new_annotation = true; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->i_satellite_PRN].d_Toc != bds_dnav_eph->d_Toc) | ||||
|                                     if (d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN].toc != bds_dnav_eph->toc) | ||||
|                                         { | ||||
|                                             new_annotation = true; | ||||
|                                         } | ||||
| @@ -1409,14 +1409,14 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                                 { | ||||
|                                     // New record! | ||||
|                                     std::map<int32_t, Beidou_Dnav_Ephemeris> new_bds_eph; | ||||
|                                     new_bds_eph[bds_dnav_eph->i_satellite_PRN] = *bds_dnav_eph; | ||||
|                                     new_bds_eph[bds_dnav_eph->PRN] = *bds_dnav_eph; | ||||
|                                     d_rp->log_rinex_nav_bds_dnav(d_type_of_rx, new_bds_eph); | ||||
|                                 } | ||||
|                         } | ||||
|                     d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->i_satellite_PRN] = *bds_dnav_eph; | ||||
|                     d_internal_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN] = *bds_dnav_eph; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->i_satellite_PRN] = *bds_dnav_eph; | ||||
|                             d_user_pvt_solver->beidou_dnav_ephemeris_map[bds_dnav_eph->PRN] = *bds_dnav_eph; | ||||
|                         } | ||||
|                 } | ||||
|             else if (msg_type_hash_code == d_beidou_dnav_iono_sptr_type_hash_code) | ||||
| @@ -1445,10 +1445,10 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) | ||||
|                 { | ||||
|                     // ### BeiDou ALMANAC ### | ||||
|                     const auto bds_dnav_almanac = boost::any_cast<std::shared_ptr<Beidou_Dnav_Almanac>>(pmt::any_ref(msg)); | ||||
|                     d_internal_pvt_solver->beidou_dnav_almanac_map[bds_dnav_almanac->i_satellite_PRN] = *bds_dnav_almanac; | ||||
|                     d_internal_pvt_solver->beidou_dnav_almanac_map[bds_dnav_almanac->PRN] = *bds_dnav_almanac; | ||||
|                     if (d_enable_rx_clock_correction == true) | ||||
|                         { | ||||
|                             d_user_pvt_solver->beidou_dnav_almanac_map[bds_dnav_almanac->i_satellite_PRN] = *bds_dnav_almanac; | ||||
|                             d_user_pvt_solver->beidou_dnav_almanac_map[bds_dnav_almanac->PRN] = *bds_dnav_almanac; | ||||
|                         } | ||||
|                     DLOG(INFO) << "New BeiDou DNAV almanac record has arrived "; | ||||
|                 } | ||||
| @@ -1834,7 +1834,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|  | ||||
|                             if (tmp_eph_iter_gps != d_internal_pvt_solver->gps_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_gps->second.i_satellite_PRN; | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_gps->second.PRN; | ||||
|                                     if ((prn_aux == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1C")) | ||||
|                                         { | ||||
|                                             store_valid_observable = true; | ||||
| @@ -1842,7 +1842,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                 } | ||||
|                             if (tmp_eph_iter_gal != d_internal_pvt_solver->galileo_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_gal->second.i_satellite_PRN; | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_gal->second.PRN; | ||||
|                                     if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1B") or (std::string(in[i][epoch].Signal) == "5X") or (std::string(in[i][epoch].Signal) == "7X"))) | ||||
|                                         { | ||||
|                                             store_valid_observable = true; | ||||
| @@ -1850,7 +1850,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                 } | ||||
|                             if (tmp_eph_iter_cnav != d_internal_pvt_solver->gps_cnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_cnav->second.i_satellite_PRN; | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_cnav->second.PRN; | ||||
|                                     if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "2S") or (std::string(in[i][epoch].Signal) == "L5"))) | ||||
|                                         { | ||||
|                                             store_valid_observable = true; | ||||
| @@ -1858,7 +1858,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                 } | ||||
|                             if (tmp_eph_iter_glo_gnav != d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_glo_gnav->second.i_satellite_PRN; | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_glo_gnav->second.PRN; | ||||
|                                     if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "1G") or (std::string(in[i][epoch].Signal) == "2G"))) | ||||
|                                         { | ||||
|                                             store_valid_observable = true; | ||||
| @@ -1866,7 +1866,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                 } | ||||
|                             if (tmp_eph_iter_bds_dnav != d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend()) | ||||
|                                 { | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_bds_dnav->second.i_satellite_PRN; | ||||
|                                     const uint32_t prn_aux = tmp_eph_iter_bds_dnav->second.PRN; | ||||
|                                     if ((prn_aux == in[i][epoch].PRN) and ((std::string(in[i][epoch].Signal) == "B1") or (std::string(in[i][epoch].Signal) == "B3"))) | ||||
|                                         { | ||||
|                                             store_valid_observable = true; | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1625,92 +1625,92 @@ int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) co | ||||
|         } | ||||
|  | ||||
|     // Fill Gps Ephemeris with message data content | ||||
|     gps_eph.i_satellite_PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     gps_eph.PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     index += 6; | ||||
|  | ||||
|     gps_eph.i_GPS_week = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     gps_eph.WN = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     index += 10; | ||||
|  | ||||
|     gps_eph.i_SV_accuracy = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 4))); | ||||
|     gps_eph.SV_accuracy = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 4))); | ||||
|     index += 4; | ||||
|  | ||||
|     gps_eph.i_code_on_L2 = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 2))); | ||||
|     gps_eph.code_on_L2 = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 2))); | ||||
|     index += 2; | ||||
|  | ||||
|     gps_eph.d_IDOT = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * I_DOT_LSB; | ||||
|     gps_eph.idot = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * I_DOT_LSB; | ||||
|     index += 14; | ||||
|  | ||||
|     gps_eph.d_IODE_SF2 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     gps_eph.d_IODE_SF3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     gps_eph.IODE_SF2 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     gps_eph.IODE_SF3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     index += 8; | ||||
|  | ||||
|     gps_eph.d_Toc = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 16))) * T_OC_LSB; | ||||
|     gps_eph.toc = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 16))) * T_OC_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_A_f2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 8))) * A_F2_LSB; | ||||
|     gps_eph.af2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 8))) * A_F2_LSB; | ||||
|     index += 8; | ||||
|  | ||||
|     gps_eph.d_A_f1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * A_F1_LSB; | ||||
|     gps_eph.af1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * A_F1_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_A_f0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 22))) * A_F0_LSB; | ||||
|     gps_eph.af0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 22))) * A_F0_LSB; | ||||
|     index += 22; | ||||
|  | ||||
|     gps_eph.d_IODC = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     gps_eph.IODC = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     index += 10; | ||||
|  | ||||
|     gps_eph.d_Crs = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RS_LSB; | ||||
|     gps_eph.Crs = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RS_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_Delta_n = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * DELTA_N_LSB; | ||||
|     gps_eph.delta_n = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * DELTA_N_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_M_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M_0_LSB; | ||||
|     gps_eph.M_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M_0_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_Cuc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_UC_LSB; | ||||
|     gps_eph.Cuc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_UC_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_e_eccentricity = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * ECCENTRICITY_LSB; | ||||
|     gps_eph.ecc = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * ECCENTRICITY_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_Cus = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_US_LSB; | ||||
|     gps_eph.Cus = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_US_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_sqrt_A = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * SQRT_A_LSB; | ||||
|     gps_eph.sqrtA = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * SQRT_A_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_Toe = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 16))) * T_OE_LSB; | ||||
|     gps_eph.toe = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 16))) * T_OE_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_Cic = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IC_LSB; | ||||
|     gps_eph.Cic = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IC_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_OMEGA0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_LSB; | ||||
|     gps_eph.OMEGA_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_Cis = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IS_LSB; | ||||
|     gps_eph.Cis = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IS_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_i_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * I_0_LSB; | ||||
|     gps_eph.i_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * I_0_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_Crc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RC_LSB; | ||||
|     gps_eph.Crc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RC_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gps_eph.d_OMEGA = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_LSB; | ||||
|     gps_eph.omega = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gps_eph.d_OMEGA_DOT = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_DOT_LSB; | ||||
|     gps_eph.OMEGAdot = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_DOT_LSB; | ||||
|     index += 24; | ||||
|  | ||||
|     gps_eph.d_TGD = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 8))) * T_GD_LSB; | ||||
|     gps_eph.TGD = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 8))) * T_GD_LSB; | ||||
|     index += 8; | ||||
|  | ||||
|     gps_eph.i_SV_health = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     gps_eph.SV_health = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     index += 6; | ||||
|  | ||||
|     gps_eph.b_L2_P_data_flag = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1))); | ||||
|     gps_eph.L2_P_data_flag = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1))); | ||||
|     index += 1; | ||||
|  | ||||
|     gps_eph.b_fit_interval_flag = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1))); | ||||
| @@ -2162,79 +2162,79 @@ int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph | ||||
|         } | ||||
|  | ||||
|     // Fill Galileo Ephemeris with message data content | ||||
|     gal_eph.i_satellite_PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     gal_eph.PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6))); | ||||
|     index += 6; | ||||
|  | ||||
|     gal_eph.WN_5 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 12))); | ||||
|     gal_eph.WN = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 12))); | ||||
|     index += 12; | ||||
|  | ||||
|     gal_eph.IOD_nav_1 = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     gal_eph.IOD_nav = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10))); | ||||
|     index += 10; | ||||
|  | ||||
|     gal_eph.SISA_3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     gal_eph.SISA = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); | ||||
|     index += 8; | ||||
|  | ||||
|     gal_eph.iDot_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * I_DOT_2_LSB; | ||||
|     gal_eph.idot = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * I_DOT_2_LSB; | ||||
|     index += 14; | ||||
|  | ||||
|     gal_eph.t0c_4 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0C_4_LSB; | ||||
|     gal_eph.toc = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0C_4_LSB; | ||||
|     index += 14; | ||||
|  | ||||
|     gal_eph.af2_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 6))) * AF2_4_LSB; | ||||
|     gal_eph.af2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 6))) * AF2_4_LSB; | ||||
|     index += 6; | ||||
|  | ||||
|     gal_eph.af1_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 21))) * AF1_4_LSB; | ||||
|     gal_eph.af1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 21))) * AF1_4_LSB; | ||||
|     index += 21; | ||||
|  | ||||
|     gal_eph.af0_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 31))) * AF0_4_LSB; | ||||
|     gal_eph.af0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 31))) * AF0_4_LSB; | ||||
|     index += 31; | ||||
|  | ||||
|     gal_eph.C_rs_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RS_3_LSB; | ||||
|     gal_eph.Crs = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RS_3_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.delta_n_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * DELTA_N_3_LSB; | ||||
|     gal_eph.delta_n = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * DELTA_N_3_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.M0_1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M0_1_LSB; | ||||
|     gal_eph.M_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M0_1_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.C_uc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_UC_3_LSB; | ||||
|     gal_eph.Cuc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_UC_3_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * E_1_LSB; | ||||
|     gal_eph.ecc = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * E_1_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.C_us_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_US_3_LSB; | ||||
|     gal_eph.Cus = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_US_3_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.A_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * A_1_LSB_GAL; | ||||
|     gal_eph.sqrtA = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * A_1_LSB_GAL; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.t0e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0E_1_LSB; | ||||
|     gal_eph.toe = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0E_1_LSB; | ||||
|     index += 14; | ||||
|  | ||||
|     gal_eph.C_ic_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IC_4_LSB; | ||||
|     gal_eph.Cic = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IC_4_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.OMEGA_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_2_LSB; | ||||
|     gal_eph.OMEGA_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_2_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.C_is_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IS_4_LSB; | ||||
|     gal_eph.Cis = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IS_4_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.i_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * I_0_2_LSB; | ||||
|     gal_eph.i_0 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * I_0_2_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.C_rc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RC_3_LSB; | ||||
|     gal_eph.Crc = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RC_3_LSB; | ||||
|     index += 16; | ||||
|  | ||||
|     gal_eph.omega_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_2_LSB; | ||||
|     gal_eph.omega = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_2_LSB; | ||||
|     index += 32; | ||||
|  | ||||
|     gal_eph.OMEGA_dot_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_DOT_3_LSB; | ||||
|     gal_eph.OMEGAdot = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_DOT_3_LSB; | ||||
|     index += 24; | ||||
|  | ||||
|     gal_eph.BGD_E1E5a_5 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 10))); | ||||
|     gal_eph.BGD_E1E5a = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 10))); | ||||
|     index += 10; | ||||
|  | ||||
|     gal_eph.E5a_HS = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 2))); | ||||
| @@ -2266,23 +2266,23 @@ std::string Rtcm::print_MSM_1(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1071; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1071; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1081; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1091; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -2463,23 +2463,23 @@ std::string Rtcm::print_MSM_2(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1072; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1072; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1082; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1092; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -2577,23 +2577,23 @@ std::string Rtcm::print_MSM_3(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1073; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1073; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1083; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1093; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -2694,23 +2694,23 @@ std::string Rtcm::print_MSM_4(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1074; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1074; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1084; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1094; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -2857,23 +2857,23 @@ std::string Rtcm::print_MSM_5(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1075; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1075; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1085; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1095; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -3029,23 +3029,23 @@ std::string Rtcm::print_MSM_6(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1076; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1076; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1086; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1096; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (gal_eph.PRN != 0) && (glo_gnav_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -3149,23 +3149,23 @@ std::string Rtcm::print_MSM_7(const Gps_Ephemeris& gps_eph, | ||||
|     bool more_messages) | ||||
| { | ||||
|     uint32_t msg_number = 0; | ||||
|     if (gps_eph.i_satellite_PRN != 0) | ||||
|     if (gps_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1077; | ||||
|         } | ||||
|     if (gps_cnav_eph.i_satellite_PRN != 0) | ||||
|     if (gps_cnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1077; | ||||
|         } | ||||
|     if (glo_gnav_eph.i_satellite_PRN != 0) | ||||
|     if (glo_gnav_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1087; | ||||
|         } | ||||
|     if (gal_eph.i_satellite_PRN != 0) | ||||
|     if (gal_eph.PRN != 0) | ||||
|         { | ||||
|             msg_number = 1097; | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (glo_gnav_eph.i_satellite_PRN != 0) && (gal_eph.i_satellite_PRN != 0)) | ||||
|     if (((gps_eph.PRN != 0) || (gps_cnav_eph.PRN != 0)) && (glo_gnav_eph.PRN != 0) && (gal_eph.PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
| @@ -3391,9 +3391,9 @@ std::map<std::string, int> Rtcm::galileo_signal_map = [] { | ||||
| boost::posix_time::ptime Rtcm::compute_GPS_time(const Gps_Ephemeris& eph, double obs_time) const | ||||
| { | ||||
|     const double gps_t = obs_time; | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week)) * 1000));  // NOLINT(google-runtime-int) | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.WN)) * 1000));  // NOLINT(google-runtime-int) | ||||
|  | ||||
|     if (eph.i_GPS_week < 512) | ||||
|     if (eph.WN < 512) | ||||
|         { | ||||
|             boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t_duration); | ||||
|             return p_time; | ||||
| @@ -3407,7 +3407,7 @@ boost::posix_time::ptime Rtcm::compute_GPS_time(const Gps_Ephemeris& eph, double | ||||
| boost::posix_time::ptime Rtcm::compute_GPS_time(const Gps_CNAV_Ephemeris& eph, double obs_time) const | ||||
| { | ||||
|     const double gps_t = obs_time; | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.i_GPS_week)) * 1000));  // NOLINT(google-runtime-int) | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((gps_t + 604800 * static_cast<double>(eph.WN)) * 1000));  // NOLINT(google-runtime-int) | ||||
|     boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t_duration); | ||||
|     return p_time; | ||||
| } | ||||
| @@ -3416,7 +3416,7 @@ boost::posix_time::ptime Rtcm::compute_GPS_time(const Gps_CNAV_Ephemeris& eph, d | ||||
| boost::posix_time::ptime Rtcm::compute_Galileo_time(const Galileo_Ephemeris& eph, double obs_time) const | ||||
| { | ||||
|     const double galileo_t = obs_time; | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((galileo_t + 604800 * static_cast<double>(eph.WN_5)) * 1000));  // NOLINT(google-runtime-int) | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<long>((galileo_t + 604800 * static_cast<double>(eph.WN)) * 1000));  // NOLINT(google-runtime-int) | ||||
|     boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t_duration); | ||||
|     return p_time; | ||||
| } | ||||
| @@ -3778,7 +3778,7 @@ int32_t Rtcm::set_DF009(const Gnss_Synchro& gnss_synchro) | ||||
|  | ||||
| int32_t Rtcm::set_DF009(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const uint32_t prn_ = gps_eph.i_satellite_PRN; | ||||
|     const uint32_t prn_ = gps_eph.PRN; | ||||
|     if (prn_ > 32) | ||||
|         { | ||||
|             LOG(WARNING) << "GPS satellite ID must be between 1 and 32, but PRN " << prn_ << " was found"; | ||||
| @@ -4201,9 +4201,9 @@ int32_t Rtcm::set_DF050(const Gnss_Synchro& gnss_synchro) | ||||
| int32_t Rtcm::set_DF051(const Gps_Ephemeris& gps_eph, double obs_time) | ||||
| { | ||||
|     const double gps_t = obs_time; | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(gps_eph.i_GPS_week)) * 1000)); | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(gps_eph.WN)) * 1000)); | ||||
|     std::string now_ptime; | ||||
|     if (gps_eph.i_GPS_week < 512) | ||||
|     if (gps_eph.WN < 512) | ||||
|         { | ||||
|             boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t_duration); | ||||
|             now_ptime = to_iso_string(p_time); | ||||
| @@ -4224,9 +4224,9 @@ int32_t Rtcm::set_DF051(const Gps_Ephemeris& gps_eph, double obs_time) | ||||
| int32_t Rtcm::set_DF052(const Gps_Ephemeris& gps_eph, double obs_time) | ||||
| { | ||||
|     const double gps_t = obs_time; | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(gps_eph.i_GPS_week)) * 1000)); | ||||
|     const boost::posix_time::time_duration t_duration = boost::posix_time::milliseconds(static_cast<int64_t>((gps_t + 604800 * static_cast<double>(gps_eph.WN)) * 1000)); | ||||
|     std::string now_ptime; | ||||
|     if (gps_eph.i_GPS_week < 512) | ||||
|     if (gps_eph.WN < 512) | ||||
|         { | ||||
|             boost::posix_time::ptime p_time(boost::gregorian::date(2019, 4, 7), t_duration); | ||||
|             now_ptime = to_iso_string(p_time); | ||||
| @@ -4248,7 +4248,7 @@ int32_t Rtcm::set_DF052(const Gps_Ephemeris& gps_eph, double obs_time) | ||||
|  | ||||
| int32_t Rtcm::set_DF071(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto iode = static_cast<uint32_t>(gps_eph.d_IODE_SF2); | ||||
|     const auto iode = static_cast<uint32_t>(gps_eph.IODE_SF2); | ||||
|     DF071 = std::bitset<8>(iode); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4256,7 +4256,7 @@ int32_t Rtcm::set_DF071(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF076(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto week_number = static_cast<uint32_t>(gps_eph.i_GPS_week); | ||||
|     const auto week_number = static_cast<uint32_t>(gps_eph.WN); | ||||
|     DF076 = std::bitset<10>(week_number); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4264,7 +4264,7 @@ int32_t Rtcm::set_DF076(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF077(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto ura = static_cast<uint16_t>(gps_eph.i_SV_accuracy); | ||||
|     const auto ura = static_cast<uint16_t>(gps_eph.SV_accuracy); | ||||
|     DF077 = std::bitset<4>(ura); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4272,7 +4272,7 @@ int32_t Rtcm::set_DF077(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF078(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto code_on_L2 = static_cast<uint16_t>(gps_eph.i_code_on_L2); | ||||
|     const auto code_on_L2 = static_cast<uint16_t>(gps_eph.code_on_L2); | ||||
|     DF078 = std::bitset<2>(code_on_L2); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4280,7 +4280,7 @@ int32_t Rtcm::set_DF078(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF079(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto idot = static_cast<uint32_t>(std::round(gps_eph.d_IDOT / I_DOT_LSB)); | ||||
|     const auto idot = static_cast<uint32_t>(std::round(gps_eph.idot / I_DOT_LSB)); | ||||
|     DF079 = std::bitset<14>(idot); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4288,7 +4288,7 @@ int32_t Rtcm::set_DF079(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF080(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto iode = static_cast<uint16_t>(gps_eph.d_IODE_SF2); | ||||
|     const auto iode = static_cast<uint16_t>(gps_eph.IODE_SF2); | ||||
|     DF080 = std::bitset<8>(iode); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4296,7 +4296,7 @@ int32_t Rtcm::set_DF080(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF081(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto toc = static_cast<uint32_t>(std::round(gps_eph.d_Toc / T_OC_LSB)); | ||||
|     const auto toc = static_cast<uint32_t>(std::round(gps_eph.toc / T_OC_LSB)); | ||||
|     DF081 = std::bitset<16>(toc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4304,7 +4304,7 @@ int32_t Rtcm::set_DF081(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF082(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto af2 = static_cast<int16_t>(std::round(gps_eph.d_A_f2 / A_F2_LSB)); | ||||
|     const auto af2 = static_cast<int16_t>(std::round(gps_eph.af2 / A_F2_LSB)); | ||||
|     DF082 = std::bitset<8>(af2); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4312,7 +4312,7 @@ int32_t Rtcm::set_DF082(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF083(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto af1 = static_cast<int32_t>(std::round(gps_eph.d_A_f1 / A_F1_LSB)); | ||||
|     const auto af1 = static_cast<int32_t>(std::round(gps_eph.af1 / A_F1_LSB)); | ||||
|     DF083 = std::bitset<16>(af1); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4320,7 +4320,7 @@ int32_t Rtcm::set_DF083(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF084(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto af0 = static_cast<int64_t>(std::round(gps_eph.d_A_f0 / A_F0_LSB)); | ||||
|     const auto af0 = static_cast<int64_t>(std::round(gps_eph.af0 / A_F0_LSB)); | ||||
|     DF084 = std::bitset<22>(af0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4328,7 +4328,7 @@ int32_t Rtcm::set_DF084(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF085(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto iodc = static_cast<uint32_t>(gps_eph.d_IODC); | ||||
|     const auto iodc = static_cast<uint32_t>(gps_eph.IODC); | ||||
|     DF085 = std::bitset<10>(iodc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4336,7 +4336,7 @@ int32_t Rtcm::set_DF085(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF086(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto crs = static_cast<int32_t>(std::round(gps_eph.d_Crs / C_RS_LSB)); | ||||
|     const auto crs = static_cast<int32_t>(std::round(gps_eph.Crs / C_RS_LSB)); | ||||
|     DF086 = std::bitset<16>(crs); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4344,7 +4344,7 @@ int32_t Rtcm::set_DF086(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF087(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto delta_n = static_cast<int32_t>(std::round(gps_eph.d_Delta_n / DELTA_N_LSB)); | ||||
|     const auto delta_n = static_cast<int32_t>(std::round(gps_eph.delta_n / DELTA_N_LSB)); | ||||
|     DF087 = std::bitset<16>(delta_n); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4352,7 +4352,7 @@ int32_t Rtcm::set_DF087(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF088(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto m0 = static_cast<int64_t>(std::round(gps_eph.d_M_0 / M_0_LSB)); | ||||
|     const auto m0 = static_cast<int64_t>(std::round(gps_eph.M_0 / M_0_LSB)); | ||||
|     DF088 = std::bitset<32>(m0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4360,14 +4360,14 @@ int32_t Rtcm::set_DF088(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF089(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto cuc = static_cast<int32_t>(std::round(gps_eph.d_Cuc / C_UC_LSB)); | ||||
|     const auto cuc = static_cast<int32_t>(std::round(gps_eph.Cuc / C_UC_LSB)); | ||||
|     DF089 = std::bitset<16>(cuc); | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| int32_t Rtcm::set_DF090(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto ecc = static_cast<uint64_t>(std::round(gps_eph.d_e_eccentricity / ECCENTRICITY_LSB)); | ||||
|     const auto ecc = static_cast<uint64_t>(std::round(gps_eph.ecc / ECCENTRICITY_LSB)); | ||||
|     DF090 = std::bitset<32>(ecc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4375,7 +4375,7 @@ int32_t Rtcm::set_DF090(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF091(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto cus = static_cast<int32_t>(std::round(gps_eph.d_Cus / C_US_LSB)); | ||||
|     const auto cus = static_cast<int32_t>(std::round(gps_eph.Cus / C_US_LSB)); | ||||
|     DF091 = std::bitset<16>(cus); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4383,7 +4383,7 @@ int32_t Rtcm::set_DF091(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF092(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto sqr_a = static_cast<uint64_t>(std::round(gps_eph.d_sqrt_A / SQRT_A_LSB)); | ||||
|     const auto sqr_a = static_cast<uint64_t>(std::round(gps_eph.sqrtA / SQRT_A_LSB)); | ||||
|     DF092 = std::bitset<32>(sqr_a); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4391,7 +4391,7 @@ int32_t Rtcm::set_DF092(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF093(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto toe = static_cast<uint32_t>(std::round(gps_eph.d_Toe / T_OE_LSB)); | ||||
|     const auto toe = static_cast<uint32_t>(std::round(gps_eph.toe / T_OE_LSB)); | ||||
|     DF093 = std::bitset<16>(toe); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4399,7 +4399,7 @@ int32_t Rtcm::set_DF093(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF094(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto cic = static_cast<int32_t>(std::round(gps_eph.d_Cic / C_IC_LSB)); | ||||
|     const auto cic = static_cast<int32_t>(std::round(gps_eph.Cic / C_IC_LSB)); | ||||
|     DF094 = std::bitset<16>(cic); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4407,7 +4407,7 @@ int32_t Rtcm::set_DF094(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF095(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto Omega0 = static_cast<int64_t>(std::round(gps_eph.d_OMEGA0 / OMEGA_0_LSB)); | ||||
|     const auto Omega0 = static_cast<int64_t>(std::round(gps_eph.OMEGA_0 / OMEGA_0_LSB)); | ||||
|     DF095 = std::bitset<32>(Omega0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4415,7 +4415,7 @@ int32_t Rtcm::set_DF095(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF096(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto cis = static_cast<int32_t>(std::round(gps_eph.d_Cis / C_IS_LSB)); | ||||
|     const auto cis = static_cast<int32_t>(std::round(gps_eph.Cis / C_IS_LSB)); | ||||
|     DF096 = std::bitset<16>(cis); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4423,7 +4423,7 @@ int32_t Rtcm::set_DF096(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF097(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto i0 = static_cast<int64_t>(std::round(gps_eph.d_i_0 / I_0_LSB)); | ||||
|     const auto i0 = static_cast<int64_t>(std::round(gps_eph.i_0 / I_0_LSB)); | ||||
|     DF097 = std::bitset<32>(i0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4431,7 +4431,7 @@ int32_t Rtcm::set_DF097(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF098(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto crc = static_cast<int32_t>(std::round(gps_eph.d_Crc / C_RC_LSB)); | ||||
|     const auto crc = static_cast<int32_t>(std::round(gps_eph.Crc / C_RC_LSB)); | ||||
|     DF098 = std::bitset<16>(crc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4439,7 +4439,7 @@ int32_t Rtcm::set_DF098(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF099(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto omega = static_cast<int64_t>(std::round(gps_eph.d_OMEGA / OMEGA_LSB)); | ||||
|     const auto omega = static_cast<int64_t>(std::round(gps_eph.omega / OMEGA_LSB)); | ||||
|     DF099 = std::bitset<32>(omega); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4447,7 +4447,7 @@ int32_t Rtcm::set_DF099(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF100(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto omegadot = static_cast<int64_t>(std::round(gps_eph.d_OMEGA_DOT / OMEGA_DOT_LSB)); | ||||
|     const auto omegadot = static_cast<int64_t>(std::round(gps_eph.OMEGAdot / OMEGA_DOT_LSB)); | ||||
|     DF100 = std::bitset<24>(omegadot); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4455,7 +4455,7 @@ int32_t Rtcm::set_DF100(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF101(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto tgd = static_cast<int16_t>(std::round(gps_eph.d_TGD / T_GD_LSB)); | ||||
|     const auto tgd = static_cast<int16_t>(std::round(gps_eph.TGD / T_GD_LSB)); | ||||
|     DF101 = std::bitset<8>(tgd); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4463,7 +4463,7 @@ int32_t Rtcm::set_DF101(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF102(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     const auto sv_heath = static_cast<uint16_t>(gps_eph.i_SV_health); | ||||
|     const auto sv_heath = static_cast<uint16_t>(gps_eph.SV_health); | ||||
|     DF102 = std::bitset<6>(sv_heath); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4471,7 +4471,7 @@ int32_t Rtcm::set_DF102(const Gps_Ephemeris& gps_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF103(const Gps_Ephemeris& gps_eph) | ||||
| { | ||||
|     DF103 = std::bitset<1>(gps_eph.b_L2_P_data_flag); | ||||
|     DF103 = std::bitset<1>(gps_eph.L2_P_data_flag); | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| @@ -4810,7 +4810,7 @@ int32_t Rtcm::set_DF248(double obs_time) | ||||
|  | ||||
| int32_t Rtcm::set_DF252(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const uint32_t prn_ = gal_eph.i_satellite_PRN; | ||||
|     const uint32_t prn_ = gal_eph.PRN; | ||||
|     if (prn_ > 63) | ||||
|         { | ||||
|             LOG(WARNING) << "Galileo satellite ID must be between 0 and 63, but PRN " << prn_ << " was found"; | ||||
| @@ -4822,7 +4822,7 @@ int32_t Rtcm::set_DF252(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF289(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto galileo_week_number = static_cast<uint32_t>(gal_eph.WN_5); | ||||
|     const auto galileo_week_number = static_cast<uint32_t>(gal_eph.WN); | ||||
|     if (galileo_week_number > 4095) | ||||
|         { | ||||
|             LOG(WARNING) << "Error decoding Galileo week number (it has a 4096 roll-off, but " << galileo_week_number << " was detected)"; | ||||
| @@ -4834,7 +4834,7 @@ int32_t Rtcm::set_DF289(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto iod_nav = static_cast<uint32_t>(gal_eph.IOD_nav_1); | ||||
|     const auto iod_nav = static_cast<uint32_t>(gal_eph.IOD_nav); | ||||
|     if (iod_nav > 1023) | ||||
|         { | ||||
|             LOG(WARNING) << "Error decoding Galileo IODnav (it has a max of 1023, but " << iod_nav << " was detected)"; | ||||
| @@ -4846,7 +4846,7 @@ int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto SISA = static_cast<uint16_t>(gal_eph.SISA_3); | ||||
|     const auto SISA = static_cast<uint16_t>(gal_eph.SISA); | ||||
|     // SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010 | ||||
|     DF291 = std::bitset<8>(SISA); | ||||
|     return 0; | ||||
| @@ -4855,7 +4855,7 @@ int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto idot = static_cast<int32_t>(std::round(gal_eph.iDot_2 / FNAV_IDOT_2_LSB)); | ||||
|     const auto idot = static_cast<int32_t>(std::round(gal_eph.idot / FNAV_IDOT_2_LSB)); | ||||
|     DF292 = std::bitset<14>(idot); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4863,7 +4863,7 @@ int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF293(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto toc = static_cast<uint32_t>(gal_eph.t0c_4); | ||||
|     const auto toc = static_cast<uint32_t>(gal_eph.toc); | ||||
|     if (toc > 604740) | ||||
|         { | ||||
|             LOG(WARNING) << "Error decoding Galileo ephemeris time (max of 604740, but " << toc << " was detected)"; | ||||
| @@ -4875,7 +4875,7 @@ int32_t Rtcm::set_DF293(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto af2 = static_cast<int16_t>(std::round(gal_eph.af2_4 / FNAV_AF2_1_LSB)); | ||||
|     const auto af2 = static_cast<int16_t>(std::round(gal_eph.af2 / FNAV_AF2_1_LSB)); | ||||
|     DF294 = std::bitset<6>(af2); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4883,7 +4883,7 @@ int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto af1 = static_cast<int64_t>(std::round(gal_eph.af1_4 / FNAV_AF1_1_LSB)); | ||||
|     const auto af1 = static_cast<int64_t>(std::round(gal_eph.af1 / FNAV_AF1_1_LSB)); | ||||
|     DF295 = std::bitset<21>(af1); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4891,7 +4891,7 @@ int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const int64_t af0 = static_cast<uint32_t>(std::round(gal_eph.af0_4 / FNAV_AF0_1_LSB)); | ||||
|     const int64_t af0 = static_cast<uint32_t>(std::round(gal_eph.af0 / FNAV_AF0_1_LSB)); | ||||
|     DF296 = std::bitset<31>(af0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4899,7 +4899,7 @@ int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto crs = static_cast<int32_t>(std::round(gal_eph.C_rs_3 / FNAV_CRS_3_LSB)); | ||||
|     const auto crs = static_cast<int32_t>(std::round(gal_eph.Crs / FNAV_CRS_3_LSB)); | ||||
|     DF297 = std::bitset<16>(crs); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4907,7 +4907,7 @@ int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n_3 / FNAV_DELTAN_3_LSB)); | ||||
|     const auto delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n / FNAV_DELTAN_3_LSB)); | ||||
|     DF298 = std::bitset<16>(delta_n); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4915,7 +4915,7 @@ int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF299(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto m0 = static_cast<int64_t>(std::round(gal_eph.M0_1 / FNAV_M0_2_LSB)); | ||||
|     const auto m0 = static_cast<int64_t>(std::round(gal_eph.M_0 / FNAV_M0_2_LSB)); | ||||
|     DF299 = std::bitset<32>(m0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4923,7 +4923,7 @@ int32_t Rtcm::set_DF299(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const int32_t cuc = static_cast<uint32_t>(std::round(gal_eph.C_uc_3 / FNAV_CUC_3_LSB)); | ||||
|     const int32_t cuc = static_cast<uint32_t>(std::round(gal_eph.Cuc / FNAV_CUC_3_LSB)); | ||||
|     DF300 = std::bitset<16>(cuc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4931,7 +4931,7 @@ int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto ecc = static_cast<uint64_t>(std::round(gal_eph.e_1 / FNAV_E_2_LSB)); | ||||
|     const auto ecc = static_cast<uint64_t>(std::round(gal_eph.ecc / FNAV_E_2_LSB)); | ||||
|     DF301 = std::bitset<32>(ecc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4939,7 +4939,7 @@ int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto cus = static_cast<int32_t>(std::round(gal_eph.C_us_3 / FNAV_CUS_3_LSB)); | ||||
|     const auto cus = static_cast<int32_t>(std::round(gal_eph.Cus / FNAV_CUS_3_LSB)); | ||||
|     DF302 = std::bitset<16>(cus); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4947,7 +4947,7 @@ int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto sqr_a = static_cast<uint64_t>(std::round(gal_eph.A_1 / FNAV_A12_2_LSB)); | ||||
|     const auto sqr_a = static_cast<uint64_t>(std::round(gal_eph.sqrtA / FNAV_A12_2_LSB)); | ||||
|     DF303 = std::bitset<32>(sqr_a); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4955,7 +4955,7 @@ int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto toe = static_cast<uint32_t>(std::round(gal_eph.t0e_1 / FNAV_T0E_3_LSB)); | ||||
|     const auto toe = static_cast<uint32_t>(std::round(gal_eph.toe / FNAV_T0E_3_LSB)); | ||||
|     DF304 = std::bitset<14>(toe); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4963,7 +4963,7 @@ int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto cic = static_cast<int32_t>(std::round(gal_eph.C_ic_4 / FNAV_CIC_4_LSB)); | ||||
|     const auto cic = static_cast<int32_t>(std::round(gal_eph.Cic / FNAV_CIC_4_LSB)); | ||||
|     DF305 = std::bitset<16>(cic); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4971,7 +4971,7 @@ int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0_2 / FNAV_OMEGA0_2_LSB)); | ||||
|     const auto Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0 / FNAV_OMEGA0_2_LSB)); | ||||
|     DF306 = std::bitset<32>(Omega0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4979,7 +4979,7 @@ int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto cis = static_cast<int32_t>(std::round(gal_eph.C_is_4 / FNAV_CIS_4_LSB)); | ||||
|     const auto cis = static_cast<int32_t>(std::round(gal_eph.Cis / FNAV_CIS_4_LSB)); | ||||
|     DF307 = std::bitset<16>(cis); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4987,7 +4987,7 @@ int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto i0 = static_cast<int64_t>(std::round(gal_eph.i_0_2 / FNAV_I0_3_LSB)); | ||||
|     const auto i0 = static_cast<int64_t>(std::round(gal_eph.i_0 / FNAV_I0_3_LSB)); | ||||
|     DF308 = std::bitset<32>(i0); | ||||
|     return 0; | ||||
| } | ||||
| @@ -4995,7 +4995,7 @@ int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const int32_t crc = static_cast<uint32_t>(std::round(gal_eph.C_rc_3 / FNAV_CRC_3_LSB)); | ||||
|     const int32_t crc = static_cast<uint32_t>(std::round(gal_eph.Crc / FNAV_CRC_3_LSB)); | ||||
|     DF309 = std::bitset<16>(crc); | ||||
|     return 0; | ||||
| } | ||||
| @@ -5003,7 +5003,7 @@ int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto omega = static_cast<int32_t>(std::round(gal_eph.omega_2 / FNAV_OMEGA0_2_LSB)); | ||||
|     const auto omega = static_cast<int32_t>(std::round(gal_eph.omega / FNAV_OMEGA0_2_LSB)); | ||||
|     DF310 = std::bitset<32>(omega); | ||||
|     return 0; | ||||
| } | ||||
| @@ -5011,7 +5011,7 @@ int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGA_dot_3 / FNAV_OMEGADOT_2_LSB)); | ||||
|     const auto Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGAdot / FNAV_OMEGADOT_2_LSB)); | ||||
|     DF311 = std::bitset<24>(Omegadot); | ||||
|     return 0; | ||||
| } | ||||
| @@ -5019,7 +5019,7 @@ int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto bdg_E1_E5a = static_cast<int32_t>(std::round(gal_eph.BGD_E1E5a_5 / FNAV_BGD_1_LSB)); | ||||
|     const auto bdg_E1_E5a = static_cast<int32_t>(std::round(gal_eph.BGD_E1E5a / FNAV_BGD_1_LSB)); | ||||
|     DF312 = std::bitset<10>(bdg_E1_E5a); | ||||
|     return 0; | ||||
| } | ||||
| @@ -5027,7 +5027,7 @@ int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph) | ||||
|  | ||||
| int32_t Rtcm::set_DF313(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     const auto bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b_5)); | ||||
|     const auto bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b)); | ||||
|     // bdg_E5b_E1 = 0; // reserved | ||||
|     DF313 = std::bitset<10>(bdg_E5b_E1); | ||||
|     return 0; | ||||
|   | ||||
| @@ -457,7 +457,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                         obsd_t newobs{}; | ||||
|                                         obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                             gnss_observables_iter->second, | ||||
|                                             galileo_ephemeris_iter->second.WN_5, | ||||
|                                             galileo_ephemeris_iter->second.WN, | ||||
|                                             0); | ||||
|                                         valid_obs++; | ||||
|                                     } | ||||
| @@ -481,7 +481,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     { | ||||
|                                                         obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs], | ||||
|                                                             gnss_observables_iter->second, | ||||
|                                                             galileo_ephemeris_iter->second.WN_5, | ||||
|                                                             galileo_ephemeris_iter->second.WN, | ||||
|                                                             2);  // Band 3 (L5/E5) | ||||
|                                                         found_E1_obs = true; | ||||
|                                                         break; | ||||
| @@ -499,7 +499,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     {}, {0.0, 0.0, 0.0}, {}}; | ||||
|                                                 obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                                     gnss_observables_iter->second, | ||||
|                                                     galileo_ephemeris_iter->second.WN_5, | ||||
|                                                     galileo_ephemeris_iter->second.WN, | ||||
|                                                     2);  // Band 3 (L5/E5) | ||||
|                                                 valid_obs++; | ||||
|                                             } | ||||
| @@ -527,7 +527,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                         obsd_t newobs{}; | ||||
|                                         obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                             gnss_observables_iter->second, | ||||
|                                             gps_ephemeris_iter->second.i_GPS_week, | ||||
|                                             gps_ephemeris_iter->second.WN, | ||||
|                                             0, | ||||
|                                             this->is_pre_2009()); | ||||
|                                         valid_obs++; | ||||
| @@ -576,7 +576,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     {}, {0.0, 0.0, 0.0}, {}}; | ||||
|                                                 obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                                     gnss_observables_iter->second, | ||||
|                                                     gps_cnav_ephemeris_iter->second.i_GPS_week, | ||||
|                                                     gps_cnav_ephemeris_iter->second.WN, | ||||
|                                                     1);  // Band 2 (L2) | ||||
|                                                 valid_obs++; | ||||
|                                             } | ||||
| @@ -605,7 +605,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                                 eph_data[i] = eph_to_rtklib(gps_cnav_ephemeris_iter->second); | ||||
|                                                                 obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i], | ||||
|                                                                     gnss_observables_iter->second, | ||||
|                                                                     gps_cnav_ephemeris_iter->second.i_GPS_week, | ||||
|                                                                     gps_cnav_ephemeris_iter->second.WN, | ||||
|                                                                     2);  // Band 3 (L5) | ||||
|                                                                 break; | ||||
|                                                             } | ||||
| @@ -623,7 +623,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     {}, {0.0, 0.0, 0.0}, {}}; | ||||
|                                                 obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                                     gnss_observables_iter->second, | ||||
|                                                     gps_cnav_ephemeris_iter->second.i_GPS_week, | ||||
|                                                     gps_cnav_ephemeris_iter->second.WN, | ||||
|                                                     2);  // Band 3 (L5) | ||||
|                                                 valid_obs++; | ||||
|                                             } | ||||
| @@ -717,7 +717,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                         obsd_t newobs{}; | ||||
|                                         obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                             gnss_observables_iter->second, | ||||
|                                             beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                             beidou_ephemeris_iter->second.WN + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                             0); | ||||
|                                         valid_obs++; | ||||
|                                     } | ||||
| @@ -739,7 +739,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     { | ||||
|                                                         obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(obs_data[i + glo_valid_obs], | ||||
|                                                             gnss_observables_iter->second, | ||||
|                                                             beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                                             beidou_ephemeris_iter->second.WN + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                                             2);  // Band 3 (L2/G2/B3) | ||||
|                                                         found_B1I_obs = true; | ||||
|                                                         break; | ||||
| @@ -757,7 +757,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                     {}, {0.0, 0.0, 0.0}, {}}; | ||||
|                                                 obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs, | ||||
|                                                     gnss_observables_iter->second, | ||||
|                                                     beidou_ephemeris_iter->second.i_BEIDOU_week + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                                     beidou_ephemeris_iter->second.WN + BEIDOU_DNAV_BDT2GPST_WEEK_NUM_OFFSET, | ||||
|                                                     2);  // Band 2 (L2/G2) | ||||
|                                                 valid_obs++; | ||||
|                                             } | ||||
| @@ -791,59 +791,59 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|             nav_data.ng = glo_valid_obs; | ||||
|             if (gps_iono.valid) | ||||
|                 { | ||||
|                     nav_data.ion_gps[0] = gps_iono.d_alpha0; | ||||
|                     nav_data.ion_gps[1] = gps_iono.d_alpha1; | ||||
|                     nav_data.ion_gps[2] = gps_iono.d_alpha2; | ||||
|                     nav_data.ion_gps[3] = gps_iono.d_alpha3; | ||||
|                     nav_data.ion_gps[4] = gps_iono.d_beta0; | ||||
|                     nav_data.ion_gps[5] = gps_iono.d_beta1; | ||||
|                     nav_data.ion_gps[6] = gps_iono.d_beta2; | ||||
|                     nav_data.ion_gps[7] = gps_iono.d_beta3; | ||||
|                     nav_data.ion_gps[0] = gps_iono.alpha0; | ||||
|                     nav_data.ion_gps[1] = gps_iono.alpha1; | ||||
|                     nav_data.ion_gps[2] = gps_iono.alpha2; | ||||
|                     nav_data.ion_gps[3] = gps_iono.alpha3; | ||||
|                     nav_data.ion_gps[4] = gps_iono.beta0; | ||||
|                     nav_data.ion_gps[5] = gps_iono.beta1; | ||||
|                     nav_data.ion_gps[6] = gps_iono.beta2; | ||||
|                     nav_data.ion_gps[7] = gps_iono.beta3; | ||||
|                 } | ||||
|             if (!(gps_iono.valid) and gps_cnav_iono.valid) | ||||
|                 { | ||||
|                     nav_data.ion_gps[0] = gps_cnav_iono.d_alpha0; | ||||
|                     nav_data.ion_gps[1] = gps_cnav_iono.d_alpha1; | ||||
|                     nav_data.ion_gps[2] = gps_cnav_iono.d_alpha2; | ||||
|                     nav_data.ion_gps[3] = gps_cnav_iono.d_alpha3; | ||||
|                     nav_data.ion_gps[4] = gps_cnav_iono.d_beta0; | ||||
|                     nav_data.ion_gps[5] = gps_cnav_iono.d_beta1; | ||||
|                     nav_data.ion_gps[6] = gps_cnav_iono.d_beta2; | ||||
|                     nav_data.ion_gps[7] = gps_cnav_iono.d_beta3; | ||||
|                     nav_data.ion_gps[0] = gps_cnav_iono.alpha0; | ||||
|                     nav_data.ion_gps[1] = gps_cnav_iono.alpha1; | ||||
|                     nav_data.ion_gps[2] = gps_cnav_iono.alpha2; | ||||
|                     nav_data.ion_gps[3] = gps_cnav_iono.alpha3; | ||||
|                     nav_data.ion_gps[4] = gps_cnav_iono.beta0; | ||||
|                     nav_data.ion_gps[5] = gps_cnav_iono.beta1; | ||||
|                     nav_data.ion_gps[6] = gps_cnav_iono.beta2; | ||||
|                     nav_data.ion_gps[7] = gps_cnav_iono.beta3; | ||||
|                 } | ||||
|             if (galileo_iono.ai0_5 != 0.0) | ||||
|             if (galileo_iono.ai0 != 0.0) | ||||
|                 { | ||||
|                     nav_data.ion_gal[0] = galileo_iono.ai0_5; | ||||
|                     nav_data.ion_gal[1] = galileo_iono.ai1_5; | ||||
|                     nav_data.ion_gal[2] = galileo_iono.ai2_5; | ||||
|                     nav_data.ion_gal[0] = galileo_iono.ai0; | ||||
|                     nav_data.ion_gal[1] = galileo_iono.ai1; | ||||
|                     nav_data.ion_gal[2] = galileo_iono.ai2; | ||||
|                     nav_data.ion_gal[3] = 0.0; | ||||
|                 } | ||||
|             if (beidou_dnav_iono.valid) | ||||
|                 { | ||||
|                     nav_data.ion_cmp[0] = beidou_dnav_iono.d_alpha0; | ||||
|                     nav_data.ion_cmp[1] = beidou_dnav_iono.d_alpha1; | ||||
|                     nav_data.ion_cmp[2] = beidou_dnav_iono.d_alpha2; | ||||
|                     nav_data.ion_cmp[3] = beidou_dnav_iono.d_alpha3; | ||||
|                     nav_data.ion_cmp[4] = beidou_dnav_iono.d_beta0; | ||||
|                     nav_data.ion_cmp[5] = beidou_dnav_iono.d_beta0; | ||||
|                     nav_data.ion_cmp[6] = beidou_dnav_iono.d_beta0; | ||||
|                     nav_data.ion_cmp[7] = beidou_dnav_iono.d_beta3; | ||||
|                     nav_data.ion_cmp[0] = beidou_dnav_iono.alpha0; | ||||
|                     nav_data.ion_cmp[1] = beidou_dnav_iono.alpha1; | ||||
|                     nav_data.ion_cmp[2] = beidou_dnav_iono.alpha2; | ||||
|                     nav_data.ion_cmp[3] = beidou_dnav_iono.alpha3; | ||||
|                     nav_data.ion_cmp[4] = beidou_dnav_iono.beta0; | ||||
|                     nav_data.ion_cmp[5] = beidou_dnav_iono.beta0; | ||||
|                     nav_data.ion_cmp[6] = beidou_dnav_iono.beta0; | ||||
|                     nav_data.ion_cmp[7] = beidou_dnav_iono.beta3; | ||||
|                 } | ||||
|             if (gps_utc_model.valid) | ||||
|                 { | ||||
|                     nav_data.utc_gps[0] = gps_utc_model.d_A0; | ||||
|                     nav_data.utc_gps[1] = gps_utc_model.d_A1; | ||||
|                     nav_data.utc_gps[2] = gps_utc_model.d_t_OT; | ||||
|                     nav_data.utc_gps[3] = gps_utc_model.i_WN_T; | ||||
|                     nav_data.leaps = gps_utc_model.d_DeltaT_LS; | ||||
|                     nav_data.utc_gps[0] = gps_utc_model.A0; | ||||
|                     nav_data.utc_gps[1] = gps_utc_model.A1; | ||||
|                     nav_data.utc_gps[2] = gps_utc_model.tot; | ||||
|                     nav_data.utc_gps[3] = gps_utc_model.WN_T; | ||||
|                     nav_data.leaps = gps_utc_model.DeltaT_LS; | ||||
|                 } | ||||
|             if (!(gps_utc_model.valid) and gps_cnav_utc_model.valid) | ||||
|                 { | ||||
|                     nav_data.utc_gps[0] = gps_cnav_utc_model.d_A0; | ||||
|                     nav_data.utc_gps[1] = gps_cnav_utc_model.d_A1; | ||||
|                     nav_data.utc_gps[2] = gps_cnav_utc_model.d_t_OT; | ||||
|                     nav_data.utc_gps[3] = gps_cnav_utc_model.i_WN_T; | ||||
|                     nav_data.leaps = gps_cnav_utc_model.d_DeltaT_LS; | ||||
|                     nav_data.utc_gps[0] = gps_cnav_utc_model.A0; | ||||
|                     nav_data.utc_gps[1] = gps_cnav_utc_model.A1; | ||||
|                     nav_data.utc_gps[2] = gps_cnav_utc_model.tot; | ||||
|                     nav_data.utc_gps[3] = gps_cnav_utc_model.WN_T; | ||||
|                     nav_data.leaps = gps_cnav_utc_model.DeltaT_LS; | ||||
|                 } | ||||
|             if (glonass_gnav_utc_model.valid) | ||||
|                 { | ||||
| @@ -852,21 +852,21 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                     nav_data.utc_glo[2] = 0.0;                             // ?? | ||||
|                     nav_data.utc_glo[3] = 0.0;                             // ?? | ||||
|                 } | ||||
|             if (galileo_utc_model.A0_6 != 0.0) | ||||
|             if (galileo_utc_model.A0 != 0.0) | ||||
|                 { | ||||
|                     nav_data.utc_gal[0] = galileo_utc_model.A0_6; | ||||
|                     nav_data.utc_gal[1] = galileo_utc_model.A1_6; | ||||
|                     nav_data.utc_gal[2] = galileo_utc_model.t0t_6; | ||||
|                     nav_data.utc_gal[3] = galileo_utc_model.WNot_6; | ||||
|                     nav_data.leaps = galileo_utc_model.Delta_tLS_6; | ||||
|                     nav_data.utc_gal[0] = galileo_utc_model.A0; | ||||
|                     nav_data.utc_gal[1] = galileo_utc_model.A1; | ||||
|                     nav_data.utc_gal[2] = galileo_utc_model.tot; | ||||
|                     nav_data.utc_gal[3] = galileo_utc_model.WNot; | ||||
|                     nav_data.leaps = galileo_utc_model.Delta_tLS; | ||||
|                 } | ||||
|             if (beidou_dnav_utc_model.valid) | ||||
|                 { | ||||
|                     nav_data.utc_cmp[0] = beidou_dnav_utc_model.d_A0_UTC; | ||||
|                     nav_data.utc_cmp[1] = beidou_dnav_utc_model.d_A1_UTC; | ||||
|                     nav_data.utc_cmp[0] = beidou_dnav_utc_model.A0_UTC; | ||||
|                     nav_data.utc_cmp[1] = beidou_dnav_utc_model.A1_UTC; | ||||
|                     nav_data.utc_cmp[2] = 0.0;  // ?? | ||||
|                     nav_data.utc_cmp[3] = 0.0;  // ?? | ||||
|                     nav_data.leaps = beidou_dnav_utc_model.i_DeltaT_LS; | ||||
|                     nav_data.leaps = beidou_dnav_utc_model.DeltaT_LS; | ||||
|                 } | ||||
|  | ||||
|             /* update carrier wave length using native function call in RTKlib */ | ||||
|   | ||||
| @@ -80,50 +80,50 @@ public: | ||||
|  | ||||
|         std::string data; | ||||
|  | ||||
|         monitor_.set_i_satellite_prn(monitor->i_satellite_PRN); | ||||
|         monitor_.set_i_satellite_prn(monitor->PRN); | ||||
|         monitor_.set_iod_ephemeris(monitor->IOD_ephemeris); | ||||
|         monitor_.set_iod_nav_1(monitor->IOD_nav_1); | ||||
|         monitor_.set_m0_1(monitor->M0_1);                //!< Mean anomaly at reference time [semi-circles] | ||||
|         monitor_.set_delta_n_3(monitor->delta_n_3);      //!< Mean motion difference from computed value [semi-circles/sec] | ||||
|         monitor_.set_e_1(monitor->e_1);                  //!< Eccentricity | ||||
|         monitor_.set_a_1(monitor->A_1);                  //!< Square root of the semi-major axis [meters^1/2] | ||||
|         monitor_.set_omega_0_2(monitor->OMEGA_0_2);      //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles] | ||||
|         monitor_.set_i_0_2(monitor->i_0_2);              //!< Inclination angle at reference time  [semi-circles] | ||||
|         monitor_.set_omega_2(monitor->omega_2);          //!< Argument of perigee [semi-circles] | ||||
|         monitor_.set_omega_dot_3(monitor->OMEGA_dot_3);  //!< Rate of right ascension [semi-circles/sec] | ||||
|         monitor_.set_idot_2(monitor->iDot_2);            //!< Rate of inclination angle [semi-circles/sec] | ||||
|         monitor_.set_c_uc_3(monitor->C_uc_3);            //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor_.set_c_us_3(monitor->C_us_3);            //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor_.set_c_rc_3(monitor->C_rc_3);            //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters] | ||||
|         monitor_.set_c_rs_3(monitor->C_rs_3);            //!< Amplitude of the sine harmonic correction term to the orbit radius [meters] | ||||
|         monitor_.set_c_ic_4(monitor->C_ic_4);            //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor_.set_c_is_4(monitor->C_is_4);            //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor_.set_d_toe(monitor->t0e_1);              // Ephemeris reference time | ||||
|         monitor_.set_iod_nav_1(monitor->IOD_nav); | ||||
|         monitor_.set_m0_1(monitor->M_0);              //!< Mean anomaly at reference time [semi-circles] | ||||
|         monitor_.set_delta_n_3(monitor->delta_n);     //!< Mean motion difference from computed value [semi-circles/sec] | ||||
|         monitor_.set_e_1(monitor->ecc);               //!< Eccentricity | ||||
|         monitor_.set_a_1(monitor->sqrtA);             //!< Square root of the semi-major axis [meters^1/2] | ||||
|         monitor_.set_omega_0_2(monitor->OMEGA_0);     //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles] | ||||
|         monitor_.set_i_0_2(monitor->i_0);             //!< Inclination angle at reference time  [semi-circles] | ||||
|         monitor_.set_omega_2(monitor->omega);         //!< Argument of perigee [semi-circles] | ||||
|         monitor_.set_omega_dot_3(monitor->OMEGAdot);  //!< Rate of right ascension [semi-circles/sec] | ||||
|         monitor_.set_idot_2(monitor->idot);           //!< Rate of inclination angle [semi-circles/sec] | ||||
|         monitor_.set_c_uc_3(monitor->Cuc);            //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor_.set_c_us_3(monitor->Cus);            //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor_.set_c_rc_3(monitor->Crc);            //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters] | ||||
|         monitor_.set_c_rs_3(monitor->Crs);            //!< Amplitude of the sine harmonic correction term to the orbit radius [meters] | ||||
|         monitor_.set_c_ic_4(monitor->Cic);            //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor_.set_c_is_4(monitor->Cis);            //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor_.set_d_toe(monitor->toe);             //!< Ephemeris reference time | ||||
|  | ||||
|         /*Clock correction parameters*/ | ||||
|         monitor_.set_d_toc(monitor->t0c_4);  // Clock correction data reference Time of Week | ||||
|         monitor_.set_af0_4(monitor->af0_4);  //!< SV clock bias correction coefficient [s] | ||||
|         monitor_.set_af1_4(monitor->af1_4);  //!< SV clock drift correction coefficient [s/s] | ||||
|         monitor_.set_af2_4(monitor->af2_4);  //!< SV clock drift rate correction coefficient [s/s^2] | ||||
|         monitor_.set_d_toc(monitor->toc);  //!< Clock correction data reference Time of Week | ||||
|         monitor_.set_af0_4(monitor->af0);  //!< SV clock bias correction coefficient [s] | ||||
|         monitor_.set_af1_4(monitor->af1);  //!< SV clock drift correction coefficient [s/s] | ||||
|         monitor_.set_af2_4(monitor->af2);  //!< SV clock drift rate correction coefficient [s/s^2] | ||||
|  | ||||
|         /*GST*/ | ||||
|         // Not belong to ephemeris set (page 1 to 4) | ||||
|         monitor_.set_wn_5(monitor->WN_5);    //!< Week number | ||||
|         monitor_.set_tow_5(monitor->TOW_5);  //!< Time of Week | ||||
|         monitor_.set_galileo_satclkdrift(monitor->Galileo_satClkDrift); | ||||
|         monitor_.set_galileo_dtr(monitor->Galileo_dtr);  //!< relativistic clock correction term | ||||
|         monitor_.set_wn_5(monitor->WN);    //!< Week number | ||||
|         monitor_.set_tow_5(monitor->tow);  //!< Time of Week | ||||
|         monitor_.set_galileo_satclkdrift(monitor->satClkDrift); | ||||
|         monitor_.set_galileo_dtr(monitor->dtr);  //!< relativistic clock correction term | ||||
|  | ||||
|         // SV status | ||||
|         monitor_.set_sisa_3(monitor->SISA_3); | ||||
|         monitor_.set_e5a_hs(monitor->E5a_HS);        //!< E5a Signal Health Status | ||||
|         monitor_.set_e5b_hs_5(monitor->E5b_HS_5);    //!< E5b Signal Health Status | ||||
|         monitor_.set_e1b_hs_5(monitor->E1B_HS_5);    //!< E1B Signal Health Status | ||||
|         monitor_.set_e5a_dvs(monitor->E5a_DVS);      //!< E5a Data Validity Status | ||||
|         monitor_.set_e5b_dvs_5(monitor->E5b_DVS_5);  //!< E5b Data Validity Status | ||||
|         monitor_.set_e1b_dvs_5(monitor->E1B_DVS_5);  //!< E1B Data Validity Status | ||||
|         monitor_.set_sisa_3(monitor->SISA); | ||||
|         monitor_.set_e5a_hs(monitor->E5a_HS);      //!< E5a Signal Health Status | ||||
|         monitor_.set_e5b_hs_5(monitor->E5b_HS);    //!< E5b Signal Health Status | ||||
|         monitor_.set_e1b_hs_5(monitor->E1B_HS);    //!< E1B Signal Health Status | ||||
|         monitor_.set_e5a_dvs(monitor->E5a_DVS);    //!< E5a Data Validity Status | ||||
|         monitor_.set_e5b_dvs_5(monitor->E5b_DVS);  //!< E5b Data Validity Status | ||||
|         monitor_.set_e1b_dvs_5(monitor->E1B_DVS);  //!< E1B Data Validity Status | ||||
|  | ||||
|         monitor_.set_bgd_e1e5a_5(monitor->BGD_E1E5a_5);  //!< E1-E5a Broadcast Group Delay [s] | ||||
|         monitor_.set_bgd_e1e5b_5(monitor->BGD_E1E5b_5);  //!< E1-E5b Broadcast Group Delay [s] | ||||
|         monitor_.set_bgd_e1e5a_5(monitor->BGD_E1E5a);  //!< E1-E5a Broadcast Group Delay [s] | ||||
|         monitor_.set_bgd_e1e5b_5(monitor->BGD_E1E5b);  //!< E1-E5b Broadcast Group Delay [s] | ||||
|  | ||||
|         monitor_.SerializeToString(&data); | ||||
|         return data; | ||||
| @@ -133,51 +133,51 @@ public: | ||||
|     { | ||||
|         Galileo_Ephemeris monitor; | ||||
|  | ||||
|         monitor.i_satellite_PRN = mon.i_satellite_prn(); | ||||
|         monitor.PRN = mon.i_satellite_prn(); | ||||
|  | ||||
|         monitor.IOD_ephemeris = mon.iod_ephemeris(); | ||||
|         monitor.IOD_nav_1 = mon.iod_nav_1(); | ||||
|         monitor.M0_1 = mon.m0_1();                //!< Mean anomaly at reference time [semi-circles] | ||||
|         monitor.delta_n_3 = mon.delta_n_3();      //!< Mean motion difference from computed value [semi-circles/sec] | ||||
|         monitor.e_1 = mon.e_1();                  //!< Eccentricity | ||||
|         monitor.A_1 = mon.a_1();                  //!< Square root of the semi-major axis [meters^1/2] | ||||
|         monitor.OMEGA_0_2 = mon.omega_0_2();      //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles] | ||||
|         monitor.i_0_2 = mon.i_0_2();              //!< Inclination angle at reference time  [semi-circles] | ||||
|         monitor.omega_2 = mon.omega_2();          //!< Argument of perigee [semi-circles] | ||||
|         monitor.OMEGA_dot_3 = mon.omega_dot_3();  //!< Rate of right ascension [semi-circles/sec] | ||||
|         monitor.iDot_2 = mon.idot_2();            //!< Rate of inclination angle [semi-circles/sec] | ||||
|         monitor.C_uc_3 = mon.c_uc_3();            //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor.C_us_3 = mon.c_us_3();            //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor.C_rc_3 = mon.c_rc_3();            //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters] | ||||
|         monitor.C_rs_3 = mon.c_rs_3();            //!< Amplitude of the sine harmonic correction term to the orbit radius [meters] | ||||
|         monitor.C_ic_4 = mon.c_ic_4();            //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor.C_is_4 = mon.c_is_4();            //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor.t0e_1 = mon.d_toe();              // Ephemeris reference time | ||||
|         monitor.IOD_nav = mon.iod_nav_1(); | ||||
|         monitor.M_0 = mon.m0_1();              //!< Mean anomaly at reference time [semi-circles] | ||||
|         monitor.delta_n = mon.delta_n_3();     //!< Mean motion difference from computed value [semi-circles/sec] | ||||
|         monitor.ecc = mon.e_1();               //!< Eccentricity | ||||
|         monitor.sqrtA = mon.a_1();             //!< Square root of the semi-major axis [meters^1/2] | ||||
|         monitor.OMEGA_0 = mon.omega_0_2();     //!< Longitude of ascending node of orbital plane at weekly epoch [semi-circles] | ||||
|         monitor.i_0 = mon.i_0_2();             //!< Inclination angle at reference time  [semi-circles] | ||||
|         monitor.omega = mon.omega_2();         //!< Argument of perigee [semi-circles] | ||||
|         monitor.OMEGAdot = mon.omega_dot_3();  //!< Rate of right ascension [semi-circles/sec] | ||||
|         monitor.idot = mon.idot_2();           //!< Rate of inclination angle [semi-circles/sec] | ||||
|         monitor.Cuc = mon.c_uc_3();            //!< Amplitude of the cosine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor.Cus = mon.c_us_3();            //!< Amplitude of the sine harmonic correction term to the argument of latitude [radians] | ||||
|         monitor.Crc = mon.c_rc_3();            //!< Amplitude of the cosine harmonic correction term to the orbit radius [meters] | ||||
|         monitor.Crs = mon.c_rs_3();            //!< Amplitude of the sine harmonic correction term to the orbit radius [meters] | ||||
|         monitor.Cic = mon.c_ic_4();            //!< Amplitude of the cosine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor.Cis = mon.c_is_4();            //!< Amplitude of the sine harmonic correction term to the angle of inclination [radians] | ||||
|         monitor.toe = mon.d_toe();             // Ephemeris reference time | ||||
|  | ||||
|         /*Clock correction parameters*/ | ||||
|         monitor.t0c_4 = mon.d_toc();  // Clock correction data reference Time of Week | ||||
|         monitor.af0_4 = mon.af0_4();  //!< SV clock bias correction coefficient [s] | ||||
|         monitor.af1_4 = mon.af1_4();  //!< SV clock drift correction coefficient [s/s] | ||||
|         monitor.af2_4 = mon.af2_4();  //!< SV clock drift rate correction coefficient [s/s^2] | ||||
|         monitor.toc = mon.d_toc();  // Clock correction data reference Time of Week | ||||
|         monitor.af0 = mon.af0_4();  //!< SV clock bias correction coefficient [s] | ||||
|         monitor.af1 = mon.af1_4();  //!< SV clock drift correction coefficient [s/s] | ||||
|         monitor.af2 = mon.af2_4();  //!< SV clock drift rate correction coefficient [s/s^2] | ||||
|  | ||||
|         /*GST*/ | ||||
|         // Not belong to ephemeris set (page 1 to 4) | ||||
|         monitor.WN_5 = mon.wn_5();    //!< Week number | ||||
|         monitor.TOW_5 = mon.tow_5();  //!< Time of Week | ||||
|         monitor.Galileo_satClkDrift = mon.galileo_satclkdrift(); | ||||
|         monitor.Galileo_dtr = mon.galileo_dtr();  //!< relativistic clock correction term | ||||
|         monitor.WN = mon.wn_5();    //!< Week number | ||||
|         monitor.tow = mon.tow_5();  //!< Time of Week | ||||
|         monitor.satClkDrift = mon.galileo_satclkdrift(); | ||||
|         monitor.dtr = mon.galileo_dtr();  //!< relativistic clock correction term | ||||
|  | ||||
|         // SV status | ||||
|         monitor.SISA_3 = mon.sisa_3(); | ||||
|         monitor.E5a_HS = mon.e5a_hs();        //!< E5a Signal Health Status | ||||
|         monitor.E5b_HS_5 = mon.e5b_hs_5();    //!< E5b Signal Health Status | ||||
|         monitor.E1B_HS_5 = mon.e1b_hs_5();    //!< E1B Signal Health Status | ||||
|         monitor.E5a_DVS = mon.e5a_dvs();      //!< E5a Data Validity Status | ||||
|         monitor.E5b_DVS_5 = mon.e5b_dvs_5();  //!< E5b Data Validity Status | ||||
|         monitor.E1B_DVS_5 = mon.e1b_dvs_5();  //!< E1B Data Validity Status | ||||
|         monitor.SISA = mon.sisa_3(); | ||||
|         monitor.E5a_HS = mon.e5a_hs();      //!< E5a Signal Health Status | ||||
|         monitor.E5b_HS = mon.e5b_hs_5();    //!< E5b Signal Health Status | ||||
|         monitor.E1B_HS = mon.e1b_hs_5();    //!< E1B Signal Health Status | ||||
|         monitor.E5a_DVS = mon.e5a_dvs();    //!< E5a Data Validity Status | ||||
|         monitor.E5b_DVS = mon.e5b_dvs_5();  //!< E5b Data Validity Status | ||||
|         monitor.E1B_DVS = mon.e1b_dvs_5();  //!< E1B Data Validity Status | ||||
|  | ||||
|         monitor.BGD_E1E5a_5 = mon.bgd_e1e5a_5();  //!< E1-E5a Broadcast Group Delay [s] | ||||
|         monitor.BGD_E1E5b_5 = mon.bgd_e1e5b_5();  //!< E1-E5b Broadcast Group Delay [s] | ||||
|         monitor.BGD_E1E5a = mon.bgd_e1e5a_5();  //!< E1-E5a Broadcast Group Delay [s] | ||||
|         monitor.BGD_E1E5b = mon.bgd_e1e5b_5();  //!< E1-E5b Broadcast Group Delay [s] | ||||
|  | ||||
|         return monitor; | ||||
|     } | ||||
|   | ||||
| @@ -78,47 +78,47 @@ public: | ||||
|     { | ||||
|         monitor_.Clear(); | ||||
|         std::string data; | ||||
|         monitor_.set_i_satellite_prn(monitor->i_satellite_PRN);    // SV PRN NUMBER | ||||
|         monitor_.set_d_tow(monitor->d_TOW);                        //!< time of gps week of the ephemeris set (taken from subframes tow) [s] | ||||
|         monitor_.set_d_crs(monitor->d_Crs);                        //!< amplitude of the sine harmonic correction term to the orbit radius [m] | ||||
|         monitor_.set_d_delta_n(monitor->d_Delta_n);                //!< mean motion difference from computed value [semi-circles/s] | ||||
|         monitor_.set_d_m_0(monitor->d_M_0);                        //!< mean anomaly at reference time [semi-circles] | ||||
|         monitor_.set_d_cuc(monitor->d_Cuc);                        //!< amplitude of the cosine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor_.set_d_e_eccentricity(monitor->d_e_eccentricity);  //!< eccentricity [dimensionless] | ||||
|         monitor_.set_d_cus(monitor->d_Cus);                        //!< amplitude of the sine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor_.set_d_sqrt_a(monitor->d_sqrt_A);                  //!< square root of the semi-major axis [sqrt(m)] | ||||
|         monitor_.set_d_toe(monitor->d_Toe);                        //!< ephemeris data reference time of week (ref. 20.3.3.4.3 is-gps-200k) [s] | ||||
|         monitor_.set_d_toc(monitor->d_Toc);                        //!< clock data reference time (ref. 20.3.3.3.3.1 is-gps-200k) [s] | ||||
|         monitor_.set_d_cic(monitor->d_Cic);                        //!< amplitude of the cosine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor_.set_d_omega0(monitor->d_OMEGA0);                  //!< longitude of ascending node of orbit plane at weekly epoch [semi-circles] | ||||
|         monitor_.set_d_cis(monitor->d_Cis);                        //!< amplitude of the sine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor_.set_d_i_0(monitor->d_i_0);                        //!< inclination angle at reference time [semi-circles] | ||||
|         monitor_.set_d_crc(monitor->d_Crc);                        //!< amplitude of the cosine harmonic correction term to the orbit radius [m] | ||||
|         monitor_.set_d_omega(monitor->d_OMEGA);                    //!< argument of perigee [semi-cicles] | ||||
|         monitor_.set_d_omega_dot(monitor->d_OMEGA_DOT);            //!< rate of right ascension [semi-circles/s] | ||||
|         monitor_.set_d_idot(monitor->d_IDOT);                      //!< rate of inclination angle [semi-circles/s] | ||||
|         monitor_.set_i_code_on_l2(monitor->i_code_on_L2);          //!< if 1, p code on in l2;  if 2, c/a code on in l2; | ||||
|         monitor_.set_i_gps_week(monitor->i_GPS_week);              //!< gps week number, aka wn [week] | ||||
|         monitor_.set_b_l2_p_data_flag(monitor->b_L2_P_data_flag);  //!< when true, indicates that the nav data stream was commanded off on the p-code of the l2 channel | ||||
|         monitor_.set_i_sv_accuracy(monitor->i_SV_accuracy);        //!< user range accuracy (ura) index of the sv (reference paragraph 6.2.1) for the standard positioning service user (ref 20.3.3.3.1.3 is-gps-200k) | ||||
|         monitor_.set_i_sv_health(monitor->i_SV_health); | ||||
|         monitor_.set_d_tgd(monitor->d_TGD);            //!< estimated group delay differential: l1-l2 correction term only for the benefit of "l1 p(y)" or "l2 p(y)" s users [s] | ||||
|         monitor_.set_d_iodc(monitor->d_IODC);          //!< issue of data, clock | ||||
|         monitor_.set_d_iode_sf2(monitor->d_IODE_SF2);  //!< issue of data, ephemeris (iode), subframe 2 | ||||
|         monitor_.set_d_iode_sf3(monitor->d_IODE_SF3);  //!< issue of data, ephemeris(iode), subframe 3 | ||||
|         monitor_.set_i_aodo(monitor->i_AODO);          //!< age of data offset (aodo) term for the navigation message correction table (nmct) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s] | ||||
|         monitor_.set_i_satellite_prn(monitor->PRN);              //!< SV PRN NUMBER | ||||
|         monitor_.set_d_tow(monitor->tow);                        //!< time of gps week of the ephemeris set (taken from subframes tow) [s] | ||||
|         monitor_.set_d_crs(monitor->Crs);                        //!< amplitude of the sine harmonic correction term to the orbit radius [m] | ||||
|         monitor_.set_d_delta_n(monitor->delta_n);                //!< mean motion difference from computed value [semi-circles/s] | ||||
|         monitor_.set_d_m_0(monitor->M_0);                        //!< mean anomaly at reference time [semi-circles] | ||||
|         monitor_.set_d_cuc(monitor->Cuc);                        //!< amplitude of the cosine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor_.set_d_e_eccentricity(monitor->ecc);             //!< eccentricity [dimensionless] | ||||
|         monitor_.set_d_cus(monitor->Cus);                        //!< amplitude of the sine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor_.set_d_sqrt_a(monitor->sqrtA);                   //!< square root of the semi-major axis [sqrt(m)] | ||||
|         monitor_.set_d_toe(monitor->toe);                        //!< ephemeris data reference time of week (ref. 20.3.3.4.3 is-gps-200k) [s] | ||||
|         monitor_.set_d_toc(monitor->toc);                        //!< clock data reference time (ref. 20.3.3.3.3.1 is-gps-200k) [s] | ||||
|         monitor_.set_d_cic(monitor->Cic);                        //!< amplitude of the cosine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor_.set_d_omega0(monitor->OMEGA_0);                 //!< longitude of ascending node of orbit plane at weekly epoch [semi-circles] | ||||
|         monitor_.set_d_cis(monitor->Cis);                        //!< amplitude of the sine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor_.set_d_i_0(monitor->i_0);                        //!< inclination angle at reference time [semi-circles] | ||||
|         monitor_.set_d_crc(monitor->Crc);                        //!< amplitude of the cosine harmonic correction term to the orbit radius [m] | ||||
|         monitor_.set_d_omega(monitor->omega);                    //!< argument of perigee [semi-cicles] | ||||
|         monitor_.set_d_omega_dot(monitor->OMEGAdot);             //!< rate of right ascension [semi-circles/s] | ||||
|         monitor_.set_d_idot(monitor->idot);                      //!< rate of inclination angle [semi-circles/s] | ||||
|         monitor_.set_i_code_on_l2(monitor->code_on_L2);          //!< if 1, p code on in l2;  if 2, c/a code on in l2; | ||||
|         monitor_.set_i_gps_week(monitor->WN);                    //!< gps week number, aka wn [week] | ||||
|         monitor_.set_b_l2_p_data_flag(monitor->L2_P_data_flag);  //!< when true, indicates that the nav data stream was commanded off on the p-code of the l2 channel | ||||
|         monitor_.set_i_sv_accuracy(monitor->SV_accuracy);        //!< user range accuracy (ura) index of the sv (reference paragraph 6.2.1) for the standard positioning service user (ref 20.3.3.3.1.3 is-gps-200k) | ||||
|         monitor_.set_i_sv_health(monitor->SV_health); | ||||
|         monitor_.set_d_tgd(monitor->TGD);            //!< estimated group delay differential: l1-l2 correction term only for the benefit of "l1 p(y)" or "l2 p(y)" s users [s] | ||||
|         monitor_.set_d_iodc(monitor->IODC);          //!< issue of data, clock | ||||
|         monitor_.set_d_iode_sf2(monitor->IODE_SF2);  //!< issue of data, ephemeris (iode), subframe 2 | ||||
|         monitor_.set_d_iode_sf3(monitor->IODE_SF3);  //!< issue of data, ephemeris(iode), subframe 3 | ||||
|         monitor_.set_i_aodo(monitor->AODO);          //!< age of data offset (aodo) term for the navigation message correction table (nmct) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s] | ||||
|  | ||||
|         monitor_.set_b_fit_interval_flag(monitor->b_fit_interval_flag);  //!< indicates the curve-fit interval used by the cs (block ii/iia/iir/iir-m/iif) and ss (block iiia) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours. | ||||
|         monitor_.set_d_spare1(monitor->d_spare1); | ||||
|         monitor_.set_d_spare2(monitor->d_spare2); | ||||
|  | ||||
|         monitor_.set_d_a_f0(monitor->d_A_f0);  //!< coefficient 0 of code phase offset model [s] | ||||
|         monitor_.set_d_a_f1(monitor->d_A_f1);  //!< coefficient 1 of code phase offset model [s/s] | ||||
|         monitor_.set_d_a_f2(monitor->d_A_f2);  //!< coefficient 2 of code phase offset model [s/s^2] | ||||
|         monitor_.set_d_a_f0(monitor->af0);  //!< coefficient 0 of code phase offset model [s] | ||||
|         monitor_.set_d_a_f1(monitor->af1);  //!< coefficient 1 of code phase offset model [s/s] | ||||
|         monitor_.set_d_a_f2(monitor->af2);  //!< coefficient 2 of code phase offset model [s/s^2] | ||||
|  | ||||
|         monitor_.set_b_integrity_status_flag(monitor->b_integrity_status_flag); | ||||
|         monitor_.set_b_alert_flag(monitor->b_alert_flag);                //!< if true, indicates  that the sv ura may be worse than indicated in d_sv_accuracy, use that sv at our own risk. | ||||
|         monitor_.set_b_antispoofing_flag(monitor->b_antispoofing_flag);  //!<  if true, the antispoofing mode is on in that sv | ||||
|         monitor_.set_b_alert_flag(monitor->b_alert_flag);                //!< if true, indicates that the sv ura may be worse than indicated in d_sv_accuracy, use that sv at our own risk. | ||||
|         monitor_.set_b_antispoofing_flag(monitor->b_antispoofing_flag);  //!< if true, the antispoofing mode is on in that sv | ||||
|  | ||||
|         monitor_.SerializeToString(&data); | ||||
|         return data; | ||||
| @@ -128,47 +128,47 @@ public: | ||||
|     { | ||||
|         Gps_Ephemeris monitor; | ||||
|  | ||||
|         monitor.i_satellite_PRN = mon.i_satellite_prn();    // SV PRN NUMBER | ||||
|         monitor.d_TOW = mon.d_tow();                        //!< time of gps week of the ephemeris set (taken from subframes tow) [s] | ||||
|         monitor.d_Crs = mon.d_crs();                        //!< amplitude of the sine harmonic correction term to the orbit radius [m] | ||||
|         monitor.d_Delta_n = mon.d_delta_n();                //!< mean motion difference from computed value [semi-circles/s] | ||||
|         monitor.d_M_0 = mon.d_m_0();                        //!< mean anomaly at reference time [semi-circles] | ||||
|         monitor.d_Cuc = mon.d_cuc();                        //!< amplitude of the cosine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor.d_e_eccentricity = mon.d_e_eccentricity();  //!< eccentricity [dimensionless] | ||||
|         monitor.d_Cus = mon.d_cus();                        //!< amplitude of the sine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor.d_sqrt_A = mon.d_sqrt_a();                  //!< square root of the semi-major axis [sqrt(m)] | ||||
|         monitor.d_Toe = mon.d_toe();                        //!< ephemeris data reference time of week (ref. 20.3.3.4.3 is-gps-200k) [s] | ||||
|         monitor.d_Toc = mon.d_toc();                        //!< clock data reference time (ref. 20.3.3.3.3.1 is-gps-200k) [s] | ||||
|         monitor.d_Cic = mon.d_cic();                        //!< amplitude of the cosine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor.d_OMEGA0 = mon.d_omega0();                  //!< longitude of ascending node of orbit plane at weekly epoch [semi-circles] | ||||
|         monitor.d_Cis = mon.d_cis();                        //!< amplitude of the sine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor.d_i_0 = mon.d_i_0();                        //!< inclination angle at reference time [semi-circles] | ||||
|         monitor.d_Crc = mon.d_crc();                        //!< amplitude of the cosine harmonic correction term to the orbit radius [m] | ||||
|         monitor.d_OMEGA = mon.d_omega();                    //!< argument of perigee [semi-cicles] | ||||
|         monitor.d_OMEGA_DOT = mon.d_omega_dot();            //!< rate of right ascension [semi-circles/s] | ||||
|         monitor.d_IDOT = mon.d_idot();                      //!< rate of inclination angle [semi-circles/s] | ||||
|         monitor.i_code_on_L2 = mon.i_code_on_l2();          //!< if 1, p code on in l2;  if 2, c/a code on in l2; | ||||
|         monitor.i_GPS_week = mon.i_gps_week();              //!< gps week number, aka wn [week] | ||||
|         monitor.b_L2_P_data_flag = mon.b_l2_p_data_flag();  //!< when true, indicates that the nav data stream was commanded off on the p-code of the l2 channel | ||||
|         monitor.i_SV_accuracy = mon.i_sv_accuracy();        //!< user range accuracy (ura) index of the sv (reference paragraph 6.2.1) for the standard positioning service user (ref 20.3.3.3.1.3 is-gps-200k) | ||||
|         monitor.i_SV_health = mon.i_sv_health(); | ||||
|         monitor.d_TGD = mon.d_tgd();            //!< estimated group delay differential: l1-l2 correction term only for the benefit of "l1 p(y)" or "l2 p(y)" s users [s] | ||||
|         monitor.d_IODC = mon.d_iodc();          //!< issue of data, clock | ||||
|         monitor.d_IODE_SF2 = mon.d_iode_sf2();  //!< issue of data, ephemeris (iode), subframe 2 | ||||
|         monitor.d_IODE_SF3 = mon.d_iode_sf3();  //!< issue of data, ephemeris(iode), subframe 3 | ||||
|         monitor.i_AODO = mon.i_aodo();          //!< age of data offset (aodo) term for the navigation message correction table (nmct) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s] | ||||
|         monitor.PRN = mon.i_satellite_prn();              //!< SV PRN NUMBER | ||||
|         monitor.tow = mon.d_tow();                        //!< time of gps week of the ephemeris set (taken from subframes tow) [s] | ||||
|         monitor.Crs = mon.d_crs();                        //!< amplitude of the sine harmonic correction term to the orbit radius [m] | ||||
|         monitor.delta_n = mon.d_delta_n();                //!< mean motion difference from computed value [semi-circles/s] | ||||
|         monitor.M_0 = mon.d_m_0();                        //!< mean anomaly at reference time [semi-circles] | ||||
|         monitor.Cuc = mon.d_cuc();                        //!< amplitude of the cosine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor.ecc = mon.d_e_eccentricity();             //!< eccentricity [dimensionless] | ||||
|         monitor.Cus = mon.d_cus();                        //!< amplitude of the sine harmonic correction term to the argument of latitude [rad] | ||||
|         monitor.sqrtA = mon.d_sqrt_a();                   //!< square root of the semi-major axis [sqrt(m)] | ||||
|         monitor.toe = mon.d_toe();                        //!< ephemeris data reference time of week (ref. 20.3.3.4.3 is-gps-200k) [s] | ||||
|         monitor.toc = mon.d_toc();                        //!< clock data reference time (ref. 20.3.3.3.3.1 is-gps-200k) [s] | ||||
|         monitor.Cic = mon.d_cic();                        //!< amplitude of the cosine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor.OMEGA_0 = mon.d_omega0();                 //!< longitude of ascending node of orbit plane at weekly epoch [semi-circles] | ||||
|         monitor.Cis = mon.d_cis();                        //!< amplitude of the sine harmonic correction term to the angle of inclination [rad] | ||||
|         monitor.i_0 = mon.d_i_0();                        //!< inclination angle at reference time [semi-circles] | ||||
|         monitor.Crc = mon.d_crc();                        //!< amplitude of the cosine harmonic correction term to the orbit radius [m] | ||||
|         monitor.omega = mon.d_omega();                    //!< argument of perigee [semi-cicles] | ||||
|         monitor.OMEGAdot = mon.d_omega_dot();             //!< rate of right ascension [semi-circles/s] | ||||
|         monitor.idot = mon.d_idot();                      //!< rate of inclination angle [semi-circles/s] | ||||
|         monitor.code_on_L2 = mon.i_code_on_l2();          //!< if 1, p code on in l2;  if 2, c/a code on in l2; | ||||
|         monitor.WN = mon.i_gps_week();                    //!< gps week number, aka wn [week] | ||||
|         monitor.L2_P_data_flag = mon.b_l2_p_data_flag();  //!< when true, indicates that the nav data stream was commanded off on the p-code of the l2 channel | ||||
|         monitor.SV_accuracy = mon.i_sv_accuracy();        //!< user range accuracy (ura) index of the sv (reference paragraph 6.2.1) for the standard positioning service user (ref 20.3.3.3.1.3 is-gps-200k) | ||||
|         monitor.SV_health = mon.i_sv_health(); | ||||
|         monitor.TGD = mon.d_tgd();            //!< estimated group delay differential: l1-l2 correction term only for the benefit of "l1 p(y)" or "l2 p(y)" s users [s] | ||||
|         monitor.IODC = mon.d_iodc();          //!< issue of data, clock | ||||
|         monitor.IODE_SF2 = mon.d_iode_sf2();  //!< issue of data, ephemeris (iode), subframe 2 | ||||
|         monitor.IODE_SF3 = mon.d_iode_sf3();  //!< issue of data, ephemeris(iode), subframe 3 | ||||
|         monitor.AODO = mon.i_aodo();          //!< age of data offset (aodo) term for the navigation message correction table (nmct) contained in subframe 4 (reference paragraph 20.3.3.5.1.9) [s] | ||||
|  | ||||
|         monitor.b_fit_interval_flag = mon.b_fit_interval_flag();  //!< indicates the curve-fit interval used by the cs (block ii/iia/iir/iir-m/iif) and ss (block iiia) in determining the ephemeris parameters, as follows: 0 = 4 hours, 1 = greater than 4 hours. | ||||
|         monitor.d_spare1 = mon.d_spare1(); | ||||
|         monitor.d_spare2 = mon.d_spare2(); | ||||
|  | ||||
|         monitor.d_A_f0 = mon.d_a_f0();  //!< coefficient 0 of code phase offset model [s] | ||||
|         monitor.d_A_f1 = mon.d_a_f1();  //!< coefficient 1 of code phase offset model [s/s] | ||||
|         monitor.d_A_f2 = mon.d_a_f2();  //!< coefficient 2 of code phase offset model [s/s^2] | ||||
|         monitor.af0 = mon.d_a_f0();  //!< coefficient 0 of code phase offset model [s] | ||||
|         monitor.af1 = mon.d_a_f1();  //!< coefficient 1 of code phase offset model [s/s] | ||||
|         monitor.af2 = mon.d_a_f2();  //!< coefficient 2 of code phase offset model [s/s^2] | ||||
|  | ||||
|         monitor.b_integrity_status_flag = mon.b_integrity_status_flag(); | ||||
|         monitor.b_alert_flag = mon.b_alert_flag();                //!< if true, indicates  that the sv ura may be worse than indicated in d_sv_accuracy, use that sv at our own risk. | ||||
|         monitor.b_antispoofing_flag = mon.b_antispoofing_flag();  //!<  if true, the antispoofing mode is on in that sv | ||||
|         monitor.b_alert_flag = mon.b_alert_flag();                //!< if true, indicates that the sv ura may be worse than indicated in d_sv_accuracy, use that sv at our own risk. | ||||
|         monitor.b_antispoofing_flag = mon.b_antispoofing_flag();  //!< if true, the antispoofing mode is on in that sv | ||||
|  | ||||
|         return monitor; | ||||
|     } | ||||
|   | ||||
| @@ -162,13 +162,13 @@ void pcps_assisted_acquisition_cc::get_assistance() | ||||
|             // TODO: use the LO tolerance here | ||||
|             if (gps_acq_assisistance.dopplerUncertainty >= 1000) | ||||
|                 { | ||||
|                     d_doppler_max = gps_acq_assisistance.d_Doppler0 + gps_acq_assisistance.dopplerUncertainty * 2; | ||||
|                     d_doppler_min = gps_acq_assisistance.d_Doppler0 - gps_acq_assisistance.dopplerUncertainty * 2; | ||||
|                     d_doppler_max = gps_acq_assisistance.Doppler0 + gps_acq_assisistance.dopplerUncertainty * 2; | ||||
|                     d_doppler_min = gps_acq_assisistance.Doppler0 - gps_acq_assisistance.dopplerUncertainty * 2; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     d_doppler_max = gps_acq_assisistance.d_Doppler0 + 1000; | ||||
|                     d_doppler_min = gps_acq_assisistance.d_Doppler0 - 1000; | ||||
|                     d_doppler_max = gps_acq_assisistance.Doppler0 + 1000; | ||||
|                     d_doppler_min = gps_acq_assisistance.Doppler0 - 1000; | ||||
|                 } | ||||
|             this->d_disable_assist = false; | ||||
|             std::cout << "Acq assist ENABLED for GPS SV " << this->d_gnss_synchro->PRN << " (Doppler max,Doppler min)=(" | ||||
|   | ||||
| @@ -168,36 +168,36 @@ eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph) | ||||
|     eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0, | ||||
|         0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0}; | ||||
|     // Galileo is the third satellite system for RTKLIB, so, add the required offset to discriminate Galileo ephemeris | ||||
|     rtklib_sat.sat = gal_eph.i_satellite_PRN + NSATGPS + NSATGLO; | ||||
|     rtklib_sat.A = gal_eph.A_1 * gal_eph.A_1; | ||||
|     rtklib_sat.M0 = gal_eph.M0_1; | ||||
|     rtklib_sat.deln = gal_eph.delta_n_3; | ||||
|     rtklib_sat.OMG0 = gal_eph.OMEGA_0_2; | ||||
|     rtklib_sat.OMGd = gal_eph.OMEGA_dot_3; | ||||
|     rtklib_sat.omg = gal_eph.omega_2; | ||||
|     rtklib_sat.i0 = gal_eph.i_0_2; | ||||
|     rtklib_sat.idot = gal_eph.iDot_2; | ||||
|     rtklib_sat.e = gal_eph.e_1; | ||||
|     rtklib_sat.sat = gal_eph.PRN + NSATGPS + NSATGLO; | ||||
|     rtklib_sat.A = gal_eph.sqrtA * gal_eph.sqrtA; | ||||
|     rtklib_sat.M0 = gal_eph.M_0; | ||||
|     rtklib_sat.deln = gal_eph.delta_n; | ||||
|     rtklib_sat.OMG0 = gal_eph.OMEGA_0; | ||||
|     rtklib_sat.OMGd = gal_eph.OMEGAdot; | ||||
|     rtklib_sat.omg = gal_eph.omega; | ||||
|     rtklib_sat.i0 = gal_eph.i_0; | ||||
|     rtklib_sat.idot = gal_eph.idot; | ||||
|     rtklib_sat.e = gal_eph.ecc; | ||||
|     rtklib_sat.Adot = 0;  // only in CNAV; | ||||
|     rtklib_sat.ndot = 0;  // only in CNAV; | ||||
|  | ||||
|     rtklib_sat.week = gal_eph.WN_5 + 1024; /* week of tow in GPS (not mod-1024) week scale */ | ||||
|     rtklib_sat.cic = gal_eph.C_ic_4; | ||||
|     rtklib_sat.cis = gal_eph.C_is_4; | ||||
|     rtklib_sat.cuc = gal_eph.C_uc_3; | ||||
|     rtklib_sat.cus = gal_eph.C_us_3; | ||||
|     rtklib_sat.crc = gal_eph.C_rc_3; | ||||
|     rtklib_sat.crs = gal_eph.C_rs_3; | ||||
|     rtklib_sat.f0 = gal_eph.af0_4; | ||||
|     rtklib_sat.f1 = gal_eph.af1_4; | ||||
|     rtklib_sat.f2 = gal_eph.af2_4; | ||||
|     rtklib_sat.tgd[0] = gal_eph.BGD_E1E5a_5; | ||||
|     rtklib_sat.tgd[1] = gal_eph.BGD_E1E5b_5; | ||||
|     rtklib_sat.week = gal_eph.WN + 1024; /* week of tow in GPS (not mod-1024) week scale */ | ||||
|     rtklib_sat.cic = gal_eph.Cic; | ||||
|     rtklib_sat.cis = gal_eph.Cis; | ||||
|     rtklib_sat.cuc = gal_eph.Cuc; | ||||
|     rtklib_sat.cus = gal_eph.Cus; | ||||
|     rtklib_sat.crc = gal_eph.Crc; | ||||
|     rtklib_sat.crs = gal_eph.Crs; | ||||
|     rtklib_sat.f0 = gal_eph.af0; | ||||
|     rtklib_sat.f1 = gal_eph.af1; | ||||
|     rtklib_sat.f2 = gal_eph.af2; | ||||
|     rtklib_sat.tgd[0] = gal_eph.BGD_E1E5a; | ||||
|     rtklib_sat.tgd[1] = gal_eph.BGD_E1E5b; | ||||
|     rtklib_sat.tgd[2] = 0; | ||||
|     rtklib_sat.tgd[3] = 0; | ||||
|     rtklib_sat.toes = gal_eph.t0e_1; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gal_eph.t0c_4); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gal_eph.TOW_5); | ||||
|     rtklib_sat.toes = gal_eph.toe; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gal_eph.toc); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gal_eph.tow); | ||||
|  | ||||
|     /* adjustment for week handover */ | ||||
|     double tow; | ||||
| @@ -226,36 +226,36 @@ eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph, bool pre_2009_file) | ||||
| { | ||||
|     eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0, | ||||
|         0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0}; | ||||
|     rtklib_sat.sat = gps_eph.i_satellite_PRN; | ||||
|     rtklib_sat.A = gps_eph.d_sqrt_A * gps_eph.d_sqrt_A; | ||||
|     rtklib_sat.M0 = gps_eph.d_M_0; | ||||
|     rtklib_sat.deln = gps_eph.d_Delta_n; | ||||
|     rtklib_sat.OMG0 = gps_eph.d_OMEGA0; | ||||
|     rtklib_sat.OMGd = gps_eph.d_OMEGA_DOT; | ||||
|     rtklib_sat.omg = gps_eph.d_OMEGA; | ||||
|     rtklib_sat.i0 = gps_eph.d_i_0; | ||||
|     rtklib_sat.idot = gps_eph.d_IDOT; | ||||
|     rtklib_sat.e = gps_eph.d_e_eccentricity; | ||||
|     rtklib_sat.sat = gps_eph.PRN; | ||||
|     rtklib_sat.A = gps_eph.sqrtA * gps_eph.sqrtA; | ||||
|     rtklib_sat.M0 = gps_eph.M_0; | ||||
|     rtklib_sat.deln = gps_eph.delta_n; | ||||
|     rtklib_sat.OMG0 = gps_eph.OMEGA_0; | ||||
|     rtklib_sat.OMGd = gps_eph.OMEGAdot; | ||||
|     rtklib_sat.omg = gps_eph.omega; | ||||
|     rtklib_sat.i0 = gps_eph.i_0; | ||||
|     rtklib_sat.idot = gps_eph.idot; | ||||
|     rtklib_sat.e = gps_eph.ecc; | ||||
|     rtklib_sat.Adot = 0;  // only in CNAV; | ||||
|     rtklib_sat.ndot = 0;  // only in CNAV; | ||||
|  | ||||
|     rtklib_sat.week = adjgpsweek(gps_eph.i_GPS_week, pre_2009_file); /* week of tow */ | ||||
|     rtklib_sat.cic = gps_eph.d_Cic; | ||||
|     rtklib_sat.cis = gps_eph.d_Cis; | ||||
|     rtklib_sat.cuc = gps_eph.d_Cuc; | ||||
|     rtklib_sat.cus = gps_eph.d_Cus; | ||||
|     rtklib_sat.crc = gps_eph.d_Crc; | ||||
|     rtklib_sat.crs = gps_eph.d_Crs; | ||||
|     rtklib_sat.f0 = gps_eph.d_A_f0; | ||||
|     rtklib_sat.f1 = gps_eph.d_A_f1; | ||||
|     rtklib_sat.f2 = gps_eph.d_A_f2; | ||||
|     rtklib_sat.tgd[0] = gps_eph.d_TGD; | ||||
|     rtklib_sat.week = adjgpsweek(gps_eph.WN, pre_2009_file); /* week of tow */ | ||||
|     rtklib_sat.cic = gps_eph.Cic; | ||||
|     rtklib_sat.cis = gps_eph.Cis; | ||||
|     rtklib_sat.cuc = gps_eph.Cuc; | ||||
|     rtklib_sat.cus = gps_eph.Cus; | ||||
|     rtklib_sat.crc = gps_eph.Crc; | ||||
|     rtklib_sat.crs = gps_eph.Crs; | ||||
|     rtklib_sat.f0 = gps_eph.af0; | ||||
|     rtklib_sat.f1 = gps_eph.af1; | ||||
|     rtklib_sat.f2 = gps_eph.af2; | ||||
|     rtklib_sat.tgd[0] = gps_eph.TGD; | ||||
|     rtklib_sat.tgd[1] = 0.0; | ||||
|     rtklib_sat.tgd[2] = 0.0; | ||||
|     rtklib_sat.tgd[3] = 0.0; | ||||
|     rtklib_sat.toes = gps_eph.d_Toe; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gps_eph.d_Toc); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gps_eph.d_TOW); | ||||
|     rtklib_sat.toes = gps_eph.toe; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gps_eph.toc); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gps_eph.tow); | ||||
|  | ||||
|     /* adjustment for week handover */ | ||||
|     double tow; | ||||
| @@ -284,45 +284,45 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph) | ||||
| { | ||||
|     eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0, | ||||
|         0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0}; | ||||
|     rtklib_sat.sat = bei_eph.i_satellite_PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS; | ||||
|     rtklib_sat.A = bei_eph.d_sqrt_A * bei_eph.d_sqrt_A; | ||||
|     rtklib_sat.M0 = bei_eph.d_M_0; | ||||
|     rtklib_sat.deln = bei_eph.d_Delta_n; | ||||
|     rtklib_sat.OMG0 = bei_eph.d_OMEGA0; | ||||
|     rtklib_sat.OMGd = bei_eph.d_OMEGA_DOT; | ||||
|     rtklib_sat.omg = bei_eph.d_OMEGA; | ||||
|     rtklib_sat.i0 = bei_eph.d_i_0; | ||||
|     rtklib_sat.idot = bei_eph.d_IDOT; | ||||
|     rtklib_sat.e = bei_eph.d_eccentricity; | ||||
|     rtklib_sat.sat = bei_eph.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS; | ||||
|     rtklib_sat.A = bei_eph.sqrtA * bei_eph.sqrtA; | ||||
|     rtklib_sat.M0 = bei_eph.M_0; | ||||
|     rtklib_sat.deln = bei_eph.delta_n; | ||||
|     rtklib_sat.OMG0 = bei_eph.OMEGA_0; | ||||
|     rtklib_sat.OMGd = bei_eph.OMEGAdot; | ||||
|     rtklib_sat.omg = bei_eph.omega; | ||||
|     rtklib_sat.i0 = bei_eph.i_0; | ||||
|     rtklib_sat.idot = bei_eph.idot; | ||||
|     rtklib_sat.e = bei_eph.ecc; | ||||
|     rtklib_sat.Adot = 0;  // only in CNAV; | ||||
|     rtklib_sat.ndot = 0;  // only in CNAV; | ||||
|  | ||||
|     rtklib_sat.svh = bei_eph.i_SV_health; | ||||
|     rtklib_sat.sva = bei_eph.i_SV_accuracy; | ||||
|     rtklib_sat.svh = bei_eph.SV_health; | ||||
|     rtklib_sat.sva = bei_eph.SV_accuracy; | ||||
|  | ||||
|     rtklib_sat.code = bei_eph.i_sig_type;                   /* B1I data */ | ||||
|     rtklib_sat.flag = bei_eph.i_nav_type;                   /* MEO/IGSO satellite */ | ||||
|     rtklib_sat.iode = static_cast<int32_t>(bei_eph.d_AODE); /* AODE */ | ||||
|     rtklib_sat.iodc = static_cast<int32_t>(bei_eph.d_AODC); /* AODC */ | ||||
|  | ||||
|     rtklib_sat.week = bei_eph.i_BEIDOU_week; /* week of tow */ | ||||
|     rtklib_sat.cic = bei_eph.d_Cic; | ||||
|     rtklib_sat.cis = bei_eph.d_Cis; | ||||
|     rtklib_sat.cuc = bei_eph.d_Cuc; | ||||
|     rtklib_sat.cus = bei_eph.d_Cus; | ||||
|     rtklib_sat.crc = bei_eph.d_Crc; | ||||
|     rtklib_sat.crs = bei_eph.d_Crs; | ||||
|     rtklib_sat.f0 = bei_eph.d_A_f0; | ||||
|     rtklib_sat.f1 = bei_eph.d_A_f1; | ||||
|     rtklib_sat.f2 = bei_eph.d_A_f2; | ||||
|     rtklib_sat.week = bei_eph.WN; /* week of tow */ | ||||
|     rtklib_sat.cic = bei_eph.Cic; | ||||
|     rtklib_sat.cis = bei_eph.Cis; | ||||
|     rtklib_sat.cuc = bei_eph.Cuc; | ||||
|     rtklib_sat.cus = bei_eph.Cus; | ||||
|     rtklib_sat.crc = bei_eph.Crc; | ||||
|     rtklib_sat.crs = bei_eph.Crs; | ||||
|     rtklib_sat.f0 = bei_eph.af0; | ||||
|     rtklib_sat.f1 = bei_eph.af1; | ||||
|     rtklib_sat.f2 = bei_eph.af2; | ||||
|     rtklib_sat.tgd[0] = bei_eph.d_TGD1; | ||||
|     rtklib_sat.tgd[1] = bei_eph.d_TGD2; | ||||
|     rtklib_sat.tgd[2] = 0.0; | ||||
|     rtklib_sat.tgd[3] = 0.0; | ||||
|     rtklib_sat.toes = bei_eph.d_Toe; | ||||
|     rtklib_sat.toe = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.d_Toe)); | ||||
|     rtklib_sat.toc = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.d_Toc)); | ||||
|     rtklib_sat.ttr = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.d_TOW)); | ||||
|     rtklib_sat.toes = bei_eph.toe; | ||||
|     rtklib_sat.toe = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.toe)); | ||||
|     rtklib_sat.toc = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.toc)); | ||||
|     rtklib_sat.ttr = bdt2gpst(bdt2time(rtklib_sat.week, bei_eph.tow)); | ||||
|     /* adjustment for week handover */ | ||||
|     double tow; | ||||
|     double toc; | ||||
| @@ -353,44 +353,40 @@ eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph) | ||||
| { | ||||
|     eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0, | ||||
|         0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0}; | ||||
|     rtklib_sat.sat = gps_cnav_eph.i_satellite_PRN; | ||||
|     const double A_REF = 26559710.0;  // See IS-GPS-200L,  pp. 161 | ||||
|     rtklib_sat.A = A_REF + gps_cnav_eph.d_DELTA_A; | ||||
|     rtklib_sat.M0 = gps_cnav_eph.d_M_0; | ||||
|     rtklib_sat.deln = gps_cnav_eph.d_Delta_n; | ||||
|     rtklib_sat.OMG0 = gps_cnav_eph.d_OMEGA0; | ||||
|     // Compute the angle between the ascending node and the Greenwich meridian | ||||
|     const double OMEGA_DOT_REF = -2.6e-9;  // semicircles / s, see IS-GPS-200L pp. 160 | ||||
|     double d_OMEGA_DOT = OMEGA_DOT_REF * GNSS_PI + gps_cnav_eph.d_DELTA_OMEGA_DOT; | ||||
|     rtklib_sat.OMGd = d_OMEGA_DOT; | ||||
|     rtklib_sat.omg = gps_cnav_eph.d_OMEGA; | ||||
|     rtklib_sat.i0 = gps_cnav_eph.d_i_0; | ||||
|     rtklib_sat.idot = gps_cnav_eph.d_IDOT; | ||||
|     rtklib_sat.e = gps_cnav_eph.d_e_eccentricity; | ||||
|     rtklib_sat.Adot = gps_cnav_eph.d_A_DOT;        // only in CNAV; | ||||
|     rtklib_sat.ndot = gps_cnav_eph.d_DELTA_DOT_N;  // only in CNAV; | ||||
|     rtklib_sat.sat = gps_cnav_eph.PRN; | ||||
|     rtklib_sat.A = gps_cnav_eph.sqrtA * gps_cnav_eph.sqrtA; | ||||
|     rtklib_sat.M0 = gps_cnav_eph.M_0; | ||||
|     rtklib_sat.deln = gps_cnav_eph.delta_n; | ||||
|     rtklib_sat.OMG0 = gps_cnav_eph.OMEGA_0; | ||||
|     rtklib_sat.OMGd = gps_cnav_eph.OMEGAdot; | ||||
|     rtklib_sat.omg = gps_cnav_eph.omega; | ||||
|     rtklib_sat.i0 = gps_cnav_eph.i_0; | ||||
|     rtklib_sat.idot = gps_cnav_eph.idot; | ||||
|     rtklib_sat.e = gps_cnav_eph.ecc; | ||||
|     rtklib_sat.Adot = gps_cnav_eph.Adot;        // only in CNAV; | ||||
|     rtklib_sat.ndot = gps_cnav_eph.delta_ndot;  // only in CNAV; | ||||
|  | ||||
|     rtklib_sat.week = adjgpsweek(gps_cnav_eph.i_GPS_week); /* week of tow */ | ||||
|     rtklib_sat.cic = gps_cnav_eph.d_Cic; | ||||
|     rtklib_sat.cis = gps_cnav_eph.d_Cis; | ||||
|     rtklib_sat.cuc = gps_cnav_eph.d_Cuc; | ||||
|     rtklib_sat.cus = gps_cnav_eph.d_Cus; | ||||
|     rtklib_sat.crc = gps_cnav_eph.d_Crc; | ||||
|     rtklib_sat.crs = gps_cnav_eph.d_Crs; | ||||
|     rtklib_sat.f0 = gps_cnav_eph.d_A_f0; | ||||
|     rtklib_sat.f1 = gps_cnav_eph.d_A_f1; | ||||
|     rtklib_sat.f2 = gps_cnav_eph.d_A_f2; | ||||
|     rtklib_sat.tgd[0] = gps_cnav_eph.d_TGD; | ||||
|     rtklib_sat.week = adjgpsweek(gps_cnav_eph.WN); /* week of tow */ | ||||
|     rtklib_sat.cic = gps_cnav_eph.Cic; | ||||
|     rtklib_sat.cis = gps_cnav_eph.Cis; | ||||
|     rtklib_sat.cuc = gps_cnav_eph.Cuc; | ||||
|     rtklib_sat.cus = gps_cnav_eph.Cus; | ||||
|     rtklib_sat.crc = gps_cnav_eph.Crc; | ||||
|     rtklib_sat.crs = gps_cnav_eph.Crs; | ||||
|     rtklib_sat.f0 = gps_cnav_eph.af0; | ||||
|     rtklib_sat.f1 = gps_cnav_eph.af1; | ||||
|     rtklib_sat.f2 = gps_cnav_eph.af2; | ||||
|     rtklib_sat.tgd[0] = gps_cnav_eph.TGD; | ||||
|     rtklib_sat.tgd[1] = 0.0; | ||||
|     rtklib_sat.tgd[2] = 0.0; | ||||
|     rtklib_sat.tgd[3] = 0.0; | ||||
|     rtklib_sat.isc[0] = gps_cnav_eph.d_ISCL1; | ||||
|     rtklib_sat.isc[1] = gps_cnav_eph.d_ISCL2; | ||||
|     rtklib_sat.isc[2] = gps_cnav_eph.d_ISCL5I; | ||||
|     rtklib_sat.isc[3] = gps_cnav_eph.d_ISCL5Q; | ||||
|     rtklib_sat.toes = gps_cnav_eph.d_Toe1; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gps_cnav_eph.d_Toc); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gps_cnav_eph.d_TOW); | ||||
|     rtklib_sat.isc[0] = gps_cnav_eph.ISCL1; | ||||
|     rtklib_sat.isc[1] = gps_cnav_eph.ISCL2; | ||||
|     rtklib_sat.isc[2] = gps_cnav_eph.ISCL5I; | ||||
|     rtklib_sat.isc[3] = gps_cnav_eph.ISCL5Q; | ||||
|     rtklib_sat.toes = gps_cnav_eph.toe1; | ||||
|     rtklib_sat.toc = gpst2time(rtklib_sat.week, gps_cnav_eph.toc); | ||||
|     rtklib_sat.ttr = gpst2time(rtklib_sat.week, gps_cnav_eph.tow); | ||||
|  | ||||
|     /* adjustment for week handover */ | ||||
|     double tow; | ||||
| @@ -421,24 +417,24 @@ alm_t alm_to_rtklib(const Gps_Almanac& gps_alm) | ||||
|  | ||||
|     rtklib_alm = {0, 0, 0, 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | ||||
|  | ||||
|     rtklib_alm.sat = gps_alm.i_satellite_PRN; | ||||
|     rtklib_alm.svh = gps_alm.i_SV_health; | ||||
|     rtklib_alm.svconf = gps_alm.i_AS_status; | ||||
|     rtklib_alm.week = gps_alm.i_WNa; | ||||
|     rtklib_alm.sat = gps_alm.PRN; | ||||
|     rtklib_alm.svh = gps_alm.SV_health; | ||||
|     rtklib_alm.svconf = gps_alm.AS_status; | ||||
|     rtklib_alm.week = gps_alm.WNa; | ||||
|     gtime_t toa; | ||||
|     toa.time = gps_alm.i_Toa; | ||||
|     toa.time = gps_alm.toa; | ||||
|     toa.sec = 0.0; | ||||
|     rtklib_alm.toa = toa; | ||||
|     rtklib_alm.A = gps_alm.d_sqrt_A * gps_alm.d_sqrt_A; | ||||
|     rtklib_alm.e = gps_alm.d_e_eccentricity; | ||||
|     rtklib_alm.i0 = (gps_alm.d_Delta_i + 0.3) * GNSS_PI; | ||||
|     rtklib_alm.OMG0 = gps_alm.d_OMEGA0 * GNSS_PI; | ||||
|     rtklib_alm.OMGd = gps_alm.d_OMEGA_DOT * GNSS_PI; | ||||
|     rtklib_alm.omg = gps_alm.d_OMEGA * GNSS_PI; | ||||
|     rtklib_alm.M0 = gps_alm.d_M_0 * GNSS_PI; | ||||
|     rtklib_alm.f0 = gps_alm.d_A_f0; | ||||
|     rtklib_alm.f1 = gps_alm.d_A_f1; | ||||
|     rtklib_alm.toas = gps_alm.i_Toa; | ||||
|     rtklib_alm.A = gps_alm.sqrtA * gps_alm.sqrtA; | ||||
|     rtklib_alm.e = gps_alm.ecc; | ||||
|     rtklib_alm.i0 = (gps_alm.delta_i + 0.3) * GNSS_PI; | ||||
|     rtklib_alm.OMG0 = gps_alm.OMEGA_0 * GNSS_PI; | ||||
|     rtklib_alm.OMGd = gps_alm.OMEGAdot * GNSS_PI; | ||||
|     rtklib_alm.omg = gps_alm.omega * GNSS_PI; | ||||
|     rtklib_alm.M0 = gps_alm.M_0 * GNSS_PI; | ||||
|     rtklib_alm.f0 = gps_alm.af0; | ||||
|     rtklib_alm.f1 = gps_alm.af1; | ||||
|     rtklib_alm.toas = gps_alm.toa; | ||||
|  | ||||
|     return rtklib_alm; | ||||
| } | ||||
| @@ -450,25 +446,25 @@ alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm) | ||||
|  | ||||
|     rtklib_alm = {0, 0, 0, 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | ||||
|  | ||||
|     rtklib_alm.sat = gal_alm.i_satellite_PRN + NSATGPS + NSATGLO; | ||||
|     rtklib_alm.sat = gal_alm.PRN + NSATGPS + NSATGLO; | ||||
|     rtklib_alm.svh = gal_alm.E1B_HS; | ||||
|     rtklib_alm.svconf = gal_alm.E1B_HS; | ||||
|     rtklib_alm.week = gal_alm.i_WNa; | ||||
|     rtklib_alm.week = gal_alm.WNa; | ||||
|     gtime_t toa; | ||||
|     toa.time = gal_alm.i_Toa; | ||||
|     toa.time = gal_alm.toa; | ||||
|     toa.sec = 0.0; | ||||
|     rtklib_alm.toa = toa; | ||||
|     rtklib_alm.A = 5440.588203494 + gal_alm.d_Delta_sqrt_A; | ||||
|     rtklib_alm.A = 5440.588203494 + gal_alm.delta_sqrtA; | ||||
|     rtklib_alm.A = rtklib_alm.A * rtklib_alm.A; | ||||
|     rtklib_alm.e = gal_alm.d_e_eccentricity; | ||||
|     rtklib_alm.i0 = (gal_alm.d_Delta_i + 56.0 / 180.0) * GNSS_PI; | ||||
|     rtklib_alm.OMG0 = gal_alm.d_OMEGA0 * GNSS_PI; | ||||
|     rtklib_alm.OMGd = gal_alm.d_OMEGA_DOT * GNSS_PI; | ||||
|     rtklib_alm.omg = gal_alm.d_OMEGA * GNSS_PI; | ||||
|     rtklib_alm.M0 = gal_alm.d_M_0 * GNSS_PI; | ||||
|     rtklib_alm.f0 = gal_alm.d_A_f0; | ||||
|     rtklib_alm.f1 = gal_alm.d_A_f1; | ||||
|     rtklib_alm.toas = gal_alm.i_Toa; | ||||
|     rtklib_alm.e = gal_alm.ecc; | ||||
|     rtklib_alm.i0 = (gal_alm.delta_i + 56.0 / 180.0) * GNSS_PI; | ||||
|     rtklib_alm.OMG0 = gal_alm.OMEGA_0 * GNSS_PI; | ||||
|     rtklib_alm.OMGd = gal_alm.OMEGAdot * GNSS_PI; | ||||
|     rtklib_alm.omg = gal_alm.omega * GNSS_PI; | ||||
|     rtklib_alm.M0 = gal_alm.M_0 * GNSS_PI; | ||||
|     rtklib_alm.f0 = gal_alm.af0; | ||||
|     rtklib_alm.f1 = gal_alm.af1; | ||||
|     rtklib_alm.toas = gal_alm.toa; | ||||
|  | ||||
|     return rtklib_alm; | ||||
| } | ||||
|   | ||||
| @@ -381,7 +381,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in | ||||
|                     std::cout << TEXT_BLUE << "New Galileo E5b I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n'; | ||||
|                 } | ||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||
|             d_delta_t = tmp_obj->A_0G_10 + tmp_obj->A_1G_10 * (static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0 - tmp_obj->t_0G_10 + 604800 * (std::fmod(static_cast<float>(d_inav_nav.get_Galileo_week() - tmp_obj->WN_0G_10), 64.0))); | ||||
|             d_delta_t = tmp_obj->A_0G + tmp_obj->A_1G * (static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0 - tmp_obj->t_0G + 604800 * (std::fmod(static_cast<float>(d_inav_nav.get_Galileo_week() - tmp_obj->WN_0G), 64.0))); | ||||
|             DLOG(INFO) << "delta_t=" << d_delta_t << "[s]"; | ||||
|         } | ||||
|     if (d_inav_nav.have_new_almanac() == true) | ||||
|   | ||||
| @@ -411,7 +411,7 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu | ||||
|  | ||||
|     // if(d_nav.flag_GGTO_1 == true  and  d_nav.flag_GGTO_2 == true and  d_nav.flag_GGTO_3 == true and  d_nav.flag_GGTO_4 == true) // all GGTO parameters arrived | ||||
|     //     { | ||||
|     //         delta_t = d_nav.A_0G_10 + d_nav.A_1G_10 * (d_TOW_at_current_symbol - d_nav.t_0G_10 + 604800.0 * (fmod((d_nav.WN_0 - d_nav.WN_0G_10), 64))); | ||||
|     //         delta_t = d_nav.A_0G + d_nav.A_1G * (d_TOW_at_current_symbol - d_nav.t_0G + 604800.0 * (fmod((d_nav.WN_0 - d_nav.WN_0G), 64))); | ||||
|     //     } | ||||
|  | ||||
|     if (d_flag_frame_sync == true and d_nav.is_flag_TOW_set() == true) | ||||
|   | ||||
| @@ -410,7 +410,7 @@ int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu | ||||
|  | ||||
|     // if(d_nav.flag_GGTO_1 == true  and  d_nav.flag_GGTO_2 == true and  d_nav.flag_GGTO_3 == true and  d_nav.flag_GGTO_4 == true) // all GGTO parameters arrived | ||||
|     //     { | ||||
|     //         delta_t = d_nav.A_0G_10 + d_nav.A_1G_10 * (d_TOW_at_current_symbol - d_nav.t_0G_10 + 604800.0 * (fmod((d_nav.WN_0 - d_nav.WN_0G_10), 64))); | ||||
|     //         delta_t = d_nav.A_0G + d_nav.A_1G * (d_TOW_at_current_symbol - d_nav.t_0G + 604800.0 * (fmod((d_nav.WN_0 - d_nav.WN_0G), 64))); | ||||
|     //     } | ||||
|  | ||||
|     if (d_flag_frame_sync == true and d_nav.is_flag_TOW_set() == true) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez