mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Decode and store Galileo almanac
This commit is contained in:
		| @@ -29,6 +29,8 @@ | ||||
|  */ | ||||
|  | ||||
| #include "rtklib_pvt_cc.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "galileo_almanac_helper.h" | ||||
| #include "display.h" | ||||
| #include <boost/archive/xml_oarchive.hpp> | ||||
| #include <boost/archive/xml_iarchive.hpp> | ||||
| @@ -50,11 +52,6 @@ namespace bc = boost::math; | ||||
| namespace bc = boost::integer; | ||||
| #endif | ||||
|  | ||||
| //includes used by the observables serializarion (export observables for rtklib unit test) | ||||
| #include <boost/archive/xml_oarchive.hpp> | ||||
| #include <boost/archive/xml_iarchive.hpp> | ||||
| #include <boost/serialization/map.hpp> | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
|  | ||||
| @@ -189,14 +186,20 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg) | ||||
|                     d_ls_pvt->galileo_utc_model = *galileo_utc_model; | ||||
|                     DLOG(INFO) << "New UTC record has arrived "; | ||||
|                 } | ||||
|             else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac>)) | ||||
|             else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Galileo_Almanac_Helper>)) | ||||
|                 { | ||||
|                     // ### Galileo Almanac ### | ||||
|                     std::shared_ptr<Galileo_Almanac> galileo_almanac; | ||||
|                     galileo_almanac = boost::any_cast<std::shared_ptr<Galileo_Almanac>>(pmt::any_ref(msg)); | ||||
|                     // update/insert new ephemeris record to the global ephemeris map | ||||
|                     d_ls_pvt->galileo_almanac = *galileo_almanac; | ||||
|                     DLOG(INFO) << "New Galileo Almanac has arrived "; | ||||
|                     std::shared_ptr<Galileo_Almanac_Helper> galileo_almanac_helper; | ||||
|                     galileo_almanac_helper = boost::any_cast<std::shared_ptr<Galileo_Almanac_Helper>>(pmt::any_ref(msg)); | ||||
|  | ||||
|                     Galileo_Almanac sv1 = galileo_almanac_helper->get_almanac(1); | ||||
|                     Galileo_Almanac sv2 = galileo_almanac_helper->get_almanac(2); | ||||
|                     Galileo_Almanac sv3 = galileo_almanac_helper->get_almanac(3); | ||||
|  | ||||
|                     if (sv1.i_satellite_PRN != 0) d_ls_pvt->galileo_almanac_map[sv1.i_satellite_PRN] = sv1; | ||||
|                     if (sv2.i_satellite_PRN != 0) d_ls_pvt->galileo_almanac_map[sv2.i_satellite_PRN] = sv2; | ||||
|                     if (sv3.i_satellite_PRN != 0) d_ls_pvt->galileo_almanac_map[sv3.i_satellite_PRN] = sv3; | ||||
|                     DLOG(INFO) << "New Galileo Almanac data have arrived "; | ||||
|                 } | ||||
|  | ||||
|             // **************** GLONASS GNAV Telemetry ************************** | ||||
| @@ -527,6 +530,28 @@ rtklib_pvt_cc::~rtklib_pvt_cc() | ||||
|             LOG(INFO) << "Failed to save Galileo UTC model parameters, not valid data"; | ||||
|         } | ||||
|  | ||||
|     // Save Galileo almanac | ||||
|     file_name = "gal_almanac.xml"; | ||||
|     if (d_ls_pvt->galileo_almanac_map.empty() == false) | ||||
|         { | ||||
|             std::ofstream ofs; | ||||
|             try | ||||
|                 { | ||||
|                     ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out); | ||||
|                     boost::archive::xml_oarchive xml(ofs); | ||||
|                     xml << boost::serialization::make_nvp("GNSS-SDR_gal_almanac_map", d_ls_pvt->galileo_almanac_map); | ||||
|                     LOG(INFO) << "Saved Galileo almanac data"; | ||||
|                 } | ||||
|             catch (std::exception& e) | ||||
|                 { | ||||
|                     LOG(WARNING) << e.what(); | ||||
|                 } | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             LOG(INFO) << "Failed to save Galileo almanac, not valid data"; | ||||
|         } | ||||
|  | ||||
|     // Save GPS CNAV UTC model parameters | ||||
|     file_name = "gps_cnav_utc_model.xml"; | ||||
|     if (d_ls_pvt->gps_cnav_utc_model.valid) | ||||
| @@ -921,7 +946,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                     if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) | ||||
|                                                         { | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -931,7 +956,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                     if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) | ||||
|                                                         { | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -941,7 +966,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                     if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) | ||||
|                                                         { | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -961,7 +986,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                         { | ||||
|                                                             std::string gal_signal("1B"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -971,7 +996,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                         { | ||||
|                                                             std::string gal_signal("5X"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -981,7 +1006,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                         { | ||||
|                                                             std::string gal_signal("7X"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -991,7 +1016,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                         { | ||||
|                                                             std::string gal_signal("1B 5X"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -1001,7 +1026,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                         { | ||||
|                                                             std::string gal_signal("1B 7X"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -1059,7 +1084,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                             std::string glo_signal("1G"); | ||||
|                                                             std::string gal_signal("1B"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -1096,7 +1121,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                             std::string glo_signal("2G"); | ||||
|                                                             std::string gal_signal("1B"); | ||||
|                                                             rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal, gal_signal); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                             rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                             b_rinex_header_written = true;  // do not write header anymore | ||||
|                                                         } | ||||
|                                                 } | ||||
| @@ -1239,7 +1264,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                 } | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
| @@ -1252,7 +1277,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                 } | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
| @@ -1265,7 +1290,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                 } | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
| @@ -1292,7 +1317,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->gps_utc_model.d_A0 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->gps_utc_model); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
|                                                         } | ||||
| @@ -1304,7 +1329,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                 } | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
| @@ -1317,7 +1342,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                 } | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     b_rinex_header_updated = true; | ||||
|                                                                 } | ||||
| @@ -1383,7 +1408,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                             if (!b_rinex_header_updated and (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                                     b_rinex_header_updated = true;  // do not write header anymore | ||||
|                                                                 } | ||||
|                                                         } | ||||
| @@ -1422,7 +1447,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                             if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0)) | ||||
|                                                                 { | ||||
|                                                                     rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                                     rp->update_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac); | ||||
|                                                                     b_rinex_header_updated = true;  // do not write header anymore | ||||
|                                                                 } | ||||
|                                                         } | ||||
|   | ||||
| @@ -36,6 +36,7 @@ | ||||
| #include "galileo_navigation_message.h" | ||||
| #include "gps_navigation_message.h" | ||||
| #include "gps_cnav_navigation_message.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "gnss_synchro.h" | ||||
| #include "rtklib_rtkcmn.h" | ||||
| #include <fstream> | ||||
|   | ||||
| @@ -725,13 +725,13 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|     //Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|     if (galileo_almanac.A_0G_10) | ||||
|     if (galileo_utc_model.A_0G_10) | ||||
|         { | ||||
|         } | ||||
|     std::string line; | ||||
| @@ -839,7 +839,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& gali | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac) | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model) | ||||
| { | ||||
|     std::string line; | ||||
|  | ||||
| @@ -915,10 +915,10 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& iono | ||||
|     // -------- Line system time correction 2 | ||||
|     line.clear(); | ||||
|     line += std::string("GPGA"); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A_0G_10, 16, 2), 18); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A_1G_10, 15, 2), 16); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.t_0G_10), 7); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.WN_0G_10), 5); | ||||
|     line += std::string(10, ' '); | ||||
|     line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -1238,7 +1238,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac) | ||||
| void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) | ||||
| { | ||||
|     std::string line; | ||||
|  | ||||
| @@ -1327,10 +1327,10 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono | ||||
|     // -------- Line system time correction 2 | ||||
|     line.clear(); | ||||
|     line += std::string("GPGA"); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A_0G_10, 16, 2), 18); | ||||
|     line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A_1G_10, 15, 2), 16); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.t_0G_10), 7); | ||||
|     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WN_0G_10), 5); | ||||
|     line += std::string(10, ' '); | ||||
|     line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -1552,7 +1552,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_ | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac) | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model) | ||||
| { | ||||
|     std::vector<std::string> data; | ||||
|     std::string line_aux; | ||||
| @@ -1599,10 +1599,10 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal | ||||
|                     else if ((line_str.find("GPGA", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos)) | ||||
|                         { | ||||
|                             line_aux += std::string("GPGA"); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A_0G_10, 16, 2), 18); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A_1G_10, 15, 2), 16); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.t_0G_10), 7); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.WN_0G_10), 5); | ||||
|                             line_aux += std::string(10, ' '); | ||||
|                             line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20); | ||||
|                             data.push_back(line_aux); | ||||
| @@ -1893,7 +1893,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Mode | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac) | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) | ||||
| { | ||||
|     std::vector<std::string> data; | ||||
|     std::string line_aux; | ||||
| @@ -1975,10 +1975,10 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion | ||||
|                     else if ((line_str.find("GPGA", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos)) | ||||
|                         { | ||||
|                             line_aux += std::string("GPGA"); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A_0G_10, 16, 2), 18); | ||||
|                             line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A_1G_10, 15, 2), 16); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.t_0G_10), 7); | ||||
|                             line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WN_0G_10), 5); | ||||
|                             line_aux += std::string(10, ' '); | ||||
|                             line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20); | ||||
|                             data.push_back(line_aux); | ||||
| @@ -2239,13 +2239,13 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gp | ||||
| } | ||||
|  | ||||
|  | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) | ||||
| void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|     //Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|     if (galileo_almanac.A_0G_10) | ||||
|     if (galileo_utc_model.A_0G_10) | ||||
|         { | ||||
|         } | ||||
|     std::vector<std::string> data; | ||||
|   | ||||
| @@ -106,12 +106,12 @@ public: | ||||
|     /*! | ||||
|      *  \brief Generates the Galileo Navigation Data header | ||||
|      */ | ||||
|     void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac); | ||||
|     void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model); | ||||
|  | ||||
|     /*! | ||||
|      *  \brief Generates the Mixed (GPS/Galileo) Navigation Data header | ||||
|      */ | ||||
|     void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac); | ||||
|     void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model); | ||||
|  | ||||
|     /*! | ||||
|      *  \brief Generates the GLONASS L1, L2 C/A Navigation Data header | ||||
| @@ -121,7 +121,7 @@ public: | ||||
|     /*! | ||||
|      *  \brief Generates the Mixed (Galileo/GLONASS) Navigation Data header | ||||
|      */ | ||||
|     void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|     void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|  | ||||
|     /*! | ||||
|      *  \brief Generates the Mixed (GPS L1 C/A/GLONASS L1, L2) Navigation Data header | ||||
| @@ -318,9 +318,9 @@ public: | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono); | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac); | ||||
|     void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model); | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac); | ||||
|     void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model); | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|  | ||||
| @@ -328,7 +328,7 @@ public: | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_cnav_iono, const Gps_CNAV_Utc_Model& gps_cnav_utc, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|  | ||||
|     void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|     void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac); | ||||
|  | ||||
|     void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model); | ||||
|  | ||||
|   | ||||
| @@ -60,6 +60,7 @@ | ||||
| #include "gps_navigation_message.h" | ||||
| #include "gps_cnav_navigation_message.h" | ||||
| #include "glonass_gnav_navigation_message.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "gnss_synchro.h" | ||||
| #include "pvt_solution.h" | ||||
| #include <fstream> | ||||
| @@ -99,7 +100,7 @@ public: | ||||
|  | ||||
|     Galileo_Utc_Model galileo_utc_model; | ||||
|     Galileo_Iono galileo_iono; | ||||
|     Galileo_Almanac galileo_almanac; | ||||
|     std::map<int, Galileo_Almanac> galileo_almanac_map; | ||||
|  | ||||
|     Gps_Utc_Model gps_utc_model; | ||||
|     Gps_Iono gps_iono; | ||||
|   | ||||
| @@ -335,23 +335,18 @@ void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, i | ||||
|             std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_inav_nav.get_utc_model()); | ||||
|             std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << std::endl; | ||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||
|             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 * (fmod((d_inav_nav.WN_0 - tmp_obj->WN_0G_10), 64))); | ||||
|             DLOG(INFO) << "delta_t=" << delta_t << "[s]"; | ||||
|         } | ||||
|     if (d_inav_nav.have_new_almanac() == true) | ||||
|         { | ||||
|             std::shared_ptr<Galileo_Almanac> tmp_obj = std::make_shared<Galileo_Almanac>(d_inav_nav.get_almanac()); | ||||
|             std::shared_ptr<Galileo_Almanac_Helper> tmp_obj = std::make_shared<Galileo_Almanac_Helper>(d_inav_nav.get_almanac()); | ||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||
|             //debug | ||||
|             std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << std::endl; | ||||
|             DLOG(INFO) << "GPS_to_Galileo time conversion:"; | ||||
|             DLOG(INFO) << "A0G=" << tmp_obj->A_0G_10; | ||||
|             DLOG(INFO) << "A1G=" << tmp_obj->A_1G_10; | ||||
|             DLOG(INFO) << "T0G=" << tmp_obj->t_0G_10; | ||||
|             DLOG(INFO) << "WN_0G_10=" << tmp_obj->WN_0G_10; | ||||
|             DLOG(INFO) << "Current parameters:"; | ||||
|             DLOG(INFO) << "d_TOW_at_current_symbol_ms=" << d_TOW_at_current_symbol_ms; | ||||
|             DLOG(INFO) << "d_nav.WN_0=" << d_inav_nav.WN_0; | ||||
|             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 * (fmod((d_inav_nav.WN_0 - tmp_obj->WN_0G_10), 64))); | ||||
|             DLOG(INFO) << "delta_t=" << delta_t << "[s]"; | ||||
|         } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -38,7 +38,7 @@ | ||||
| #include "galileo_navigation_message.h" | ||||
| #include "galileo_fnav_message.h" | ||||
| #include "galileo_ephemeris.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "galileo_almanac_helper.h" | ||||
| #include "galileo_iono.h" | ||||
| #include "galileo_utc_model.h" | ||||
| #include "gnss_satellite.h" | ||||
|   | ||||
| @@ -30,6 +30,7 @@ set(SYSTEM_PARAMETERS_SOURCES | ||||
|      galileo_utc_model.cc | ||||
|      galileo_ephemeris.cc | ||||
|      galileo_almanac.cc | ||||
|      galileo_almanac_helper.cc | ||||
|      galileo_iono.cc | ||||
|      galileo_navigation_message.cc | ||||
|      sbas_ephemeris.cc | ||||
| @@ -59,6 +60,7 @@ set(SYSTEM_PARAMETERS_HEADERS | ||||
|      galileo_utc_model.h | ||||
|      galileo_ephemeris.h | ||||
|      galileo_almanac.h | ||||
|      galileo_almanac_helper.h | ||||
|      galileo_iono.h | ||||
|      galileo_navigation_message.h | ||||
|      sbas_ephemeris.h | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| /*! | ||||
|  * \file galileo_almanac.cc | ||||
|  * \brief  Implementation of a Galileo ALMANAC storage | ||||
|  * \author Javier Arribas, 2013. jarribas(at)cttc.es | ||||
|  * \brief  Interface of a Galileo ALMANAC storage | ||||
|  * \author Carles Fernandez, 2018. cfernandez(at)cttc.cat | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
| @@ -30,66 +30,23 @@ | ||||
|  | ||||
| #include "galileo_almanac.h" | ||||
|  | ||||
|  | ||||
| Galileo_Almanac::Galileo_Almanac() | ||||
| { | ||||
|     // Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     IOD_a_7 = 0; | ||||
|     WN_a_7 = 0.0; | ||||
|     t0a_7 = 0.0; | ||||
|     SVID1_7 = 0; | ||||
|     DELTA_A_7 = 0.0; | ||||
|     e_7 = 0.0; | ||||
|     omega_7 = 0.0; | ||||
|     delta_i_7 = 0.0; | ||||
|     Omega0_7 = 0.0; | ||||
|     Omega_dot_7 = 0.0; | ||||
|     M0_7 = 0.0; | ||||
|  | ||||
|     // Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2) | ||||
|     IOD_a_8 = 0; | ||||
|     af0_8 = 0.0; | ||||
|     af1_8 = 0.0; | ||||
|     E5b_HS_8 = 0.0; | ||||
|     E1B_HS_8 = 0.0; | ||||
|     E5a_HS_8 = 0.0; | ||||
|     SVID2_8 = 0; | ||||
|     DELTA_A_8 = 0.0; | ||||
|     e_8 = 0.0; | ||||
|     omega_8 = 0.0; | ||||
|     delta_i_8 = 0.0; | ||||
|     Omega0_8 = 0.0; | ||||
|     Omega_dot_8 = 0.0; | ||||
|  | ||||
|     // Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2) | ||||
|     IOD_a_9 = 0; | ||||
|     WN_a_9 = 0.0; | ||||
|     t0a_9 = 0.0; | ||||
|     M0_9 = 0.0; | ||||
|     af0_9 = 0.0; | ||||
|     af1_9 = 0.0; | ||||
|     E5b_HS_9 = 0.0; | ||||
|     E1B_HS_9 = 0.0; | ||||
|     E5a_HS_9 = 0.0; | ||||
|     SVID3_9 = 0; | ||||
|     DELTA_A_9 = 0.0; | ||||
|     e_9 = 0.0; | ||||
|     omega_9 = 0.0; | ||||
|     delta_i_9 = 0.0; | ||||
|  | ||||
|     // Word type 10: Almanac for SVID3 (2/2) | ||||
|     IOD_a_10 = 0; | ||||
|     Omega0_10 = 0.0; | ||||
|     Omega_dot_10 = 0.0; | ||||
|     M0_10 = 0.0; | ||||
|     af0_10 = 0.0; | ||||
|     af1_10 = 0.0; | ||||
|     E5b_HS_10 = 0.0; | ||||
|     E1B_HS_10 = 0.0; | ||||
|     E5a_HS_10 = 0.0; | ||||
|  | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     A_0G_10 = 0.0; | ||||
|     A_1G_10 = 0.0; | ||||
|     t_0G_10 = 0.0; | ||||
|     WN_0G_10 = 0.0; | ||||
|     i_satellite_PRN = 0U; | ||||
|     d_Toa = 0.0; | ||||
|     d_WNa = 0.0; | ||||
|     d_IODa = 0.0; | ||||
|     d_Delta_i = 0.0; | ||||
|     d_M_0 = 0.0; | ||||
|     d_e_eccentricity = 0.0; | ||||
|     d_Delta_sqrt_A = 0.0; | ||||
|     d_OMEGA0 = 0.0; | ||||
|     d_OMEGA = 0.0; | ||||
|     d_OMEGA_DOT = 0.0; | ||||
|     d_A_f0 = 0.0; | ||||
|     d_A_f1 = 0.0; | ||||
|     E5b_HS = 0.0; | ||||
|     E1B_HS = 0.0; | ||||
|     E5a_HS = 0.0; | ||||
| } | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| /*! | ||||
|  * \file galileo_almanac.h | ||||
|  * \brief  Interface of a Galileo ALMANAC storage | ||||
|  * \author Javier Arribas, 2013. jarribas(at)cttc.es | ||||
|  * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com | ||||
|  * \author Carles Fernandez, 2018. cfernandez(at)cttc.cat | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
|  * Copyright (C) 2010-2018  (see AUTHORS file for a list of contributors) | ||||
| @@ -28,81 +28,65 @@ | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #ifndef GNSS_SDR_GALILEO_ALMANAC_H_ | ||||
| #define GNSS_SDR_GALILEO_ALMANAC_H_ | ||||
|  | ||||
| #include <boost/serialization/nvp.hpp> | ||||
| #include <cstdint> | ||||
|  | ||||
| /*! | ||||
|  * \brief This class is a storage for the GALILEO ALMANAC data as described in GALILEO ICD | ||||
|  * | ||||
|  * See https://www.gsc-europa.eu/system/files/galileo_documents/Galileo_OS_SIS_ICD.pdf paragraph 5.1.10 | ||||
|  * \brief This class is a storage for the Galileo SV ALMANAC data | ||||
|  */ | ||||
| class Galileo_Almanac | ||||
| { | ||||
| public: | ||||
|     // Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     int32_t IOD_a_7; | ||||
|     double WN_a_7; | ||||
|     double t0a_7; | ||||
|     int32_t SVID1_7; | ||||
|     double DELTA_A_7; | ||||
|     double e_7; | ||||
|     double omega_7; | ||||
|     double delta_i_7; | ||||
|     double Omega0_7; | ||||
|     double Omega_dot_7; | ||||
|     double M0_7; | ||||
|     uint32_t i_satellite_PRN;  //!< SV PRN NUMBER | ||||
|     double d_Toa; | ||||
|     double d_WNa; | ||||
|     double d_IODa; | ||||
|     double d_Delta_i; | ||||
|     double d_M_0;             //!< Mean Anomaly at Reference Time [semi-circles] | ||||
|     double d_e_eccentricity;  //!< Eccentricity [dimensionless] | ||||
|     double d_Delta_sqrt_A;    //!< Square Root of the Semi-Major Axis [sqrt(m)] | ||||
|     double d_OMEGA0;          //!< Longitude of Ascending Node of Orbit Plane at Weekly Epoch [semi-circles] | ||||
|     double d_OMEGA;           //!< Argument of Perigee [semi-cicles] | ||||
|     double d_OMEGA_DOT;       //!< Rate of Right Ascension [semi-circles/s] | ||||
|     double d_A_f0;            //!< Coefficient 0 of code phase offset model [s] | ||||
|     double d_A_f1;            //!< Coefficient 1 of code phase offset model [s/s] | ||||
|     double E5b_HS; | ||||
|     double E1B_HS; | ||||
|     double E5a_HS; | ||||
|  | ||||
|     // Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2) | ||||
|     int32_t IOD_a_8; | ||||
|     double af0_8; | ||||
|     double af1_8; | ||||
|     double E5b_HS_8; | ||||
|     double E1B_HS_8; | ||||
|     double E5a_HS_8; | ||||
|     int32_t SVID2_8; | ||||
|     double DELTA_A_8; | ||||
|     double e_8; | ||||
|     double omega_8; | ||||
|     double delta_i_8; | ||||
|     double Omega0_8; | ||||
|     double Omega_dot_8; | ||||
|     /*! | ||||
|      * Default constructor | ||||
|      */ | ||||
|     Galileo_Almanac(); | ||||
|  | ||||
|     // Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2) | ||||
|     int32_t IOD_a_9; | ||||
|     double WN_a_9; | ||||
|     double t0a_9; | ||||
|     double M0_9; | ||||
|     double af0_9; | ||||
|     double af1_9; | ||||
|     double E5b_HS_9; | ||||
|     double E1B_HS_9; | ||||
|     double E5a_HS_9; | ||||
|     int32_t SVID3_9; | ||||
|     double DELTA_A_9; | ||||
|     double e_9; | ||||
|     double omega_9; | ||||
|     double delta_i_9; | ||||
|     template <class Archive> | ||||
|  | ||||
|     // Word type 10: Almanac for SVID3 (2/2) | ||||
|     int32_t IOD_a_10; | ||||
|     double Omega0_10; | ||||
|     double Omega_dot_10; | ||||
|     double M0_10; | ||||
|     double af0_10; | ||||
|     double af1_10; | ||||
|     double E5b_HS_10; | ||||
|     double E1B_HS_10; | ||||
|     double E5a_HS_10; | ||||
|  | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     double A_0G_10; | ||||
|     double A_1G_10; | ||||
|     double t_0G_10; | ||||
|     double WN_0G_10; | ||||
|  | ||||
|     Galileo_Almanac();  //!< Default constructor | ||||
|     void serialize(Archive& ar, const unsigned int version) | ||||
|     { | ||||
|         if (version) | ||||
|             { | ||||
|             }; | ||||
|         ar& BOOST_SERIALIZATION_NVP(i_satellite_PRN); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_Toa); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_WNa); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_IODa); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_Delta_i); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_M_0); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_e_eccentricity); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_Delta_sqrt_A); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_OMEGA0); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_OMEGA); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_OMEGA_DOT); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_A_f0); | ||||
|         ar& BOOST_SERIALIZATION_NVP(d_A_f1); | ||||
|         ar& BOOST_SERIALIZATION_NVP(E5b_HS); | ||||
|         ar& BOOST_SERIALIZATION_NVP(E1B_HS); | ||||
|         ar& BOOST_SERIALIZATION_NVP(E5a_HS); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| #endif | ||||
|   | ||||
							
								
								
									
										157
									
								
								src/core/system_parameters/galileo_almanac_helper.cc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/core/system_parameters/galileo_almanac_helper.cc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,157 @@ | ||||
| /*! | ||||
|  * \file galileo_almanac_helper.cc | ||||
|  * \brief  Implementation of a Galileo ALMANAC storage helper | ||||
|  * \author Javier Arribas, 2013. jarribas(at)cttc.es | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
|  * Copyright (C) 2010-2018  (see AUTHORS file for a list of contributors) | ||||
|  * | ||||
|  * GNSS-SDR is a software defined Global Navigation | ||||
|  *          Satellite Systems receiver | ||||
|  * | ||||
|  * This file is part of GNSS-SDR. | ||||
|  * | ||||
|  * GNSS-SDR is free software: you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  * GNSS-SDR is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>. | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #include "galileo_almanac_helper.h" | ||||
|  | ||||
| Galileo_Almanac_Helper::Galileo_Almanac_Helper() | ||||
| { | ||||
|     // Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     IOD_a_7 = 0; | ||||
|     WN_a_7 = 0.0; | ||||
|     t0a_7 = 0.0; | ||||
|     SVID1_7 = 0; | ||||
|     DELTA_A_7 = 0.0; | ||||
|     e_7 = 0.0; | ||||
|     omega_7 = 0.0; | ||||
|     delta_i_7 = 0.0; | ||||
|     Omega0_7 = 0.0; | ||||
|     Omega_dot_7 = 0.0; | ||||
|     M0_7 = 0.0; | ||||
|  | ||||
|     // Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2) | ||||
|     IOD_a_8 = 0; | ||||
|     af0_8 = 0.0; | ||||
|     af1_8 = 0.0; | ||||
|     E5b_HS_8 = 0.0; | ||||
|     E1B_HS_8 = 0.0; | ||||
|     E5a_HS_8 = 0.0; | ||||
|     SVID2_8 = 0; | ||||
|     DELTA_A_8 = 0.0; | ||||
|     e_8 = 0.0; | ||||
|     omega_8 = 0.0; | ||||
|     delta_i_8 = 0.0; | ||||
|     Omega0_8 = 0.0; | ||||
|     Omega_dot_8 = 0.0; | ||||
|  | ||||
|     // Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2) | ||||
|     IOD_a_9 = 0; | ||||
|     WN_a_9 = 0.0; | ||||
|     t0a_9 = 0.0; | ||||
|     M0_9 = 0.0; | ||||
|     af0_9 = 0.0; | ||||
|     af1_9 = 0.0; | ||||
|     E5b_HS_9 = 0.0; | ||||
|     E1B_HS_9 = 0.0; | ||||
|     E5a_HS_9 = 0.0; | ||||
|     SVID3_9 = 0; | ||||
|     DELTA_A_9 = 0.0; | ||||
|     e_9 = 0.0; | ||||
|     omega_9 = 0.0; | ||||
|     delta_i_9 = 0.0; | ||||
|  | ||||
|     // Word type 10: Almanac for SVID3 (2/2) | ||||
|     IOD_a_10 = 0; | ||||
|     Omega0_10 = 0.0; | ||||
|     Omega_dot_10 = 0.0; | ||||
|     M0_10 = 0.0; | ||||
|     af0_10 = 0.0; | ||||
|     af1_10 = 0.0; | ||||
|     E5b_HS_10 = 0.0; | ||||
|     E1B_HS_10 = 0.0; | ||||
|     E5a_HS_10 = 0.0; | ||||
| } | ||||
|  | ||||
| Galileo_Almanac Galileo_Almanac_Helper::get_almanac(int i) | ||||
| { | ||||
|     Galileo_Almanac galileo_almanac; | ||||
|     switch (i) | ||||
|         { | ||||
|         case 1: | ||||
|             galileo_almanac.i_satellite_PRN = this->SVID1_7; | ||||
|             galileo_almanac.d_Toa = this->t0a_7; | ||||
|             galileo_almanac.d_WNa = this->WN_a_7; | ||||
|             galileo_almanac.d_IODa = this->IOD_a_7; | ||||
|             galileo_almanac.d_Delta_i = this->delta_i_7; | ||||
|             galileo_almanac.d_M_0 = this->M0_7; | ||||
|             galileo_almanac.d_e_eccentricity = this->e_7; | ||||
|             galileo_almanac.d_Delta_sqrt_A = this->DELTA_A_7; | ||||
|             galileo_almanac.d_OMEGA0 = this->Omega0_7; | ||||
|             galileo_almanac.d_OMEGA = this->omega_7; | ||||
|             galileo_almanac.d_OMEGA_DOT = this->Omega_dot_7; | ||||
|             galileo_almanac.d_A_f0 = this->af0_8; | ||||
|             galileo_almanac.d_A_f1 = this->af1_8; | ||||
|             galileo_almanac.E5b_HS = this->E5b_HS_8; | ||||
|             galileo_almanac.E1B_HS = this->E1B_HS_8; | ||||
|             galileo_almanac.E5a_HS = this->E5a_HS_8; | ||||
|             break; | ||||
|  | ||||
|         case 2: | ||||
|             galileo_almanac.i_satellite_PRN = this->SVID2_8; | ||||
|             galileo_almanac.d_Toa = this->t0a_9; | ||||
|             galileo_almanac.d_WNa = this->WN_a_9; | ||||
|             galileo_almanac.d_IODa = this->IOD_a_9; | ||||
|             galileo_almanac.d_Delta_i = this->delta_i_8; | ||||
|             galileo_almanac.d_M_0 = this->M0_9; | ||||
|             galileo_almanac.d_e_eccentricity = this->e_8; | ||||
|             galileo_almanac.d_Delta_sqrt_A = this->DELTA_A_8; | ||||
|             galileo_almanac.d_OMEGA0 = this->Omega0_8; | ||||
|             galileo_almanac.d_OMEGA = this->omega_8; | ||||
|             galileo_almanac.d_OMEGA_DOT = this->Omega_dot_8; | ||||
|             galileo_almanac.d_A_f0 = this->af0_9; | ||||
|             galileo_almanac.d_A_f1 = this->af1_9; | ||||
|             galileo_almanac.E5b_HS = this->E5b_HS_9; | ||||
|             galileo_almanac.E1B_HS = this->E1B_HS_9; | ||||
|             galileo_almanac.E5a_HS = this->E5a_HS_9; | ||||
|             break; | ||||
|  | ||||
|         case 3: | ||||
|             galileo_almanac.i_satellite_PRN = this->SVID3_9; | ||||
|             galileo_almanac.d_Toa = this->t0a_9; | ||||
|             galileo_almanac.d_WNa = this->WN_a_9; | ||||
|             galileo_almanac.d_IODa = this->IOD_a_10; | ||||
|             galileo_almanac.d_Delta_i = this->delta_i_9; | ||||
|             galileo_almanac.d_M_0 = this->M0_10; | ||||
|             galileo_almanac.d_e_eccentricity = this->e_9; | ||||
|             galileo_almanac.d_Delta_sqrt_A = this->DELTA_A_9; | ||||
|             galileo_almanac.d_OMEGA0 = this->Omega0_10; | ||||
|             galileo_almanac.d_OMEGA = this->omega_9; | ||||
|             galileo_almanac.d_OMEGA_DOT = this->Omega_dot_10; | ||||
|             galileo_almanac.d_A_f0 = this->af0_10; | ||||
|             galileo_almanac.d_A_f1 = this->af1_10; | ||||
|             galileo_almanac.E5b_HS = this->E5b_HS_10; | ||||
|             galileo_almanac.E1B_HS = this->E1B_HS_10; | ||||
|             galileo_almanac.E5a_HS = this->E5a_HS_10; | ||||
|             break; | ||||
|  | ||||
|         default: | ||||
|             break; | ||||
|         } | ||||
|     return galileo_almanac; | ||||
| } | ||||
							
								
								
									
										104
									
								
								src/core/system_parameters/galileo_almanac_helper.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								src/core/system_parameters/galileo_almanac_helper.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,104 @@ | ||||
| /*! | ||||
|  * \file galileo_almanac_helper.h | ||||
|  * \brief  Interface of a Galileo ALMANAC storage helper | ||||
|  * \author Javier Arribas, 2013. jarribas(at)cttc.es | ||||
|  * \author Mara Branzanti 2013. mara.branzanti(at)gmail.com | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
|  * Copyright (C) 2010-2018  (see AUTHORS file for a list of contributors) | ||||
|  * | ||||
|  * GNSS-SDR is a software defined Global Navigation | ||||
|  *          Satellite Systems receiver | ||||
|  * | ||||
|  * This file is part of GNSS-SDR. | ||||
|  * | ||||
|  * GNSS-SDR is free software: you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  * GNSS-SDR is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>. | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #ifndef GNSS_SDR_GALILEO_ALMANAC_HELPER_H_ | ||||
| #define GNSS_SDR_GALILEO_ALMANAC_HELPER_H_ | ||||
|  | ||||
| #include "galileo_almanac.h" | ||||
| #include <cstdint> | ||||
|  | ||||
| /*! | ||||
|  * \brief This class is a storage for the GALILEO ALMANAC data as described in GALILEO ICD | ||||
|  * | ||||
|  * See https://www.gsc-europa.eu/system/files/galileo_documents/Galileo_OS_SIS_ICD.pdf paragraph 5.1.10 | ||||
|  */ | ||||
| class Galileo_Almanac_Helper | ||||
| { | ||||
| public: | ||||
|     // Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     int32_t IOD_a_7; | ||||
|     double WN_a_7; | ||||
|     double t0a_7; | ||||
|     int32_t SVID1_7; | ||||
|     double DELTA_A_7; | ||||
|     double e_7; | ||||
|     double omega_7; | ||||
|     double delta_i_7; | ||||
|     double Omega0_7; | ||||
|     double Omega_dot_7; | ||||
|     double M0_7; | ||||
|  | ||||
|     // Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2) | ||||
|     int32_t IOD_a_8; | ||||
|     double af0_8; | ||||
|     double af1_8; | ||||
|     double E5b_HS_8; | ||||
|     double E1B_HS_8; | ||||
|     double E5a_HS_8; | ||||
|     int32_t SVID2_8; | ||||
|     double DELTA_A_8; | ||||
|     double e_8; | ||||
|     double omega_8; | ||||
|     double delta_i_8; | ||||
|     double Omega0_8; | ||||
|     double Omega_dot_8; | ||||
|  | ||||
|     // Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2) | ||||
|     int32_t IOD_a_9; | ||||
|     double WN_a_9; | ||||
|     double t0a_9; | ||||
|     double M0_9; | ||||
|     double af0_9; | ||||
|     double af1_9; | ||||
|     double E5b_HS_9; | ||||
|     double E1B_HS_9; | ||||
|     double E5a_HS_9; | ||||
|     int32_t SVID3_9; | ||||
|     double DELTA_A_9; | ||||
|     double e_9; | ||||
|     double omega_9; | ||||
|     double delta_i_9; | ||||
|  | ||||
|     // Word type 10: Almanac for SVID3 (2/2) | ||||
|     int32_t IOD_a_10; | ||||
|     double Omega0_10; | ||||
|     double Omega_dot_10; | ||||
|     double M0_10; | ||||
|     double af0_10; | ||||
|     double af1_10; | ||||
|     double E5b_HS_10; | ||||
|     double E1B_HS_10; | ||||
|     double E5a_HS_10; | ||||
|  | ||||
|     Galileo_Almanac_Helper();  //!< Default constructor | ||||
|     Galileo_Almanac get_almanac(int i); | ||||
| }; | ||||
|  | ||||
| #endif | ||||
| @@ -630,9 +630,9 @@ Galileo_Utc_Model Galileo_Fnav_Message::get_utc_model() | ||||
| } | ||||
|  | ||||
|  | ||||
| Galileo_Almanac Galileo_Fnav_Message::get_almanac() | ||||
| Galileo_Almanac_Helper Galileo_Fnav_Message::get_almanac() | ||||
| { | ||||
|     Galileo_Almanac almanac; | ||||
|     Galileo_Almanac_Helper almanac; | ||||
|     // FNAV equivalent of INAV Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     almanac.IOD_a_7 = FNAV_IODa_5; | ||||
|     almanac.WN_a_7 = FNAV_WNa_5; | ||||
|   | ||||
| @@ -40,7 +40,7 @@ | ||||
|  | ||||
| #include "galileo_ephemeris.h" | ||||
| #include "galileo_iono.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "galileo_almanac_helper.h" | ||||
| #include "galileo_utc_model.h" | ||||
| #include "Galileo_E5a.h" | ||||
| #include <bitset> | ||||
| @@ -66,7 +66,7 @@ public: | ||||
|     Galileo_Ephemeris get_ephemeris(); | ||||
|     Galileo_Iono get_iono(); | ||||
|     Galileo_Utc_Model get_utc_model(); | ||||
|     Galileo_Almanac get_almanac(); | ||||
|     Galileo_Almanac_Helper get_almanac(); | ||||
|  | ||||
|     Galileo_Fnav_Message(); | ||||
|  | ||||
|   | ||||
| @@ -578,13 +578,18 @@ Galileo_Utc_Model Galileo_Navigation_Message::get_utc_model() | ||||
|     utc_model.DN_6 = DN_6; | ||||
|     utc_model.Delta_tLSF_6 = Delta_tLSF_6; | ||||
|     utc_model.flag_utc_model = flag_utc_model; | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     utc_model.A_0G_10 = A_0G_10; | ||||
|     utc_model.A_1G_10 = A_1G_10; | ||||
|     utc_model.t_0G_10 = t_0G_10; | ||||
|     utc_model.WN_0G_10 = WN_0G_10; | ||||
|     return utc_model; | ||||
| } | ||||
|  | ||||
|  | ||||
| Galileo_Almanac Galileo_Navigation_Message::get_almanac() | ||||
| Galileo_Almanac_Helper Galileo_Navigation_Message::get_almanac() | ||||
| { | ||||
|     Galileo_Almanac almanac; | ||||
|     Galileo_Almanac_Helper almanac; | ||||
|     // Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number | ||||
|     almanac.IOD_a_7 = IOD_a_7; | ||||
|     almanac.WN_a_7 = WN_a_7; | ||||
| @@ -637,12 +642,6 @@ Galileo_Almanac Galileo_Navigation_Message::get_almanac() | ||||
|     almanac.E5b_HS_10 = E5b_HS_10; | ||||
|     almanac.E1B_HS_10 = E1B_HS_10; | ||||
|  | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     almanac.A_0G_10 = A_0G_10; | ||||
|     almanac.A_1G_10 = A_1G_10; | ||||
|     almanac.t_0G_10 = t_0G_10; | ||||
|     almanac.WN_0G_10 = WN_0G_10; | ||||
|  | ||||
|     return almanac; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
|  | ||||
| #include "galileo_ephemeris.h" | ||||
| #include "galileo_iono.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "galileo_almanac_helper.h" | ||||
| #include "galileo_utc_model.h" | ||||
| #include "Galileo_E1.h" | ||||
| #include <bitset> | ||||
| @@ -290,9 +290,9 @@ public: | ||||
|     Galileo_Utc_Model get_utc_model(); | ||||
|  | ||||
|     /* | ||||
|      * \brief Returns a Galileo_Almanac object filled with the latest navigation data received | ||||
|      * \brief Returns a Galileo_Almanac_Helper object filled with the latest navigation data received | ||||
|      */ | ||||
|     Galileo_Almanac get_almanac(); | ||||
|     Galileo_Almanac_Helper get_almanac(); | ||||
|  | ||||
|     Galileo_Navigation_Message(); | ||||
| }; | ||||
|   | ||||
| @@ -43,6 +43,11 @@ Galileo_Utc_Model::Galileo_Utc_Model() | ||||
|     DN_6 = 0.0; | ||||
|     Delta_tLSF_6 = 0.0; | ||||
|     flag_utc_model = false; | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     A_0G_10 = 0.0; | ||||
|     A_1G_10 = 0.0; | ||||
|     t_0G_10 = 0.0; | ||||
|     WN_0G_10 = 0.0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -53,6 +53,13 @@ public: | ||||
|     double DN_6; | ||||
|     double Delta_tLSF_6; | ||||
|     bool flag_utc_model; | ||||
|  | ||||
|     // GPS to Galileo GST conversion parameters | ||||
|     double A_0G_10; | ||||
|     double A_1G_10; | ||||
|     double t_0G_10; | ||||
|     double WN_0G_10; | ||||
|  | ||||
|     //double TOW_6; | ||||
|     double GST_to_UTC_time(double t_e, int WN);  //!< GST-UTC Conversion Algorithm and Parameters | ||||
|     /*! | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez