mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
		| @@ -877,11 +877,9 @@ bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name) | ||||
|                 } | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             LOG(WARNING) << "Failed to save gnss_synchro, map is empty"; | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     LOG(WARNING) << "Failed to save gnss_synchro, map is empty"; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -925,10 +923,8 @@ bool rtklib_pvt_cc::get_latest_PVT(double* longitude_deg, | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -80,8 +80,7 @@ else() | ||||
|     ) | ||||
| endif() | ||||
|  | ||||
| target_link_libraries( | ||||
|     pvt_lib | ||||
| target_link_libraries(pvt_lib | ||||
|     rtklib_lib | ||||
|     gnss_sdr_flags | ||||
|     gnss_sp_libs | ||||
|   | ||||
| @@ -149,19 +149,15 @@ bool GeoJSON_Printer::set_headers(const std::string& filename, bool time_tag_nam | ||||
|             geojson_file << "  \"properties\": {" << std::endl; | ||||
|             geojson_file << R"(       "name": "Locations generated by GNSS-SDR" )" << std::endl; | ||||
|             geojson_file << "   }," << std::endl; | ||||
|  | ||||
|  | ||||
|             geojson_file << "  \"geometry\": {" << std::endl; | ||||
|             geojson_file << R"(      "type": "MultiPoint",)" << std::endl; | ||||
|             geojson_file << "      \"coordinates\": [" << std::endl; | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -200,10 +196,7 @@ bool GeoJSON_Printer::print_position(const std::shared_ptr<Pvt_Solution>& positi | ||||
|                 } | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -222,11 +215,7 @@ bool GeoJSON_Printer::close_file() | ||||
|                 { | ||||
|                     if (remove(filename_.c_str()) != 0) LOG(INFO) << "Error deleting temporary file"; | ||||
|                 } | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|   | ||||
| @@ -149,11 +149,8 @@ bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name) | ||||
|                      << indent << indent << "<trkseg>" << std::endl; | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|             return false; | ||||
|         } | ||||
|     std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -201,10 +198,7 @@ bool Gpx_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, | ||||
|                      << "</gpxtpx:TrackPointExtension></extensions></trkpt>" << std::endl; | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -218,10 +212,7 @@ bool Gpx_Printer::close_file() | ||||
|             gpx_file.close(); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -206,11 +206,8 @@ bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name) | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|             return false; | ||||
|         } | ||||
|     std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?" << std::endl; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -282,10 +279,7 @@ bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -319,10 +313,7 @@ bool Kml_Printer::close_file() | ||||
|  | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -46,7 +46,7 @@ | ||||
| using google::LogMessage; | ||||
|  | ||||
|  | ||||
| Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name, const std::string& base_path) | ||||
| Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path) | ||||
| { | ||||
|     boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); | ||||
|     tm timeinfo = boost::posix_time::to_tm(pt); | ||||
|   | ||||
| @@ -48,7 +48,7 @@ public: | ||||
|     /*! | ||||
|      * \brief Default constructor. | ||||
|      */ | ||||
|     Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = "."); | ||||
|     Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = "."); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Default destructor. | ||||
|   | ||||
| @@ -203,10 +203,7 @@ signed int GalileoE1Pcps8msAmbiguousAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -334,7 +334,7 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -206,10 +206,7 @@ signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -237,10 +237,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -207,10 +207,7 @@ signed int GalileoE1PcpsTongAmbiguousAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -213,10 +213,7 @@ signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -319,7 +319,7 @@ gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -318,7 +318,7 @@ gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -307,7 +307,7 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -231,10 +231,7 @@ signed int GpsL1CaPcpsQuickSyncAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -193,10 +193,7 @@ signed int GpsL1CaPcpsTongAcquisition::mag() | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -321,7 +321,7 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -309,7 +309,7 @@ gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block() | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|   | ||||
| @@ -268,7 +268,7 @@ bool pcps_acquisition::is_fdma() | ||||
|             LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl; | ||||
|             return true; | ||||
|         } | ||||
|     else if (strcmp(d_gnss_synchro->Signal, "2G") == 0) | ||||
|     if (strcmp(d_gnss_synchro->Signal, "2G") == 0) | ||||
|         { | ||||
|             d_old_freq += DFRQ2_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN); | ||||
|             LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl; | ||||
|   | ||||
| @@ -81,13 +81,10 @@ bool ChannelFsm::Event_start_acquisition() | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_state = 1; | ||||
|             start_acquisition(); | ||||
|             DLOG(INFO) << "CH = " << channel_ << ". Ev start acquisition"; | ||||
|             return true; | ||||
|         } | ||||
|     d_state = 1; | ||||
|     start_acquisition(); | ||||
|     DLOG(INFO) << "CH = " << channel_ << ". Ev start acquisition"; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -98,13 +95,10 @@ bool ChannelFsm::Event_valid_acquisition() | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_state = 2; | ||||
|             start_tracking(); | ||||
|             DLOG(INFO) << "CH = " << channel_ << ". Ev valid acquisition"; | ||||
|             return true; | ||||
|         } | ||||
|     d_state = 2; | ||||
|     start_tracking(); | ||||
|     DLOG(INFO) << "CH = " << channel_ << ". Ev valid acquisition"; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -115,13 +109,10 @@ bool ChannelFsm::Event_failed_acquisition_repeat() | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_state = 1; | ||||
|             start_acquisition(); | ||||
|             DLOG(INFO) << "CH = " << channel_ << ". Ev failed acquisition repeat"; | ||||
|             return true; | ||||
|         } | ||||
|     d_state = 1; | ||||
|     start_acquisition(); | ||||
|     DLOG(INFO) << "CH = " << channel_ << ". Ev failed acquisition repeat"; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -132,13 +123,10 @@ bool ChannelFsm::Event_failed_acquisition_no_repeat() | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_state = 3; | ||||
|             request_satellite(); | ||||
|             DLOG(INFO) << "CH = " << channel_ << ". Ev failed acquisition no repeat"; | ||||
|             return true; | ||||
|         } | ||||
|     d_state = 3; | ||||
|     request_satellite(); | ||||
|     DLOG(INFO) << "CH = " << channel_ << ". Ev failed acquisition no repeat"; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -149,13 +137,10 @@ bool ChannelFsm::Event_failed_tracking_standby() | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_state = 0U; | ||||
|             notify_stop_tracking(); | ||||
|             DLOG(INFO) << "CH = " << channel_ << ". Ev failed tracking standby"; | ||||
|             return true; | ||||
|         } | ||||
|     d_state = 0U; | ||||
|     notify_stop_tracking(); | ||||
|     DLOG(INFO) << "CH = " << channel_ << ". Ev failed tracking standby"; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -144,8 +144,5 @@ gr::basic_block_sptr IbyteToCbyte::get_right_block() | ||||
|         { | ||||
|             return conjugate_ic_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return ibyte_to_cbyte_; | ||||
|         } | ||||
|     return ibyte_to_cbyte_; | ||||
| } | ||||
|   | ||||
| @@ -142,8 +142,5 @@ gr::basic_block_sptr IbyteToComplex::get_right_block() | ||||
|         { | ||||
|             return conjugate_cc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return gr_interleaved_char_to_complex_; | ||||
|         } | ||||
|     return gr_interleaved_char_to_complex_; | ||||
| } | ||||
|   | ||||
| @@ -141,8 +141,5 @@ gr::basic_block_sptr IbyteToCshort::get_right_block() | ||||
|         { | ||||
|             return conjugate_sc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return interleaved_byte_to_complex_short_; | ||||
|         } | ||||
|     return interleaved_byte_to_complex_short_; | ||||
| } | ||||
|   | ||||
| @@ -142,8 +142,5 @@ gr::basic_block_sptr IshortToComplex::get_right_block() | ||||
|         { | ||||
|             return conjugate_cc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return gr_interleaved_short_to_complex_; | ||||
|         } | ||||
|     return gr_interleaved_short_to_complex_; | ||||
| } | ||||
|   | ||||
| @@ -144,8 +144,5 @@ gr::basic_block_sptr IshortToCshort::get_right_block() | ||||
|         { | ||||
|             return conjugate_sc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return interleaved_short_to_complex_short_; | ||||
|         } | ||||
|     return interleaved_short_to_complex_short_; | ||||
| } | ||||
|   | ||||
| @@ -31,7 +31,6 @@ | ||||
|  | ||||
| #include "fir_filter.h" | ||||
| #include "configuration_interface.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <utility> | ||||
| #include <gnuradio/filter/pm_remez.h> | ||||
| #include <glog/logging.h> | ||||
| @@ -284,7 +283,7 @@ gr::basic_block_sptr FirFilter::get_left_block() | ||||
|         { | ||||
|             return fir_filter_ccf_; | ||||
|         } | ||||
|     else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort")) | ||||
|     if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort")) | ||||
|         { | ||||
|             return cshort_to_float_x2_; | ||||
|         } | ||||
| @@ -314,7 +313,7 @@ gr::basic_block_sptr FirFilter::get_right_block() | ||||
|         { | ||||
|             return fir_filter_ccf_; | ||||
|         } | ||||
|     else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort")) | ||||
|     if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort")) | ||||
|         { | ||||
|             return short_x2_to_cshort_; | ||||
|         } | ||||
| @@ -369,23 +368,23 @@ void FirFilter::init() | ||||
|     double option_value; | ||||
|     for (unsigned int i = 0; i < number_of_bands; i++) | ||||
|         { | ||||
|             option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_begin"; | ||||
|             option = ".band" + std::to_string(i + 1) + "_begin"; | ||||
|             option_value = config_->property(role_ + option, default_bands[i]); | ||||
|             bands.push_back(option_value); | ||||
|  | ||||
|             option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_end"; | ||||
|             option = ".band" + std::to_string(i + 1) + "_end"; | ||||
|             option_value = config_->property(role_ + option, default_bands[i]); | ||||
|             bands.push_back(option_value); | ||||
|  | ||||
|             option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_begin"; | ||||
|             option = ".ampl" + std::to_string(i + 1) + "_begin"; | ||||
|             option_value = config_->property(role_ + option, default_bands[i]); | ||||
|             ampl.push_back(option_value); | ||||
|  | ||||
|             option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_end"; | ||||
|             option = ".ampl" + std::to_string(i + 1) + "_end"; | ||||
|             option_value = config_->property(role_ + option, default_bands[i]); | ||||
|             ampl.push_back(option_value); | ||||
|  | ||||
|             option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_error"; | ||||
|             option = ".band" + std::to_string(i + 1) + "_error"; | ||||
|             option_value = config_->property(role_ + option, default_bands[i]); | ||||
|             error_w.push_back(option_value); | ||||
|         } | ||||
| @@ -399,7 +398,7 @@ void FirFilter::init() | ||||
|     // those bands, and the weight given to the error in those bands. | ||||
|     std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density); | ||||
|     taps_.reserve(taps_d.size()); | ||||
|     for (double & it : taps_d) | ||||
|     for (double& it : taps_d) | ||||
|         { | ||||
|             taps_.push_back(float(it)); | ||||
|         } | ||||
|   | ||||
| @@ -31,7 +31,6 @@ | ||||
|  | ||||
| #include "freq_xlating_fir_filter.h" | ||||
| #include "configuration_interface.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <utility> | ||||
| #include <gnuradio/blocks/file_sink.h> | ||||
| #include <gnuradio/filter/pm_remez.h> | ||||
| @@ -84,23 +83,23 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration | ||||
|  | ||||
|             for (unsigned int i = 0; i < number_of_bands; i++) | ||||
|                 { | ||||
|                     option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_begin"; | ||||
|                     option = ".band" + std::to_string(i + 1) + "_begin"; | ||||
|                     option_value = config_->property(role_ + option, default_bands[i]); | ||||
|                     bands.push_back(option_value); | ||||
|  | ||||
|                     option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_end"; | ||||
|                     option = ".band" + std::to_string(i + 1) + "_end"; | ||||
|                     option_value = config_->property(role_ + option, default_bands[i]); | ||||
|                     bands.push_back(option_value); | ||||
|  | ||||
|                     option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_begin"; | ||||
|                     option = ".ampl" + std::to_string(i + 1) + "_begin"; | ||||
|                     option_value = config_->property(role_ + option, default_bands[i]); | ||||
|                     ampl.push_back(option_value); | ||||
|  | ||||
|                     option = ".ampl" + boost::lexical_cast<std::string>(i + 1) + "_end"; | ||||
|                     option = ".ampl" + std::to_string(i + 1) + "_end"; | ||||
|                     option_value = config_->property(role_ + option, default_bands[i]); | ||||
|                     ampl.push_back(option_value); | ||||
|  | ||||
|                     option = ".band" + boost::lexical_cast<std::string>(i + 1) + "_error"; | ||||
|                     option = ".band" + std::to_string(i + 1) + "_error"; | ||||
|                     option_value = config_->property(role_ + option, default_bands[i]); | ||||
|                     error_w.push_back(option_value); | ||||
|                 } | ||||
| @@ -108,7 +107,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration | ||||
|             int grid_density = config_->property(role_ + ".grid_density", default_grid_density); | ||||
|             taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density); | ||||
|             taps_.reserve(taps_d.size()); | ||||
|             for (double & it : taps_d) | ||||
|             for (double& it : taps_d) | ||||
|                 { | ||||
|                     taps_.push_back(static_cast<float>(it)); | ||||
|                 } | ||||
| @@ -324,7 +323,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block() | ||||
|         { | ||||
|             return freq_xlating_fir_filter_ccf_; | ||||
|         } | ||||
|     else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex")) | ||||
|     if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex")) | ||||
|         { | ||||
|             return freq_xlating_fir_filter_fcf_; | ||||
|         } | ||||
| @@ -358,7 +357,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_right_block() | ||||
|         { | ||||
|             return freq_xlating_fir_filter_ccf_; | ||||
|         } | ||||
|     else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex")) | ||||
|     if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex")) | ||||
|         { | ||||
|             return freq_xlating_fir_filter_fcf_; | ||||
|         } | ||||
|   | ||||
| @@ -158,15 +158,12 @@ gr::basic_block_sptr PulseBlankingFilter::get_left_block() | ||||
|                 { | ||||
|                     return freq_xlating_; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return pulse_blanking_cc_; | ||||
|                 } | ||||
|             return pulse_blanking_cc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return nullptr; | ||||
|             LOG(ERROR) << " Unknown input filter input/output item type conversion"; | ||||
|             return nullptr; | ||||
|         } | ||||
| } | ||||
|  | ||||
| @@ -177,9 +174,6 @@ gr::basic_block_sptr PulseBlankingFilter::get_right_block() | ||||
|         { | ||||
|             return pulse_blanking_cc_; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return nullptr; | ||||
|             LOG(ERROR) << " Unknown input filter input/output item type conversion"; | ||||
|         } | ||||
|     LOG(ERROR) << " Unknown input filter input/output item type conversion"; | ||||
|     return nullptr; | ||||
| } | ||||
|   | ||||
| @@ -79,9 +79,7 @@ bool gnss_sdr_create_directory(const std::string& foldername) | ||||
|                 } | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             os_test_file.close(); | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     os_test_file.close(); | ||||
|     return false; | ||||
| } | ||||
|   | ||||
| @@ -90,11 +90,8 @@ int gnss_sdr_valve::work(int noutput_items, | ||||
|                         { | ||||
|                             return -1;  // Done! | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             usleep(1000000); | ||||
|                             return 0;  // do not produce or consume | ||||
|                         } | ||||
|                     usleep(1000000); | ||||
|                     return 0;  // do not produce or consume | ||||
|                 } | ||||
|             unsigned long long n = std::min(d_nitems - d_ncopied_items, static_cast<long long unsigned int>(noutput_items)); | ||||
|             if (n == 0) return 0; | ||||
| @@ -102,9 +99,7 @@ int gnss_sdr_valve::work(int noutput_items, | ||||
|             d_ncopied_items += n; | ||||
|             return n; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             memcpy(output_items[0], input_items[0], noutput_items * input_signature()->sizeof_stream_item(0)); | ||||
|             return noutput_items; | ||||
|         } | ||||
|  | ||||
|     memcpy(output_items[0], input_items[0], noutput_items * input_signature()->sizeof_stream_item(0)); | ||||
|     return noutput_items; | ||||
| } | ||||
|   | ||||
| @@ -44,12 +44,9 @@ std::deque<bool> l5i_xa_shift(std::deque<bool> xa) | ||||
|         { | ||||
|             return std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::deque<bool> out(xa.begin(), xa.end() - 1); | ||||
|             out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); | ||||
|             return out; | ||||
|         } | ||||
|     std::deque<bool> out(xa.begin(), xa.end() - 1); | ||||
|     out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); | ||||
|     return out; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -59,12 +56,9 @@ std::deque<bool> l5q_xa_shift(std::deque<bool> xa) | ||||
|         { | ||||
|             return std::deque<bool>{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::deque<bool> out(xa.begin(), xa.end() - 1); | ||||
|             out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); | ||||
|             return out; | ||||
|         } | ||||
|     std::deque<bool> out(xa.begin(), xa.end() - 1); | ||||
|     out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); | ||||
|     return out; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -149,7 +149,7 @@ gr::basic_block_sptr Pass_Through::get_left_block() | ||||
|                 { | ||||
|                     return conjugate_cc_; | ||||
|                 } | ||||
|             else if (item_type_ == "cshort") | ||||
|             if (item_type_ == "cshort") | ||||
|                 { | ||||
|                     return conjugate_sc_; | ||||
|                 } | ||||
| @@ -176,7 +176,7 @@ gr::basic_block_sptr Pass_Through::get_right_block() | ||||
|                 { | ||||
|                     return conjugate_cc_; | ||||
|                 } | ||||
|             else if (item_type_ == "cshort") | ||||
|             if (item_type_ == "cshort") | ||||
|                 { | ||||
|                     return conjugate_sc_; | ||||
|                 } | ||||
|   | ||||
| @@ -400,18 +400,17 @@ void readtec(const char *file, nav_t *nav, int opt) | ||||
|                     trace(2, "ionex file open error %s\n", efiles[i]); | ||||
|                     continue; | ||||
|                 } | ||||
|             else | ||||
|  | ||||
|             /* read ionex header */ | ||||
|             if (readionexh(fp, lats, lons, hgts, &rb, &nexp, dcb, rms) <= 0.0) | ||||
|                 { | ||||
|                     /* read ionex header */ | ||||
|                     if (readionexh(fp, lats, lons, hgts, &rb, &nexp, dcb, rms) <= 0.0) | ||||
|                         { | ||||
|                             trace(2, "ionex file format error %s\n", efiles[i]); | ||||
|                             fclose(fp); | ||||
|                             continue; | ||||
|                         } | ||||
|                     /* read ionex body */ | ||||
|                     readionexb(fp, lats, lons, hgts, rb, nexp, nav); | ||||
|                     trace(2, "ionex file format error %s\n", efiles[i]); | ||||
|                     fclose(fp); | ||||
|                     continue; | ||||
|                 } | ||||
|  | ||||
|             /* read ionex body */ | ||||
|             readionexb(fp, lats, lons, hgts, rb, nexp, nav); | ||||
|             fclose(fp); | ||||
|         } | ||||
|     for (i = 0; i < MAXEXFILE; i++) free(efiles[i]); | ||||
|   | ||||
| @@ -197,13 +197,11 @@ int search(int n, int m, const double *L, const double *D, | ||||
|                 { | ||||
|                     if (k == n - 1) | ||||
|                         break; | ||||
|                     else | ||||
|                         { | ||||
|                             k++; | ||||
|                             z[k] += step[k]; | ||||
|                             y = zb[k] - z[k]; | ||||
|                             step[k] = -step[k] - SGN_LAMBDA(step[k]); | ||||
|                         } | ||||
|  | ||||
|                     k++; | ||||
|                     z[k] += step[k]; | ||||
|                     y = zb[k] - z[k]; | ||||
|                     step[k] = -step[k] - SGN_LAMBDA(step[k]); | ||||
|                 } | ||||
|         } | ||||
|     for (i = 0; i < m - 1; i++) | ||||
|   | ||||
| @@ -243,7 +243,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel, | ||||
|                     return 0.0; | ||||
|                 } | ||||
|  | ||||
|             else if (obs->code[i] != CODE_NONE and obs->code[j] == CODE_NONE) | ||||
|             if (obs->code[i] != CODE_NONE and obs->code[j] == CODE_NONE) | ||||
|                 { | ||||
|                     P1 += P1_C1; /* C1->P1 */ | ||||
|                     PC = P1 - P1_P2; | ||||
|   | ||||
| @@ -194,8 +194,8 @@ int input_rtcm2(rtcm_t *rtcm, unsigned char data) | ||||
|                 } | ||||
|             if (++rtcm->nbit < 30) | ||||
|                 continue; | ||||
|             else | ||||
|                 rtcm->nbit = 0; | ||||
|  | ||||
|             rtcm->nbit = 0; | ||||
|  | ||||
|             /* check parity */ | ||||
|             if (!decode_word(rtcm->word, rtcm->buff + rtcm->nbyte)) | ||||
|   | ||||
| @@ -1775,11 +1775,9 @@ unsigned int tickget(void) | ||||
|         { | ||||
|             return tp.tv_sec * 1000u + tp.tv_nsec / 1000000u; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             gettimeofday(&tv, nullptr); | ||||
|             return tv.tv_sec * 1000u + tv.tv_usec / 1000u; | ||||
|         } | ||||
|     gettimeofday(&tv, nullptr); | ||||
|     return tv.tv_sec * 1000u + tv.tv_usec / 1000u; | ||||
|  | ||||
| #else | ||||
|     gettimeofday(&tv, NULL); | ||||
|     return tv.tv_sec * 1000u + tv.tv_usec / 1000u; | ||||
| @@ -3175,7 +3173,7 @@ void freenav(nav_t *nav, int opt) | ||||
| /* debug trace functions -----------------------------------------------------*/ | ||||
| //#ifdef TRACE | ||||
| // | ||||
| FILE *fp_trace = nullptr;         /* file pointer of trace */ | ||||
| FILE *fp_trace = nullptr;      /* file pointer of trace */ | ||||
| char file_trace[1024];         /* trace file */ | ||||
| static int level_trace = 0;    /* level of trace */ | ||||
| unsigned int tick_trace = 0;   /* tick time at traceopen (ms) */ | ||||
| @@ -3635,7 +3633,7 @@ double satwavelen(int sat, int frq, const nav_t *nav) | ||||
|         { | ||||
|             if (frq == 0) | ||||
|                 return SPEED_OF_LIGHT / FREQ1_BDS; /* B1 */ | ||||
|             else if (frq == 1) | ||||
|             if (frq == 1) | ||||
|                 return SPEED_OF_LIGHT / FREQ2_BDS; /* B2 */ | ||||
|             else if (frq == 2) | ||||
|                 return SPEED_OF_LIGHT / FREQ3_BDS; /* B3 */ | ||||
| @@ -3644,7 +3642,7 @@ double satwavelen(int sat, int frq, const nav_t *nav) | ||||
|         { | ||||
|             if (frq == 0) | ||||
|                 return SPEED_OF_LIGHT / FREQ1; /* L1/E1 */ | ||||
|             else if (frq == 1) | ||||
|             if (frq == 1) | ||||
|                 return SPEED_OF_LIGHT / FREQ2; /* L2 */ | ||||
|             else if (frq == 2) | ||||
|                 return SPEED_OF_LIGHT / FREQ5; /* L5/E5a */ | ||||
| @@ -3886,7 +3884,7 @@ double interpc(const double coef[], double lat) | ||||
|     int i = (int)(lat / 15.0); | ||||
|     if (i < 1) | ||||
|         return coef[0]; | ||||
|     else if (i > 4) | ||||
|     if (i > 4) | ||||
|         return coef[4]; | ||||
|     return coef[i - 1] * (1.0 - lat / 15.0 + i) + coef[i] * (lat / 15.0 - i); | ||||
| } | ||||
| @@ -3999,7 +3997,7 @@ double interpvar(double ang, const double *var) | ||||
|     int i = (int)a; | ||||
|     if (i < 0) | ||||
|         return var[0]; | ||||
|     else if (i >= 18) | ||||
|     if (i >= 18) | ||||
|         return var[18]; | ||||
|     return var[i] * (1.0 - a + i) + var[i + 1] * (a - i); | ||||
| } | ||||
|   | ||||
| @@ -67,7 +67,7 @@ static int resamb_TCAR(rtk_t *rtk __attribute((unused)), const obsd_t *obs __att | ||||
|  | ||||
| /* global variables ----------------------------------------------------------*/ | ||||
| static int statlevel = 0;          /* rtk status output level (0:off) */ | ||||
| static FILE *fp_stat = nullptr;       /* rtk status file pointer */ | ||||
| static FILE *fp_stat = nullptr;    /* rtk status file pointer */ | ||||
| static char file_stat[1024] = "";  /* rtk status file original path */ | ||||
| static gtime_t time_stat = {0, 0}; /* rtk status file time */ | ||||
|  | ||||
| @@ -1616,8 +1616,7 @@ int ddmat(rtk_t *rtk, double *D) | ||||
|                                             rtk->ssat[i - k].fix[f] = 2; /* fix */ | ||||
|                                             break; | ||||
|                                         } | ||||
|                                     else | ||||
|                                         rtk->ssat[i - k].fix[f] = 1; | ||||
|                                     rtk->ssat[i - k].fix[f] = 1; | ||||
|                                 } | ||||
|                             for (j = k; j < k + MAXSAT; j++) | ||||
|                                 { | ||||
|   | ||||
| @@ -79,7 +79,7 @@ const char *opt2sep(const solopt_t *opt) | ||||
| { | ||||
|     if (!*opt->sep) | ||||
|         return " "; | ||||
|     else if (!strcmp(opt->sep, "\\t")) | ||||
|     if (!strcmp(opt->sep, "\\t")) | ||||
|         return "\t"; | ||||
|     return opt->sep; | ||||
| } | ||||
| @@ -343,7 +343,7 @@ int decode_nmea(char *buff, sol_t *sol) | ||||
|         { | ||||
|             return decode_nmearmc(val + 1, n - 1, sol); | ||||
|         } | ||||
|     else if (!strcmp(val[0], "$GPGGA")) | ||||
|     if (!strcmp(val[0], "$GPGGA")) | ||||
|         { | ||||
|             return decode_nmeagga(val + 1, n - 1, sol); | ||||
|         } | ||||
|   | ||||
| @@ -1227,7 +1227,7 @@ int rspntrip_s(ntrip_t *ntrip, char *msg) | ||||
|             tracet(2, "rspntrip_s: response ok nb=%d\n", ntrip->nb); | ||||
|             return 1; | ||||
|         } | ||||
|     else if ((p = strstr((char *)ntrip->buff, NTRIP_RSP_ERROR))) | ||||
|     if ((p = strstr((char *)ntrip->buff, NTRIP_RSP_ERROR))) | ||||
|         { /* error */ | ||||
|             nb = ntrip->nb < MAXSTATMSG ? ntrip->nb : MAXSTATMSG; | ||||
|             // strncpy(msg, (char *)ntrip->buff, nb); This line triggers a warning. Replaced by; | ||||
| @@ -2362,7 +2362,7 @@ void strsendcmd(stream_t *str, const char *cmd) | ||||
|                 } | ||||
|             if (*q == '\0') | ||||
|                 break; | ||||
|             else | ||||
|                 p = q + 1; | ||||
|  | ||||
|             p = q + 1; | ||||
|         } | ||||
| } | ||||
|   | ||||
| @@ -409,10 +409,7 @@ bool hybrid_observables_cc::interp_trk_obs(Gnss_Synchro &interpolated_obs, const | ||||
|                             //           << " ,diff: " << old_abs_diff << " samples (" << static_cast<double>(old_abs_diff) / static_cast<double>(d_gnss_synchro_history->at(ch, nearest_element).fs) << " s)\n"; | ||||
|                             return true; | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             return false; | ||||
|                         } | ||||
|                     return false; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
| @@ -616,8 +613,5 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused) | ||||
|                 } | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -105,7 +105,7 @@ void signal_generator_c::init() | ||||
|         { | ||||
|             start_phase_rad_.push_back(0); | ||||
|             current_data_bit_int_.push_back(1); | ||||
|             current_data_bits_.push_back(gr_complex(1, 0)); | ||||
|             current_data_bits_.emplace_back(1, 0); | ||||
|             ms_counter_.push_back(0); | ||||
|             data_modulation_.push_back((Galileo_E5a_I_SECONDARY_CODE.at(0) == '0' ? 1 : -1)); | ||||
|             pilot_modulation_.push_back((Galileo_E5a_Q_SECONDARY_CODE[PRN_[sat]].at(0) == '0' ? 1 : -1)); | ||||
|   | ||||
| @@ -370,15 +370,9 @@ gr::basic_block_sptr FileSignalSource::get_right_block() | ||||
|         { | ||||
|             return valve_; | ||||
|         } | ||||
|     else | ||||
|     if (enable_throttle_control_ == true) | ||||
|         { | ||||
|             if (enable_throttle_control_ == true) | ||||
|                 { | ||||
|                     return throttle_; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return file_source_; | ||||
|                 } | ||||
|             return throttle_; | ||||
|         } | ||||
|     return file_source_; | ||||
| } | ||||
|   | ||||
| @@ -309,15 +309,9 @@ gr::basic_block_sptr NsrFileSignalSource::get_right_block() | ||||
|         { | ||||
|             return valve_; | ||||
|         } | ||||
|     else | ||||
|     if (enable_throttle_control_ == true) | ||||
|         { | ||||
|             if (enable_throttle_control_ == true) | ||||
|                 { | ||||
|                     return throttle_; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return unpack_byte_; | ||||
|                 } | ||||
|             return throttle_; | ||||
|         } | ||||
|     return unpack_byte_; | ||||
| } | ||||
|   | ||||
| @@ -308,15 +308,9 @@ gr::basic_block_sptr SpirFileSignalSource::get_right_block() | ||||
|         { | ||||
|             return valve_; | ||||
|         } | ||||
|     else | ||||
|     if (enable_throttle_control_ == true) | ||||
|         { | ||||
|             if (enable_throttle_control_ == true) | ||||
|                 { | ||||
|                     return throttle_; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return unpack_intspir_; | ||||
|                 } | ||||
|             return throttle_; | ||||
|         } | ||||
|     return unpack_intspir_; | ||||
| } | ||||
|   | ||||
| @@ -318,15 +318,9 @@ gr::basic_block_sptr TwoBitCpxFileSignalSource::get_right_block() | ||||
|         { | ||||
|             return valve_; | ||||
|         } | ||||
|     else | ||||
|     if (enable_throttle_control_ == true) | ||||
|         { | ||||
|             if (enable_throttle_control_ == true) | ||||
|                 { | ||||
|                     return throttle_; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return unpack_byte_; | ||||
|                 } | ||||
|             return throttle_; | ||||
|         } | ||||
|     return unpack_byte_; | ||||
| } | ||||
|   | ||||
| @@ -92,14 +92,14 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration, | ||||
|             for (int i = 0; i < RF_channels_; i++) | ||||
|                 { | ||||
|                     // Single RF channel UHD operation (backward compatible config file format) | ||||
|                     samples_.push_back(configuration->property(role + ".samples" + boost::lexical_cast<std::string>(i), 0)); | ||||
|                     dump_.push_back(configuration->property(role + ".dump" + boost::lexical_cast<std::string>(i), false)); | ||||
|                     dump_filename_.push_back(configuration->property(role + ".dump_filename" + boost::lexical_cast<std::string>(i), default_dump_file)); | ||||
|                     samples_.push_back(configuration->property(role + ".samples" + std::to_string(i), 0)); | ||||
|                     dump_.push_back(configuration->property(role + ".dump" + std::to_string(i), false)); | ||||
|                     dump_filename_.push_back(configuration->property(role + ".dump_filename" + std::to_string(i), default_dump_file)); | ||||
|  | ||||
|                     freq_.push_back(configuration->property(role + ".freq" + boost::lexical_cast<std::string>(i), GPS_L1_FREQ_HZ)); | ||||
|                     gain_.push_back(configuration->property(role + ".gain" + boost::lexical_cast<std::string>(i), 50.0)); | ||||
|                     freq_.push_back(configuration->property(role + ".freq" + std::to_string(i), GPS_L1_FREQ_HZ)); | ||||
|                     gain_.push_back(configuration->property(role + ".gain" + std::to_string(i), 50.0)); | ||||
|  | ||||
|                     IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + boost::lexical_cast<std::string>(i), sample_rate_ / 2)); | ||||
|                     IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + std::to_string(i), sample_rate_ / 2)); | ||||
|                 } | ||||
|         } | ||||
|     // 1. Make the uhd driver instance | ||||
| @@ -314,8 +314,5 @@ gr::basic_block_sptr UhdSignalSource::get_right_block(int RF_channel) | ||||
|         { | ||||
|             return valve_.at(RF_channel); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return uhd_source_; | ||||
|         } | ||||
|     return uhd_source_; | ||||
| } | ||||
|   | ||||
| @@ -300,7 +300,7 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                     return -1; | ||||
|                                 } | ||||
|  | ||||
|                             //check if the selected channel in config file match the file encoding | ||||
|                             // check if the selected channel in config file match the file encoding | ||||
|                             if (d_channel_selector_config == 2 and d_channel_selector != 0) | ||||
|                                 { | ||||
|                                     std::cout << "Labsat source channel config inconsistency: channel 2 is selected but the file has only one channel" << std::endl; | ||||
| @@ -359,18 +359,15 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                     std::cout << "Unknown channel B constellation ID " << static_cast<int>(channel_b_constellation) << std::endl; | ||||
|                                 } | ||||
|  | ||||
|                             //end of header | ||||
|                             // end of header | ||||
|                             d_header_parsed = true; | ||||
|                             //seek file to the first signal sample | ||||
|                             // seek file to the first signal sample | ||||
|                             binary_input_file->clear(); | ||||
|                             binary_input_file->seekg(header_bytes, binary_input_file->beg); | ||||
|                             return 0; | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             std::cout << "Labsat file header error: section 2 is not available." << std::endl; | ||||
|                             return -1; | ||||
|                         } | ||||
|                     std::cout << "Labsat file header error: section 2 is not available." << std::endl; | ||||
|                     return -1; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
| @@ -380,7 +377,7 @@ int labsat23_source::general_work(int noutput_items, | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             //ready to start reading samples | ||||
|             // ready to start reading samples | ||||
|             switch (d_bits_per_sample) | ||||
|                 { | ||||
|                 case 2: | ||||
| @@ -391,7 +388,7 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                 // dual channel 2 bits per complex sample | ||||
|                                 break; | ||||
|                             default: | ||||
|                                 //single channel 2 bits per complex sample (1 bit I + 1 bit Q, 8 samples per int16) | ||||
|                                 // single channel 2 bits per complex sample (1 bit I + 1 bit Q, 8 samples per int16) | ||||
|                                 int n_int16_to_read = noutput_items / 8; | ||||
|                                 if (n_int16_to_read > 0) | ||||
|                                     { | ||||
| @@ -408,23 +405,21 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                                     } | ||||
|                                                 return output_pointer; | ||||
|                                             } | ||||
|  | ||||
|                                         // trigger the read of the next file in the sequence | ||||
|                                         std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl; | ||||
|  | ||||
|                                         d_current_file_number++; | ||||
|                                         binary_input_file->close(); | ||||
|                                         binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary); | ||||
|                                         if (binary_input_file->is_open()) | ||||
|                                             { | ||||
|                                                 std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl; | ||||
|                                             } | ||||
|                                         else | ||||
|                                             { | ||||
|                                                 //trigger the read of the next file in the sequence | ||||
|                                                 std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl; | ||||
|  | ||||
|                                                 d_current_file_number++; | ||||
|                                                 binary_input_file->close(); | ||||
|                                                 binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary); | ||||
|                                                 if (binary_input_file->is_open()) | ||||
|                                                     { | ||||
|                                                         std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl; | ||||
|                                                     } | ||||
|                                                 else | ||||
|                                                     { | ||||
|                                                         std::cout << "Last file reached, LabSat source stop" << std::endl; | ||||
|                                                         return -1; | ||||
|                                                     } | ||||
|                                                 std::cout << "Last file reached, LabSat source stop" << std::endl; | ||||
|                                                 return -1; | ||||
|                                             } | ||||
|                                     } | ||||
|                                 else | ||||
| @@ -442,7 +437,7 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                 // dual channel | ||||
|                                 break; | ||||
|                             default: | ||||
|                                 //single channel 4 bits per complex sample (2 bit I + 2 bit Q, 4 samples per int16) | ||||
|                                 // single channel 4 bits per complex sample (2 bit I + 2 bit Q, 4 samples per int16) | ||||
|                                 int n_int16_to_read = noutput_items / 4; | ||||
|                                 if (n_int16_to_read > 0) | ||||
|                                     { | ||||
| @@ -459,23 +454,21 @@ int labsat23_source::general_work(int noutput_items, | ||||
|                                                     } | ||||
|                                                 return output_pointer; | ||||
|                                             } | ||||
|  | ||||
|                                         // trigger the read of the next file in the sequence | ||||
|                                         std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl; | ||||
|  | ||||
|                                         d_current_file_number++; | ||||
|                                         binary_input_file->close(); | ||||
|                                         binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary); | ||||
|                                         if (binary_input_file->is_open()) | ||||
|                                             { | ||||
|                                                 std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl; | ||||
|                                             } | ||||
|                                         else | ||||
|                                             { | ||||
|                                                 //trigger the read of the next file in the sequence | ||||
|                                                 std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl; | ||||
|  | ||||
|                                                 d_current_file_number++; | ||||
|                                                 binary_input_file->close(); | ||||
|                                                 binary_input_file->open(generate_filename().c_str(), std::ios::in | std::ios::binary); | ||||
|                                                 if (binary_input_file->is_open()) | ||||
|                                                     { | ||||
|                                                         std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl; | ||||
|                                                     } | ||||
|                                                 else | ||||
|                                                     { | ||||
|                                                         std::cout << "Last file reached, LabSat source stop" << std::endl; | ||||
|                                                         return -1; | ||||
|                                                     } | ||||
|                                                 std::cout << "Last file reached, LabSat source stop" << std::endl; | ||||
|                                                 return -1; | ||||
|                                             } | ||||
|                                     } | ||||
|                                 else | ||||
|   | ||||
| @@ -66,8 +66,8 @@ bool systemBytesAreBigEndian() | ||||
|     b.byte = static_cast<int8_t>(0x01); | ||||
|     if (*(char *)&b.byte == 1) | ||||
|         return false; | ||||
|     else | ||||
|         return true; | ||||
|  | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -126,28 +126,26 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const | ||||
|             // no defined gains to clip to | ||||
|             return gain; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             double last_stop = gains.front(); | ||||
|             BOOST_FOREACH (double g, gains) | ||||
|                 { | ||||
|                     g /= 10.0; | ||||
|  | ||||
|                     if (gain < g) | ||||
|     double last_stop = gains.front(); | ||||
|     BOOST_FOREACH (double g, gains) | ||||
|         { | ||||
|             g /= 10.0; | ||||
|  | ||||
|             if (gain < g) | ||||
|                 { | ||||
|                     if (std::abs(gain - g) < std::abs(gain - last_stop)) | ||||
|                         { | ||||
|                             if (std::abs(gain - g) < std::abs(gain - last_stop)) | ||||
|                                 { | ||||
|                                     return g; | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     return last_stop; | ||||
|                                 } | ||||
|                             return g; | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             return last_stop; | ||||
|                         } | ||||
|                     last_stop = g; | ||||
|                 } | ||||
|             return last_stop; | ||||
|             last_stop = g; | ||||
|         } | ||||
|     return last_stop; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -439,7 +439,7 @@ void galileo_telemetry_decoder_cc::set_channel(int32_t channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
| @@ -780,8 +780,5 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__(( | ||||
|             *out[0] = current_symbol; | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -244,7 +244,7 @@ void glonass_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -244,7 +244,7 @@ void glonass_l2_ca_telemetry_decoder_cc::set_channel(int32_t channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -136,9 +136,11 @@ bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(uint32_t gpsword) | ||||
|     parity = t ^ _rotl(t, 6) ^ _rotl(t, 12) ^ _rotl(t, 18) ^ _rotl(t, 24); | ||||
|     parity = parity & 0x3F; | ||||
|     if (parity == (gpsword & 0x3F)) | ||||
|         return (true); | ||||
|     else | ||||
|         return (false); | ||||
|         { | ||||
|             return (true); | ||||
|         } | ||||
|  | ||||
|     return (false); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -165,7 +167,7 @@ void gps_l1_ca_telemetry_decoder_cc::set_channel(int32_t channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
| @@ -474,8 +476,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__ | ||||
|  | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -109,7 +109,7 @@ void gps_l2c_telemetry_decoder_cc::set_channel(int channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry_L2CM_"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -121,7 +121,7 @@ void gps_l5_telemetry_decoder_cc::set_channel(int32_t channel) | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename = "telemetry_L5_"; | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
| @@ -282,8 +282,5 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u | ||||
|             out[0] = current_synchro_data; | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -302,7 +302,7 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st | ||||
|                                     for (int & candidate_bit_it : candidate) | ||||
|                                         candidate_bit_it = candidate_bit_it == 0 ? 1 : 0; | ||||
|                                 } | ||||
|                             msg_candidates.push_back(std::pair<int32_t, std::vector<int32_t>>(relative_preamble_start, candidate)); | ||||
|                             msg_candidates.emplace_back(relative_preamble_start, candidate); | ||||
|                             ss.str(""); | ||||
|                             ss << "preamble " << preample_it - preambles.begin() << (inv_preamble_detected ? " inverted" : " normal") << " detected! candidate="; | ||||
|                             for (auto bit_it = candidate.begin(); bit_it < candidate.end(); ++bit_it) | ||||
| @@ -344,7 +344,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec | ||||
|             //  the final remainder must be zero for a valid message, because the CRC is done over the received CRC value | ||||
|             if (crc == 0) | ||||
|                 { | ||||
|                     valid_msgs.push_back(msg_candiate_char_t(candidate_it->first, candidate_bytes)); | ||||
|                     valid_msgs.emplace_back(candidate_it->first, candidate_bytes); | ||||
|                     ss << "Valid message found!"; | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -559,12 +559,9 @@ int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_stat | ||||
|         { | ||||
|             return state[current_state]; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             //std::cout<<"alarm "<<"num_states="<<num_states<<" current_state="<<current_state<<std::endl; | ||||
|             //return state[current_state]; | ||||
|             return 0; | ||||
|         } | ||||
|     //std::cout<<"alarm "<<"num_states="<<num_states<<" current_state="<<current_state<<std::endl; | ||||
|     //return state[current_state]; | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -575,10 +572,7 @@ int Viterbi_Decoder::Prev::get_bit_of_current_state(int current_state) | ||||
|         { | ||||
|             return bit[current_state]; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -588,10 +582,7 @@ float Viterbi_Decoder::Prev::get_metric_of_current_state(int current_state) | ||||
|         { | ||||
|             return metric[current_state]; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -220,7 +220,7 @@ gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -238,7 +238,7 @@ gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -218,7 +218,7 @@ gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -236,7 +236,7 @@ gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_right_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -214,7 +214,7 @@ gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -231,7 +231,7 @@ gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_right_block() | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_ == "cshort") | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -653,17 +653,14 @@ bool dll_pll_veml_tracking::acquire_secondary() | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_time_s) | ||||
| { | ||||
|     // ####### CN0 ESTIMATION AND LOCK DETECTORS ###### | ||||
|  | ||||
|     if (d_cn0_estimation_counter < trk_parameters.cn0_samples) | ||||
|         { | ||||
|             // fill buffer with prompt correlator output values | ||||
| @@ -671,35 +668,29 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_ | ||||
|             d_cn0_estimation_counter++; | ||||
|             return true; | ||||
|         } | ||||
|     d_cn0_estimation_counter = 0; | ||||
|     // Code lock indicator | ||||
|     d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s); | ||||
|     // Carrier lock indicator | ||||
|     d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples); | ||||
|     // Loss of lock detection | ||||
|     if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min) | ||||
|         { | ||||
|             d_carrier_lock_fail_counter++; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             d_cn0_estimation_counter = 0; | ||||
|             // Code lock indicator | ||||
|             d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s); | ||||
|             // Carrier lock indicator | ||||
|             d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, trk_parameters.cn0_samples); | ||||
|             // Loss of lock detection | ||||
|             if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < trk_parameters.cn0_min) | ||||
|                 { | ||||
|                     d_carrier_lock_fail_counter++; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; | ||||
|                 } | ||||
|             if (d_carrier_lock_fail_counter > trk_parameters.max_lock_fail) | ||||
|                 { | ||||
|                     std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; | ||||
|                     LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; | ||||
|                     this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||
|                     d_carrier_lock_fail_counter = 0; | ||||
|                     return false; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return true; | ||||
|                 } | ||||
|             if (d_carrier_lock_fail_counter > 0) d_carrier_lock_fail_counter--; | ||||
|         } | ||||
|     if (d_carrier_lock_fail_counter > trk_parameters.max_lock_fail) | ||||
|         { | ||||
|             std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl; | ||||
|             LOG(INFO) << "Loss of lock in channel " << d_channel << "!"; | ||||
|             this->message_port_pub(pmt::mp("events"), pmt::from_long(3));  // 3 -> loss of lock | ||||
|             d_carrier_lock_fail_counter = 0; | ||||
|             return false; | ||||
|         } | ||||
|     return true; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -64,7 +64,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking | ||||
|     int64_t fs_in, | ||||
|     uint32_t vector_length, | ||||
|     bool dump, | ||||
|     const std::string& dump_filename, | ||||
|     const std::string &dump_filename, | ||||
|     float pll_bw_hz, | ||||
|     float dll_bw_hz, | ||||
|     float early_late_space_chips, | ||||
| @@ -90,7 +90,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc( | ||||
|     int64_t fs_in, | ||||
|     uint32_t vector_length, | ||||
|     bool dump, | ||||
|     std::string dump_filename, | ||||
|     const std::string& dump_filename, | ||||
|     float pll_bw_hz __attribute__((unused)), | ||||
|     float dll_bw_hz __attribute__((unused)), | ||||
|     float early_late_space_chips, | ||||
| @@ -544,8 +544,6 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri | ||||
|         { | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -97,7 +97,7 @@ private: | ||||
|     Galileo_E1_Tcp_Connector_Tracking_cc( | ||||
|         int64_t fs_in, uint32_t vector_length, | ||||
|         bool dump, | ||||
|         std::string dump_filename, | ||||
|         const std::string& dump_filename, | ||||
|         float pll_bw_hz, | ||||
|         float dll_bw_hz, | ||||
|         float early_late_space_chips, | ||||
|   | ||||
| @@ -43,7 +43,6 @@ | ||||
| #include "lock_detectors.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/bind.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <matio.h> | ||||
| @@ -567,7 +566,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -44,7 +44,6 @@ | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/bind.hpp> | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <matio.h> | ||||
| #include <pmt/pmt.h> | ||||
| @@ -558,7 +557,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -43,7 +43,6 @@ | ||||
| #include "lock_detectors.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <glog/logging.h> | ||||
| #include <matio.h> | ||||
| @@ -519,7 +518,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -41,7 +41,6 @@ | ||||
| #include "GLONASS_L1_L2_CA.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/bind.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <matio.h> | ||||
| @@ -564,7 +563,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -42,7 +42,6 @@ | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/bind.hpp> | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <matio.h> | ||||
| #include <pmt/pmt.h> | ||||
| @@ -557,7 +556,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -43,7 +43,6 @@ | ||||
| #include "GLONASS_L1_L2_CA.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <glog/logging.h> | ||||
| #include <matio.h> | ||||
| @@ -519,7 +518,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -35,7 +35,6 @@ | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "GPS_L1_CA.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/bind.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <matio.h> | ||||
| @@ -546,7 +545,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
| @@ -905,8 +904,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib | ||||
|         { | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/bind.hpp> | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <glog/logging.h> | ||||
| @@ -548,7 +547,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
| @@ -906,8 +905,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib | ||||
|         { | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -44,7 +44,6 @@ | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "GPS_L1_CA.h" | ||||
| #include "control_message_factory.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gnuradio/io_signature.h> | ||||
| #include <glog/logging.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr.h> | ||||
| @@ -648,7 +647,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             d_dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             d_dump_filename.append(std::to_string(d_channel)); | ||||
|                             d_dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary); | ||||
|   | ||||
| @@ -62,7 +62,7 @@ gps_l1_ca_tcp_connector_make_tracking_cc( | ||||
|     int64_t fs_in, | ||||
|     uint32_t vector_length, | ||||
|     bool dump, | ||||
|     const std::string& dump_filename, | ||||
|     const std::string &dump_filename, | ||||
|     float early_late_space_chips, | ||||
|     size_t port_ch0) | ||||
| { | ||||
| @@ -85,7 +85,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc( | ||||
|     int64_t fs_in, | ||||
|     uint32_t vector_length, | ||||
|     bool dump, | ||||
|     std::string dump_filename, | ||||
|     const std::string& dump_filename, | ||||
|     float early_late_space_chips, | ||||
|     size_t port_ch0) : gr::block("Gps_L1_Ca_Tcp_Connector_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)), | ||||
|                            gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) | ||||
| @@ -583,8 +583,6 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib | ||||
|         { | ||||
|             return 1; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -93,7 +93,7 @@ private: | ||||
|     Gps_L1_Ca_Tcp_Connector_Tracking_cc( | ||||
|         int64_t fs_in, uint32_t vector_length, | ||||
|         bool dump, | ||||
|         std::string dump_filename, | ||||
|         const std::string& dump_filename, | ||||
|         float early_late_space_chips, | ||||
|         size_t port_ch0); | ||||
|  | ||||
|   | ||||
| @@ -40,9 +40,7 @@ tcp_communication::tcp_communication() : tcp_socket_(io_service_) | ||||
| } | ||||
|  | ||||
|  | ||||
| tcp_communication::~tcp_communication() | ||||
| { | ||||
| } | ||||
| tcp_communication::~tcp_communication() = default; | ||||
|  | ||||
|  | ||||
| int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_) | ||||
|   | ||||
| @@ -81,10 +81,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1) | ||||
|         { | ||||
|             return atan(prompt_s1.imag() / prompt_s1.real()); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0.0; | ||||
|         } | ||||
|     return 0.0; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -105,10 +102,7 @@ double dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1) | ||||
|         { | ||||
|             return 0.0; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0.5 * (P_early - P_late) / (P_early + P_late); | ||||
|         } | ||||
|     return 0.5 * (P_early - P_late) / (P_early + P_late); | ||||
| } | ||||
|  | ||||
| /* | ||||
| @@ -129,8 +123,5 @@ double dll_nc_vemlp_normalized(gr_complex very_early_s1, gr_complex early_s1, gr | ||||
|         { | ||||
|             return 0.0; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return (P_early - P_late) / (P_early + P_late); | ||||
|         } | ||||
|     return (P_early - P_late) / (P_early + P_late); | ||||
| } | ||||
|   | ||||
| @@ -46,7 +46,7 @@ bool StringConverter::convert(const std::string& value, bool default_value) | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else if (value == "false") | ||||
|     if (value == "false") | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
| @@ -68,10 +68,8 @@ int64_t StringConverter::convert(const std::string& value, int64_t default_value | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -86,10 +84,8 @@ uint64_t StringConverter::convert(const std::string& value, uint64_t default_val | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -104,10 +100,8 @@ int32_t StringConverter::convert(const std::string& value, int32_t default_value | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -122,10 +116,8 @@ uint32_t StringConverter::convert(const std::string& value, uint32_t default_val | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -140,10 +132,8 @@ uint16_t StringConverter::convert(const std::string& value, uint16_t default_val | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -158,10 +148,8 @@ int16_t StringConverter::convert(const std::string& value, int16_t default_value | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -176,10 +164,8 @@ float StringConverter::convert(const std::string& value, float default_value) | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -194,8 +180,6 @@ double StringConverter::convert(const std::string& value, double default_value) | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|     return result; | ||||
| } | ||||
|   | ||||
| @@ -94,11 +94,8 @@ public: | ||||
|                 lock.unlock(); | ||||
|                 return true; | ||||
|             } | ||||
|         else | ||||
|             { | ||||
|                 lock.unlock(); | ||||
|                 return false; | ||||
|             } | ||||
|         lock.unlock(); | ||||
|         return false; | ||||
|     } | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -289,10 +289,8 @@ int ControlThread::run() | ||||
|         { | ||||
|             return 42;  // signal the gnss-sdr-harness.sh to restart the receiver program | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0;  // normal shutdown | ||||
|         } | ||||
|  | ||||
|     return 0;  // normal shutdown | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -69,10 +69,7 @@ std::string FileConfiguration::property(std::string property_name, std::string d | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return ini_reader_->Get("GNSS-SDR", property_name, default_value); | ||||
|         } | ||||
|     return ini_reader_->Get("GNSS-SDR", property_name, default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -82,11 +79,8 @@ bool FileConfiguration::property(std::string property_name, bool default_value) | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -96,11 +90,8 @@ int64_t FileConfiguration::property(std::string property_name, int64_t default_v | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -110,11 +101,8 @@ uint64_t FileConfiguration::property(std::string property_name, uint64_t default | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -124,11 +112,8 @@ int FileConfiguration::property(std::string property_name, int default_value) | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -138,11 +123,8 @@ unsigned int FileConfiguration::property(std::string property_name, unsigned int | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -152,11 +134,8 @@ uint16_t FileConfiguration::property(std::string property_name, uint16_t default | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -166,11 +145,8 @@ int16_t FileConfiguration::property(std::string property_name, int16_t default_v | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -180,11 +156,8 @@ float FileConfiguration::property(std::string property_name, float default_value | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -194,11 +167,8 @@ double FileConfiguration::property(std::string property_name, double default_val | ||||
|         { | ||||
|             return overrided_->property(property_name, default_value); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::string empty; | ||||
|             return converter_->convert(property(property_name, empty), default_value); | ||||
|         } | ||||
|     std::string empty; | ||||
|     return converter_->convert(property(property_name, empty), default_value); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -55,10 +55,7 @@ std::string InMemoryConfiguration::property(std::string property_name, std::stri | ||||
|         { | ||||
|             return iter->second; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     return default_value; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -224,10 +224,8 @@ bool Galileo_Fnav_Message::_CRC_test(std::bitset<GALILEO_FNAV_DATA_FRAME_BITS> b | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -498,10 +496,7 @@ bool Galileo_Fnav_Message::have_new_ephemeris()  // Check if we have a new ephem | ||||
|                     std::cout << "Batch number: " << IOD_ephemeris << std::endl; | ||||
|                     return true; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|   | ||||
| @@ -253,10 +253,7 @@ bool Galileo_Navigation_Message::CRC_test(std::bitset<GALILEO_DATA_FRAME_BITS> b | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -442,10 +439,9 @@ bool Galileo_Navigation_Message::have_new_ephemeris()  // Check if we have a new | ||||
|                     std::cout << "Batch number: " << IOD_ephemeris << std::endl; | ||||
|                     return true; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|  | ||||
|  | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         return false; | ||||
| @@ -459,8 +455,8 @@ bool Galileo_Navigation_Message::have_new_iono_and_GST()  // Check if we have a | ||||
|             flag_iono_and_GST = false;  // clear the flag | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         return false; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -471,8 +467,8 @@ bool Galileo_Navigation_Message::have_new_utc_model()  // Check if we have a new | ||||
|             flag_utc_model = false;  // clear the flag | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         return false; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -488,8 +484,8 @@ bool Galileo_Navigation_Message::have_new_almanac()  // Check if we have a new a | ||||
|             flag_all_almanac = true; | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         return false; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -83,7 +83,7 @@ void Glonass_Gnav_Navigation_Message::reset() | ||||
|  | ||||
|     // Data update information | ||||
|     d_previous_tb = 0.0; | ||||
|     for (double & i : d_previous_Na) | ||||
|     for (double& i : d_previous_Na) | ||||
|         i = 0.0; | ||||
|  | ||||
|     std::map<int, std::string> satelliteBlock;  // Map that stores to which block the PRN belongs http://www.navcen.uscg.gov/?Do=constellationStatus | ||||
| @@ -200,7 +200,7 @@ bool Glonass_Gnav_Navigation_Message::CRC_test(std::bitset<GLONASS_GNAV_STRING_B | ||||
|             return true; | ||||
|         } | ||||
|     // (a-ii) Only one of the checksums (C1,...,C7) is equal to zero but C_Sigma = 1 | ||||
|     else if (C_Sigma == 1 && C1 + C2 + C3 + C4 + C5 + C6 + C7 == 6) | ||||
|     if (C_Sigma == 1 && C1 + C2 + C3 + C4 + C5 + C6 + C7 == 6) | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
| @@ -733,8 +733,8 @@ bool Glonass_Gnav_Navigation_Message::have_new_utc_model()  // Check if we have | ||||
|             flag_utc_model_str_5 = false;  // clear the flag | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         return false; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -337,10 +337,7 @@ bool Gps_CNAV_Navigation_Message::have_new_ephemeris()  // Check if we have a ne | ||||
|                     b_flag_ephemeris_2 = false;  // clear the flag | ||||
|                     return true; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|             return false; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
| @@ -362,10 +359,7 @@ bool Gps_CNAV_Navigation_Message::have_new_iono()  // Check if we have a new ion | ||||
|             b_flag_iono_valid = false;  // clear the flag | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -382,10 +376,7 @@ bool Gps_CNAV_Navigation_Message::have_new_utc_model()  // Check if we have a ne | ||||
|             b_flag_utc_valid = false;  // clear the flag | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -178,10 +178,8 @@ bool Rtcm::check_CRC(const std::string& message) const | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1011,11 +1011,9 @@ bool Gnuplot::set_GNUPlotPath(const std::string &path) | ||||
|             Gnuplot::m_sGNUPlotPath = path; | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             Gnuplot::m_sGNUPlotPath.clear(); | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|     Gnuplot::m_sGNUPlotPath.clear(); | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -1068,8 +1066,8 @@ void stringtok(Container &container, | ||||
|                     container.push_back(in.substr(i)); | ||||
|                     return; | ||||
|                 } | ||||
|             else | ||||
|                 container.push_back(in.substr(i, j - i)); | ||||
|  | ||||
|             container.push_back(in.substr(i, j - i)); | ||||
|  | ||||
|             // set up for next loop | ||||
|             i = j + 1; | ||||
| @@ -1876,7 +1874,7 @@ Gnuplot &Gnuplot::cmd(const std::string &cmdstr) | ||||
|         { | ||||
|             return *this; | ||||
|         } | ||||
|     else if (cmdstr.find("splot") != std::string::npos) | ||||
|     if (cmdstr.find("splot") != std::string::npos) | ||||
|         { | ||||
|             two_dim = false; | ||||
|             nplots++; | ||||
| @@ -2052,10 +2050,7 @@ bool Gnuplot::file_exists(const std::string &filename, int mode) | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -2147,7 +2142,7 @@ std::string Gnuplot::create_tmpfile(std::ofstream &tmp) | ||||
|     // | ||||
|     // Save the temporary filename | ||||
|     // | ||||
|     tmpfile_list.push_back(name); | ||||
|     tmpfile_list.emplace_back(name); | ||||
|     Gnuplot::tmpfile_num++; | ||||
|  | ||||
|     return name; | ||||
|   | ||||
| @@ -81,10 +81,7 @@ bool rtklib_solver_dump_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -99,10 +96,7 @@ int64_t rtklib_solver_dump_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -186,10 +186,7 @@ bool spirent_motion_csv_dump_reader::restart() | ||||
|                 } | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -206,10 +203,7 @@ int64_t spirent_motion_csv_dump_reader::num_epochs() | ||||
|                 } | ||||
|             return nepoch - header_lines; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -145,7 +145,7 @@ TEST(MatioTest, WriteAndReadGrComplex) | ||||
|     std::vector<gr_complex> x_v_read; | ||||
|     for (unsigned int i = 0; i < size; i++) | ||||
|         { | ||||
|             x_v_read.push_back(gr_complex(x_read_real[i], x_read_imag[i])); | ||||
|             x_v_read.emplace_back(x_read_real[i], x_read_imag[i]); | ||||
|         } | ||||
|  | ||||
|     Mat_Close(matfp_read); | ||||
|   | ||||
| @@ -63,10 +63,7 @@ bool observables_dump_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -82,10 +79,7 @@ int64_t observables_dump_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -56,10 +56,7 @@ bool tlm_dump_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -75,10 +72,7 @@ int64_t tlm_dump_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -75,10 +75,7 @@ bool tracking_dump_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -96,10 +93,9 @@ int64_t tracking_dump_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|  | ||||
|  | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -58,10 +58,7 @@ bool tracking_true_obs_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -77,10 +74,7 @@ int64_t tracking_true_obs_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -63,10 +63,7 @@ bool true_observables_reader::restart() | ||||
|             d_dump_file.seekg(0, std::ios::beg); | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -82,10 +79,7 @@ int64_t true_observables_reader::num_epochs() | ||||
|             int64_t nepoch = size / epoch_size_bytes; | ||||
|             return nepoch; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return 0; | ||||
|         } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -78,12 +78,9 @@ bool FrontEndCal::read_assistance_from_XML() | ||||
|                 } | ||||
|             return true; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             std::cout << "ERROR: SUPL client error reading XML" << std::endl; | ||||
|             LOG(WARNING) << "ERROR: SUPL client error reading XML"; | ||||
|             return false; | ||||
|         } | ||||
|     std::cout << "ERROR: SUPL client error reading XML" << std::endl; | ||||
|     LOG(WARNING) << "ERROR: SUPL client error reading XML"; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -256,10 +253,7 @@ bool FrontEndCal::get_ephemeris() | ||||
|                         { | ||||
|                             return true; | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             return false; | ||||
|                         } | ||||
|                     return false; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
| @@ -274,10 +268,7 @@ bool FrontEndCal::get_ephemeris() | ||||
|                 { | ||||
|                     return true; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|             return false; | ||||
|         } | ||||
| } | ||||
|  | ||||
| @@ -377,10 +368,7 @@ double FrontEndCal::estimate_doppler_from_eph(unsigned int PRN, double TOW, doub | ||||
|             mean_Doppler_Hz = arma::mean(Doppler_Hz); | ||||
|             return mean_Doppler_Hz; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             throw(1); | ||||
|         } | ||||
|     throw(1); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez