mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-01 07:43:04 +00:00 
			
		
		
		
	bugfix: Adds frequency number and proper field name for RINEX v2.11
This commit is contained in:
		| @@ -505,7 +505,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_M | |||||||
| 			line += Rinex_Printer::rightJustify(month, 6); | 			line += Rinex_Printer::rightJustify(month, 6); | ||||||
| 			line += Rinex_Printer::rightJustify(day, 6); | 			line += Rinex_Printer::rightJustify(day, 6); | ||||||
| 			line += std::string(3, ' '); | 			line += std::string(3, ' '); | ||||||
| 			line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(glonass_gnav_utc_model.d_tau_c, 16, 2), 19); | 			line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(glonass_gnav_utc_model.d_tau_c, 19, 2), 19); | ||||||
| 			line += std::string(20, ' '); | 			line += std::string(20, ' '); | ||||||
| 			line += Rinex_Printer::leftJustify("CORR TO SYSTEM TIME", 20); | 			line += Rinex_Printer::leftJustify("CORR TO SYSTEM TIME", 20); | ||||||
| 			Rinex_Printer::lengthCheck(line); | 			Rinex_Printer::lengthCheck(line); | ||||||
| @@ -3348,12 +3348,24 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem | |||||||
|     out << line << std::endl; |     out << line << std::endl; | ||||||
|  |  | ||||||
|     // -------- Line MARKER TYPE |     // -------- Line MARKER TYPE | ||||||
|     line.clear(); |     if (version == 2) | ||||||
|     line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | 		{ | ||||||
|     line += std::string(40, ' '); | 			line.clear(); | ||||||
|     line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|     Rinex_Printer::lengthCheck(line); | 			line += std::string(40, ' '); | ||||||
|     out << line << std::endl; | 			line += Rinex_Printer::leftJustify("MARKER NUMBER", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  | 	if (version == 3) | ||||||
|  | 		{ | ||||||
|  | 			line.clear(); | ||||||
|  | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|  | 			line += std::string(40, ' '); | ||||||
|  | 			line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|     // -------- Line OBSERVER / AGENCY |     // -------- Line OBSERVER / AGENCY | ||||||
|     line.clear(); |     line.clear(); | ||||||
| @@ -3648,12 +3660,25 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | |||||||
|     Rinex_Printer::lengthCheck(line); |     Rinex_Printer::lengthCheck(line); | ||||||
|     out << line << std::endl; |     out << line << std::endl; | ||||||
|  |  | ||||||
|     // -------- Line MARKER NAME |     // -------- Line MARKER NAME / TYPE | ||||||
|     line.clear(); |     if (version == 2) | ||||||
|     line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, | 		{ | ||||||
|     line += Rinex_Printer::leftJustify("MARKER NAME", 20); | 			line.clear(); | ||||||
|     Rinex_Printer::lengthCheck(line); | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|     out << line << std::endl; | 			line += std::string(40, ' '); | ||||||
|  | 			line += Rinex_Printer::leftJustify("MARKER NUMBER", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  | 	if (version == 3) | ||||||
|  | 		{ | ||||||
|  | 			line.clear(); | ||||||
|  | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|  | 			line += std::string(40, ' '); | ||||||
|  | 			line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|     // -------- Line MARKER TYPE |     // -------- Line MARKER TYPE | ||||||
|     line.clear(); |     line.clear(); | ||||||
| @@ -3987,11 +4012,24 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | |||||||
|     out << line << std::endl; |     out << line << std::endl; | ||||||
|  |  | ||||||
|     // -------- Line MARKER NAME |     // -------- Line MARKER NAME | ||||||
|     line.clear(); |     if (version == 2) | ||||||
|     line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, | 		{ | ||||||
|     line += Rinex_Printer::leftJustify("MARKER NAME", 20); | 			line.clear(); | ||||||
|     Rinex_Printer::lengthCheck(line); | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|     out << line << std::endl; | 			line += std::string(40, ' '); | ||||||
|  | 			line += Rinex_Printer::leftJustify("MARKER NUMBER", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  | 	if (version == 3) | ||||||
|  | 		{ | ||||||
|  | 			line.clear(); | ||||||
|  | 			line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||||
|  | 			line += std::string(40, ' '); | ||||||
|  | 			line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||||
|  | 			Rinex_Printer::lengthCheck(line); | ||||||
|  | 			out << line << std::endl; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|     // -------- Line MARKER TYPE |     // -------- Line MARKER TYPE | ||||||
|     line.clear(); |     line.clear(); | ||||||
| @@ -4294,7 +4332,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& | |||||||
|     // -------- Line MARKER NAME |     // -------- Line MARKER NAME | ||||||
|     line.clear(); |     line.clear(); | ||||||
|     line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, |     line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property, | ||||||
|     line += Rinex_Printer::leftJustify("MARKER NAME", 20); |     line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||||
|     Rinex_Printer::lengthCheck(line); |     Rinex_Printer::lengthCheck(line); | ||||||
|     out << line << std::endl; |     out << line << std::endl; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -200,6 +200,7 @@ void glonass_l1_ca_telemetry_decoder_cc::decode_string(double *frame_symbols,int | |||||||
|     if (d_nav.have_new_ephemeris() == true) |     if (d_nav.have_new_ephemeris() == true) | ||||||
|         { |         { | ||||||
|             // get object for this SV (mandatory) |             // get object for this SV (mandatory) | ||||||
|  |     	 	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 on channel" << d_channel << " from satellite " << d_satellite; | ||||||
|   | |||||||
| @@ -223,7 +223,13 @@ void Gnss_Satellite::set_PRN(unsigned int PRN_) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | signed int Gnss_Satellite::get_rf_link() const | ||||||
|  | { | ||||||
|  |     // Get satellite's rf link. Identifies the GLONASS Frequency Channel | ||||||
|  |     signed int rf_link_; | ||||||
|  |     rf_link_ = rf_link; | ||||||
|  |     return rf_link_; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| unsigned int Gnss_Satellite::get_PRN() const | unsigned int Gnss_Satellite::get_PRN() const | ||||||
|   | |||||||
| @@ -52,6 +52,7 @@ public: | |||||||
|     ~Gnss_Satellite();                         //!< Default Destructor. |     ~Gnss_Satellite();                         //!< Default Destructor. | ||||||
|     void update_PRN(unsigned int PRN);       	 //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages |     void update_PRN(unsigned int PRN);       	 //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages | ||||||
|     unsigned int get_PRN() const;              //!< Gets satellite's PRN |     unsigned int get_PRN() const;              //!< Gets satellite's PRN | ||||||
|  |     signed int get_rf_link() const;				//!< Gets the satellite's rf link | ||||||
|     std::string get_system() const;            //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"} |     std::string get_system() const;            //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"} | ||||||
|     std::string get_system_short() const;      //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"} |     std::string get_system_short() const;      //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"} | ||||||
|     std::string get_block() const;             //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"} |     std::string get_block() const;             //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Damian Miralles
					Damian Miralles