diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc index d63119d6f..fab6db882 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_e1b_telemetry_decoder_cc.cc @@ -318,7 +318,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector if (d_nav.have_new_iono_and_GST()==true) { Galileo_Iono iono=d_nav.get_iono(); //notice that the read operation will clear the valid flag - std::cout<<"New Galileo IONO model received for SV "<push(iono); } if (d_nav.have_new_utc_model()==true) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index a34941220..ce1ebd09c 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -161,7 +161,8 @@ void ControlThread::run() gps_acq_assist_data_collector_thread_=boost::thread(&ControlThread::gps_acq_assist_data_collector,this); galileo_ephemeris_data_collector_thread_ =boost::thread(&ControlThread::galileo_ephemeris_data_collector, this); - + galileo_iono_data_collector_thread_ =boost::thread(&ControlThread::galileo_iono_data_collector, this); + galileo_utc_model_data_collector_thread_ =boost::thread(&ControlThread::galileo_utc_model_data_collector, this); // Main loop to read and process the control messages while (flowgraph_->running() && !stop_) { @@ -180,7 +181,8 @@ void ControlThread::run() //Join Galileo threads galileo_ephemeris_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); - + galileo_iono_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); + galileo_utc_model_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); //Join keyboard threads keyboard_thread_.timed_join(boost::posix_time::seconds(1)); @@ -479,6 +481,7 @@ void ControlThread::gps_ephemeris_data_collector() } } + void ControlThread::galileo_ephemeris_data_collector() { @@ -492,31 +495,35 @@ void ControlThread::galileo_ephemeris_data_collector() // DEBUG MESSAGE std::cout << "Ephemeris record has arrived from SAT ID " << galileo_eph.SV_ID_PRN_4 << std::endl; - // insert new ephemeris record to the global ephemeris map + + // insert new ephemeris record to the global ephemeris map if (global_galileo_ephemeris_map.read(galileo_eph.SV_ID_PRN_4,galileo_eph_old)) { // Check the EPHEMERIS timestamp. If it is newer, then update the ephemeris - if (galileo_eph.WN_5 > galileo_eph_old.WN_5) - { - std::cout << "Ephemeris record updated -- GALILEO Week Number ="< galileo_eph_old.TOW_5) + if (galileo_eph.WN_5 > galileo_eph_old.WN_5) //further check because it is not clear when IOD is reset { - std::cout << "Ephemeris record updated -- GALILEO TOW ="< galileo_eph_old.IOD_ephemeris) + { + std::cout << "Ephemeris record updated in global map-- IOD_ephemeris ="< galileo_iono_old.WNot_6) + { + std::cout << "IONO record updated in global map--new GALILEO UTC-IONO Week Number"<< std::endl; + global_galileo_iono_map.write(0,galileo_iono); + }else{ + if (galileo_iono.t0t_6 > galileo_iono_old.t0t_6) + { + std::cout << "IONO record updated in global map--new GALILEO UTC-IONO time of Week" << std::endl; + global_galileo_iono_map.write(0,galileo_iono); + //std::cout << "GALILEO IONO time of Week old: " << galileo_iono_old.t0t_6< galileo_utc_old.WNot_6) //further check because it is not clear when IOD is reset + { + //std::cout << "UTC record updated --new GALILEO UTC Week Number ="< galileo_utc_old.t0t_6) + { + //std::cout << "UTC record updated --new GALILEO UTC time of Week ="<