mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Display channel when decoding GNAV messages
This commit is contained in:
		| @@ -31,9 +31,10 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| #include "glonass_l2_ca_telemetry_decoder_cc.h" | #include "glonass_l2_ca_telemetry_decoder_cc.h" | ||||||
|  | #include "display.h" | ||||||
| #include <boost/lexical_cast.hpp> | #include <boost/lexical_cast.hpp> | ||||||
| #include <gnuradio/io_signature.h> |  | ||||||
| #include <glog/logging.h> | #include <glog/logging.h> | ||||||
|  | #include <gnuradio/io_signature.h> | ||||||
|  |  | ||||||
|  |  | ||||||
| #define CRC_ERROR_LIMIT 6 | #define CRC_ERROR_LIMIT 6 | ||||||
| @@ -180,11 +181,11 @@ void glonass_l2_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, in | |||||||
|     // 3. Check operation executed correctly |     // 3. Check operation executed correctly | ||||||
|     if (d_nav.flag_CRC_test == true) |     if (d_nav.flag_CRC_test == true) | ||||||
|         { |         { | ||||||
|             LOG(INFO) << "GLONASS GNAV CRC correct on channel " << d_channel << " from satellite " << d_satellite; |             LOG(INFO) << "GLONASS GNAV CRC correct in channel " << d_channel << " from satellite " << d_satellite; | ||||||
|         } |         } | ||||||
|     else |     else | ||||||
|         { |         { | ||||||
|             LOG(INFO) << "GLONASS GNAV CRC error on channel " << d_channel << " from satellite " << d_satellite; |             LOG(INFO) << "GLONASS GNAV CRC error in channel " << d_channel << " from satellite " << d_satellite; | ||||||
|         } |         } | ||||||
|     // 4. Push the new navigation data to the queues |     // 4. Push the new navigation data to the queues | ||||||
|     if (d_nav.have_new_ephemeris() == true) |     if (d_nav.have_new_ephemeris() == true) | ||||||
| @@ -193,26 +194,29 @@ void glonass_l2_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, in | |||||||
|             d_nav.gnav_ephemeris.i_satellite_freq_channel = d_satellite.get_rf_link(); |             d_nav.gnav_ephemeris.i_satellite_freq_channel = d_satellite.get_rf_link(); | ||||||
|             std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris()); |             std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris()); | ||||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); |             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||||
|             LOG(INFO) << "GLONASS GNAV Ephemeris have been received on channel" << d_channel << " from satellite " << d_satellite; |             LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite; | ||||||
|  |             std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl; | ||||||
|         } |         } | ||||||
|     if (d_nav.have_new_utc_model() == true) |     if (d_nav.have_new_utc_model() == true) | ||||||
|         { |         { | ||||||
|             // get object for this SV (mandatory) |             // get object for this SV (mandatory) | ||||||
|             std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model()); |             std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model()); | ||||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); |             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||||
|             LOG(INFO) << "GLONASS GNAV UTC Model have been received on channel" << d_channel << " from satellite " << d_satellite; |             LOG(INFO) << "GLONASS GNAV UTC Model have been received in channel" << d_channel << " from satellite " << d_satellite; | ||||||
|  |             std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl; | ||||||
|         } |         } | ||||||
|     if (d_nav.have_new_almanac() == true) |     if (d_nav.have_new_almanac() == true) | ||||||
|         { |         { | ||||||
|             unsigned int slot_nbr = d_nav.i_alm_satellite_slot_number; |             unsigned int slot_nbr = d_nav.i_alm_satellite_slot_number; | ||||||
|             std::shared_ptr<Glonass_Gnav_Almanac> tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr)); |             std::shared_ptr<Glonass_Gnav_Almanac> tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr)); | ||||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); |             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||||
|             LOG(INFO) << "GLONASS GNAV Almanac have been received on channel" << d_channel << " in slot number " << slot_nbr; |             LOG(INFO) << "GLONASS GNAV Almanac have been received in channel" << d_channel << " in slot number " << slot_nbr; | ||||||
|  |             std::cout << TEXT_CYAN << "New GLONASS L2 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << std::endl; | ||||||
|         } |         } | ||||||
|     // 5. Update satellite information on system |     // 5. Update satellite information on system | ||||||
|     if (d_nav.flag_update_slot_number == true) |     if (d_nav.flag_update_slot_number == true) | ||||||
|         { |         { | ||||||
|             LOG(INFO) << "GLONASS GNAV Slot Number Identified on channel " << d_channel; |             LOG(INFO) << "GLONASS GNAV Slot Number Identified in channel " << d_channel; | ||||||
|             d_satellite.update_PRN(d_nav.gnav_ephemeris.d_n); |             d_satellite.update_PRN(d_nav.gnav_ephemeris.d_n); | ||||||
|             d_satellite.what_block(d_satellite.get_system(), d_nav.gnav_ephemeris.d_n); |             d_satellite.what_block(d_satellite.get_system(), d_nav.gnav_ephemeris.d_n); | ||||||
|             d_nav.flag_update_slot_number = false; |             d_nav.flag_update_slot_number = false; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez