mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-29 22:42:59 +00:00 
			
		
		
		
	Apply code cleaning before release
This commit is contained in:
		| @@ -121,7 +121,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms); | ||||
|     int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms); | ||||
|     int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms); | ||||
|     //std::map<int, int> rtcm_msg_rate_ms; | ||||
|  | ||||
|     pvt_output_parameters.rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms; | ||||
|     pvt_output_parameters.rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms; | ||||
|     pvt_output_parameters.rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms; | ||||
| @@ -409,7 +409,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|  | ||||
|     if (positioning_mode == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             std::cout << "WARNING: Bad specification of positioning mode." << std::endl; | ||||
|             std::cout << "positioning_mode possible values: Single / Static / Kinematic / PPP_Static / PPP_Kinematic" << std::endl; | ||||
|             std::cout << "positioning_mode specified value: " << positioning_mode_str << std::endl; | ||||
| @@ -439,14 +439,14 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int number_of_frequencies = configuration->property(role + ".num_bands", num_bands); /* (1:L1, 2:L1+L2, 3:L1+L2+L5) */ | ||||
|     if ((number_of_frequencies < 1) || (number_of_frequencies > 3)) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             number_of_frequencies = num_bands; | ||||
|         } | ||||
|  | ||||
|     double elevation_mask = configuration->property(role + ".elevation_mask", 15.0); | ||||
|     if ((elevation_mask < 0.0) || (elevation_mask > 90.0)) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             LOG(WARNING) << "Erroneous Elevation Mask. Setting to default value of 15.0 degrees"; | ||||
|             elevation_mask = 15.0; | ||||
|         } | ||||
| @@ -454,7 +454,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int dynamics_model = configuration->property(role + ".dynamics_model", 0); /*  dynamics model (0:none, 1:velocity, 2:accel) */ | ||||
|     if ((dynamics_model < 0) || (dynamics_model > 2)) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             LOG(WARNING) << "Erroneous Dynamics Model configuration. Setting to default value of (0:none)"; | ||||
|             dynamics_model = 0; | ||||
|         } | ||||
| @@ -488,7 +488,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|         } | ||||
|     if (iono_model == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             std::cout << "WARNING: Bad specification of ionospheric model." << std::endl; | ||||
|             std::cout << "iono_model possible values: OFF / Broadcast / SBAS / Iono-Free-LC / Estimate_STEC / IONEX" << std::endl; | ||||
|             std::cout << "iono_model specified value: " << iono_model_str << std::endl; | ||||
| @@ -521,7 +521,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|         } | ||||
|     if (trop_model == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             std::cout << "WARNING: Bad specification of tropospheric model." << std::endl; | ||||
|             std::cout << "trop_model possible values: OFF / Saastamoinen / SBAS / Estimate_ZTD / Estimate_ZTD_Grad" << std::endl; | ||||
|             std::cout << "trop_model specified value: " << trop_model_str << std::endl; | ||||
| @@ -568,7 +568,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int navigation_system = configuration->property(role + ".navigation_system", nsys); /* (SYS_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     if ((navigation_system < 1) || (navigation_system > 255))                           /* GPS: 1   SBAS: 2   GPS+SBAS: 3 Galileo: 8  Galileo+GPS: 9 GPS+SBAS+Galileo: 11 All: 255 */ | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             LOG(WARNING) << "Erroneous Navigation System. Setting to default value of (0:none)"; | ||||
|             navigation_system = nsys; | ||||
|         } | ||||
| @@ -599,7 +599,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|         } | ||||
|     if (integer_ambiguity_resolution_gps == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             std::cout << "WARNING: Bad specification of GPS ambiguity resolution method." << std::endl; | ||||
|             std::cout << "AR_GPS possible values: OFF / Continuous / Instantaneous / Fix-and-Hold / PPP-AR" << std::endl; | ||||
|             std::cout << "AR_GPS specified value: " << integer_ambiguity_resolution_gps_str << std::endl; | ||||
| @@ -610,7 +610,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int integer_ambiguity_resolution_glo = configuration->property(role + ".AR_GLO", 1); /* Integer Ambiguity Resolution mode for GLONASS (0:off,1:on,2:auto cal,3:ext cal) */ | ||||
|     if ((integer_ambiguity_resolution_glo < 0) || (integer_ambiguity_resolution_glo > 3)) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for GLONASS . Setting to default value of (1:on)"; | ||||
|             integer_ambiguity_resolution_glo = 1; | ||||
|         } | ||||
| @@ -618,7 +618,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|     int integer_ambiguity_resolution_bds = configuration->property(role + ".AR_DBS", 1); /* Integer Ambiguity Resolution mode for BEIDOU (0:off,1:on) */ | ||||
|     if ((integer_ambiguity_resolution_bds < 0) || (integer_ambiguity_resolution_bds > 1)) | ||||
|         { | ||||
|             //warn user and set the default | ||||
|             // warn user and set the default | ||||
|             LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for BEIDOU . Setting to default value of (1:on)"; | ||||
|             integer_ambiguity_resolution_bds = 1; | ||||
|         } | ||||
| @@ -644,7 +644,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, | ||||
|                                                                                          If the baseline length is very short like 1 m, the iteration may be effective to handle | ||||
|                                                                                          the nonlinearity of measurement equation. */ | ||||
|  | ||||
|     /// Statistics | ||||
|     // Statistics | ||||
|     double bias_0 = configuration->property(role + ".bias_0", 30.0); | ||||
|  | ||||
|     double iono_0 = configuration->property(role + ".iono_0", 0.03); | ||||
|   | ||||
| @@ -41,7 +41,7 @@ | ||||
| #include <sstream> | ||||
| #include <string> | ||||
| #include <sys/stat.h>   // for S_IXUSR | S_IRWXG | S_IRWXO | ||||
| #include <sys/types.h>  //for mode_t | ||||
| #include <sys/types.h>  // for mode_t | ||||
|  | ||||
| #if HAS_STD_FILESYSTEM | ||||
| #include <system_error> | ||||
|   | ||||
| @@ -175,9 +175,9 @@ int Nmea_Printer::init_serial(const std::string& serial_device) | ||||
|      * Opens the serial device and sets the default baud rate for a NMEA transmission (9600,8,N,1) | ||||
|      */ | ||||
|     int fd = 0; | ||||
|     struct termios options | ||||
|     { | ||||
|     }; | ||||
|     // clang-format off | ||||
|     struct termios options{}; | ||||
|     // clang-format on | ||||
|     int64_t BAUD; | ||||
|     int64_t DATABITS; | ||||
|     int64_t STOPBITS; | ||||
|   | ||||
| @@ -627,7 +627,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::string line; | ||||
|     stringVersion = "3.02"; | ||||
|     version = 3; | ||||
| @@ -772,7 +772,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::string line; | ||||
|     stringVersion = "3.02"; | ||||
|     version = 3; | ||||
| @@ -896,8 +896,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& gali | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|     //Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|         }  // Avoid compiler warning | ||||
|     // Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|     if (galileo_utc_model.A_0G_10) | ||||
|         { | ||||
|         } | ||||
| @@ -1379,7 +1379,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co | ||||
|         { | ||||
|             line += std::string("N: GNSS NAV DATA"); | ||||
|             line += std::string(4, ' '); | ||||
|             //! \todo Add here other systems... | ||||
|             //todo Add here other systems... | ||||
|             line += std::string("G: GPS"); | ||||
|             line += std::string(14, ' '); | ||||
|             // ... | ||||
| @@ -1744,7 +1744,7 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono& | ||||
|         { | ||||
|             line += std::string("N: GNSS NAV DATA"); | ||||
|             line += std::string(4, ' '); | ||||
|             //! \todo Add here other systems... | ||||
|             //todo: Add here other systems... | ||||
|             line += std::string("F: BDS"); | ||||
|             line += std::string(14, ' '); | ||||
|             // ... | ||||
| @@ -2495,7 +2495,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_ | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::vector<std::string> data; | ||||
|     std::string line_aux; | ||||
|  | ||||
| @@ -3191,7 +3191,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::vector<std::string> data; | ||||
|     std::string line_aux; | ||||
|  | ||||
| @@ -3306,7 +3306,7 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gp | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::vector<std::string> data; | ||||
|     std::string line_aux; | ||||
|  | ||||
| @@ -3414,8 +3414,8 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal | ||||
| { | ||||
|     if (glonass_gnav_almanac.i_satellite_freq_channel) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|     //Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|         }  // Avoid compiler warning | ||||
|     // Avoid compiler warning, there is not time system correction between Galileo and GLONASS | ||||
|     if (galileo_utc_model.A_0G_10) | ||||
|         { | ||||
|         } | ||||
| @@ -4270,7 +4270,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gal | ||||
|             // -------- BROADCAST ORBIT - 6 | ||||
|             line.clear(); | ||||
|             line += std::string(5, ' '); | ||||
|             //line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.SISA_3, 18, 2); | ||||
|             // line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.SISA_3, 18, 2); | ||||
|             line += Rinex_Printer::doub2for(zero, 18, 2);  // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID | ||||
|             line += std::string(1, ' '); | ||||
|             std::string E1B_HS; | ||||
| @@ -4745,7 +4745,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem | ||||
| { | ||||
|     if (eph.d_m) | ||||
|         { | ||||
|         }  //Avoid compiler warning | ||||
|         }  // Avoid compiler warning | ||||
|     std::string line; | ||||
|     std::map<int32_t, Glonass_Gnav_Ephemeris>::const_iterator glonass_gnav_ephemeris_iter; | ||||
|  | ||||
| @@ -4855,7 +4855,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -5181,7 +5181,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -5536,7 +5536,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -5845,7 +5845,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -6138,12 +6138,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -6168,7 +6168,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -6395,12 +6395,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -6425,7 +6425,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -6646,12 +6646,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("GROUND_CRAFT", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -6676,7 +6676,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -6927,12 +6927,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -6957,7 +6957,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -7273,12 +7273,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -7303,7 +7303,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -7591,12 +7591,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -7621,7 +7621,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -7858,12 +7858,12 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | ||||
|     out << line << std::endl; | ||||
|  | ||||
|     // -------- Line MARKER TYPE | ||||
|     //line.clear(); | ||||
|     //line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     //line += std::string(40, ' '); | ||||
|     //line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     //Rinex_Printer::lengthCheck(line); | ||||
|     //out << line << std::endl; | ||||
|     // line.clear(); | ||||
|     // line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property | ||||
|     // line += std::string(40, ' '); | ||||
|     // line += Rinex_Printer::leftJustify("MARKER TYPE", 20); | ||||
|     // Rinex_Printer::lengthCheck(line); | ||||
|     // out << line << std::endl; | ||||
|  | ||||
|     // -------- Line OBSERVER / AGENCY | ||||
|     line.clear(); | ||||
| @@ -7888,7 +7888,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -8170,7 +8170,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Beidou_Dnav_Epheme | ||||
|     line.clear(); | ||||
|     line += Rinex_Printer::leftJustify("GNSS-SDR", 20);           // add flag and property | ||||
|     line += Rinex_Printer::leftJustify("Software Receiver", 20);  // add flag and property | ||||
|     //line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     // line += Rinex_Printer::leftJustify(google::VersionString(), 20); // add flag and property | ||||
|     if (gnss_sdr_version.length() > 20) | ||||
|         { | ||||
|             gnss_sdr_version.resize(9, ' '); | ||||
| @@ -8599,8 +8599,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|  | ||||
|     boost::posix_time::ptime p_glonass_time = Rinex_Printer::compute_UTC_time(eph, obs_time); | ||||
|     std::string timestring = boost::posix_time::to_iso_string(p_glonass_time); | ||||
|     //double utc_t = nav_msg.utc_time(nav_msg.sv_clock_correction(obs_time)); | ||||
|     //double gps_t = eph.sv_clock_correction(obs_time); | ||||
|     // double utc_t = nav_msg.utc_time(nav_msg.sv_clock_correction(obs_time)); | ||||
|     // double gps_t = eph.sv_clock_correction(obs_time); | ||||
|  | ||||
|     std::string month(timestring, 4, 2); | ||||
|     std::string day(timestring, 6, 2); | ||||
| @@ -8647,7 +8647,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|             line += std::string(2, ' '); | ||||
|             // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|             line += std::string(1, '0'); | ||||
|             //Number of satellites observed in current epoch | ||||
|             // Number of satellites observed in current epoch | ||||
|             int32_t numSatellitesObserved = 0; | ||||
|             std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|             for (observables_iter = observables.cbegin(); | ||||
| @@ -8669,7 +8669,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|                     line += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|                 } | ||||
|             // Receiver clock offset (optional) | ||||
|             //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             line += std::string(80 - line.size(), ' '); | ||||
|             Rinex_Printer::lengthCheck(line); | ||||
|             out << line << std::endl; | ||||
| @@ -8685,13 +8685,13 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|                     line += std::string(2, ' '); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
|                             lineObs += std::string(1, ' '); | ||||
|                         } | ||||
|                     //else | ||||
|                     // else | ||||
|                     //    { | ||||
|                     //        lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1); | ||||
|                     //    } | ||||
| @@ -8705,7 +8705,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|                         { | ||||
|                             lineObs += std::string(1, ' '); | ||||
|                         } | ||||
|                     //else | ||||
|                     // else | ||||
|                     //    { | ||||
|                     //        lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1); | ||||
|                     //    } | ||||
| @@ -8716,12 +8716,12 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|                         { | ||||
|                             lineObs += std::string(1, ' '); | ||||
|                         } | ||||
|                     //else | ||||
|                     // else | ||||
|                     //    { | ||||
|                     //        lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1); | ||||
|                     //    } | ||||
|                     lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int32_t>(ssi), 1); | ||||
|                     //GLONASS L1 SIGNAL STRENGTH | ||||
|                     // GLONASS L1 SIGNAL STRENGTH | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14); | ||||
|                     if (lineObs.size() < 80) | ||||
|                         { | ||||
| @@ -8757,7 +8757,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|             // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|             line += std::string(1, '0'); | ||||
|  | ||||
|             //Number of satellites observed in current epoch | ||||
|             // Number of satellites observed in current epoch | ||||
|             int32_t numSatellitesObserved = 0; | ||||
|             std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|             for (observables_iter = observables.cbegin(); | ||||
| @@ -8769,7 +8769,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|             line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|             // Receiver clock offset (optional) | ||||
|             //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|             line += std::string(80 - line.size(), ' '); | ||||
|             Rinex_Printer::lengthCheck(line); | ||||
| @@ -8787,10 +8787,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|                             lineObs += std::string(1, '0'); | ||||
|                         } | ||||
|                     lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|                     //lineObs += std::string(2, ' '); | ||||
|                     // lineObs += std::string(2, ' '); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -8830,7 +8830,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri | ||||
|  | ||||
|                     lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int32_t>(ssi), 1); | ||||
|  | ||||
|                     //GLONASS L1 SIGNAL STRENGTH | ||||
|                     // GLONASS L1 SIGNAL STRENGTH | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14); | ||||
|  | ||||
|                     if (lineObs.size() < 80) | ||||
| @@ -8931,8 +8931,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|             line += std::string(1, '0'); | ||||
|         } | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     //Get maps with observations | ||||
|     // Number of satellites observed in current epoch | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG1C; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR1C; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR2C; | ||||
| @@ -9065,7 +9065,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|             // Pseudorange Measurements | ||||
|             lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|             //Loss of lock indicator (LLI) | ||||
|             // Loss of lock indicator (LLI) | ||||
|             int32_t lli = 0;  // Include in the observation!! | ||||
|             if (lli == 0) | ||||
|                 { | ||||
| @@ -9136,7 +9136,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|                     //double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -9232,8 +9232,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     //Get maps with observations | ||||
|     // Number of satellites observed in current epoch | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG2S; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR1C; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR2C; | ||||
| @@ -9325,7 +9325,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g | ||||
|             // Pseudorange Measurements | ||||
|             lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|             //Loss of lock indicator (LLI) | ||||
|             // Loss of lock indicator (LLI) | ||||
|             int32_t lli = 0;  // Include in the observation!! | ||||
|             if (lli == 0) | ||||
|                 { | ||||
| @@ -9394,7 +9394,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g | ||||
|                     //double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -9489,9 +9489,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with observations | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE1B; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR1C; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesR2C; | ||||
| @@ -9551,7 +9551,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -9581,7 +9581,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga | ||||
|             lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|             lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|             //Loss of lock indicator (LLI) | ||||
|             // Loss of lock indicator (LLI) | ||||
|             int32_t lli = 0;  // Include in the observation!! | ||||
|             if (lli == 0) | ||||
|                 { | ||||
| @@ -9647,7 +9647,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -9755,7 +9755,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|             line += std::string(2, ' '); | ||||
|             // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|             line += std::string(1, '0'); | ||||
|             //Number of satellites observed in current epoch | ||||
|             // Number of satellites observed in current epoch | ||||
|             int32_t numSatellitesObserved = 0; | ||||
|             std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|             for (observables_iter = observables.cbegin(); | ||||
| @@ -9777,7 +9777,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|                     line += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|                 } | ||||
|             // Receiver clock offset (optional) | ||||
|             //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             line += std::string(80 - line.size(), ' '); | ||||
|             Rinex_Printer::lengthCheck(line); | ||||
|             out << line << std::endl; | ||||
| @@ -9793,7 +9793,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|                     line += std::string(2, ' '); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -9866,7 +9866,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|             // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|             line += std::string(1, '0'); | ||||
|  | ||||
|             //Number of satellites observed in current epoch | ||||
|             // Number of satellites observed in current epoch | ||||
|             int32_t numSatellitesObserved = 0; | ||||
|             std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|             for (observables_iter = observables.cbegin(); | ||||
| @@ -9878,7 +9878,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|             line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|             // Receiver clock offset (optional) | ||||
|             //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|             // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|             line += std::string(80 - line.size(), ' '); | ||||
|             Rinex_Printer::lengthCheck(line); | ||||
| @@ -9896,10 +9896,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|                             lineObs += std::string(1, '0'); | ||||
|                         } | ||||
|                     lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|                     //lineObs += std::string(2, ' '); | ||||
|                     // lineObs += std::string(2, ' '); | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -9993,7 +9993,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|     int32_t numSatellitesObserved = 0; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|     for (observables_iter = observables.cbegin(); | ||||
| @@ -10005,7 +10005,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -10023,11 +10023,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|                     lineObs += std::string(1, '0'); | ||||
|                 } | ||||
|             lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|             //lineObs += std::string(2, ' '); | ||||
|             // lineObs += std::string(2, ' '); | ||||
|             //GPS L2 PSEUDORANGE | ||||
|             lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|             //Loss of lock indicator (LLI) | ||||
|             // Loss of lock indicator (LLI) | ||||
|             int32_t lli = 0;  // Include in the observation!! | ||||
|             if (lli == 0) | ||||
|                 { | ||||
| @@ -10123,9 +10123,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with GPS L1 and L2 observations | ||||
|     // Get maps with GPS L1 and L2 observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL2; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL5; | ||||
| @@ -10229,7 +10229,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|     int32_t numSatellitesObserved = available_prns.size(); | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
|     out << line << std::endl; | ||||
| @@ -10252,7 +10252,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -10346,9 +10346,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with Galileo observations | ||||
|     // Get maps with Galileo observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE1B; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE5A; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE5B; | ||||
| @@ -10475,7 +10475,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | ||||
|     int32_t numSatellitesObserved = available_prns.size(); | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
|     out << line << std::endl; | ||||
| @@ -10498,7 +10498,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -10593,9 +10593,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with observations | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG1C; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE1B; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE5A; | ||||
| @@ -10674,7 +10674,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -10704,7 +10704,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|             lineObs += std::to_string(static_cast<int32_t>(observables_iter->second.PRN)); | ||||
|             lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|             //Loss of lock indicator (LLI) | ||||
|             // Loss of lock indicator (LLI) | ||||
|             int32_t lli = 0;  // Include in the observation!! | ||||
|             if (lli == 0) | ||||
|                 { | ||||
| @@ -10770,7 +10770,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -10865,9 +10865,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with observations | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG2S; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesGL5; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesE1B; | ||||
| @@ -10979,7 +10979,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -11005,7 +11005,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -11067,7 +11067,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -11162,9 +11162,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with observations | ||||
|     // Get maps with observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG2S; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesGL5; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesG1C; | ||||
| @@ -11294,7 +11294,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|  | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|  | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
| @@ -11320,7 +11320,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -11382,7 +11382,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -11471,9 +11471,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris | ||||
|     // Epoch flag 0: OK     1: power failure between previous and current epoch   <1: Special event | ||||
|     line += std::string(1, '0'); | ||||
|  | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|  | ||||
|     //Get maps with BeiDou observations | ||||
|     // Get maps with BeiDou observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesB1I; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesB3I; | ||||
|  | ||||
| @@ -11544,7 +11544,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris | ||||
|     int32_t numSatellitesObserved = available_prns.size(); | ||||
|     line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3); | ||||
|     // Receiver clock offset (optional) | ||||
|     //line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     // line += rightJustify(asString(clockOffset, 12), 15); | ||||
|     line += std::string(80 - line.size(), ' '); | ||||
|     Rinex_Printer::lengthCheck(line); | ||||
|     out << line << std::endl; | ||||
| @@ -11567,7 +11567,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris | ||||
|                 { | ||||
|                     lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14); | ||||
|  | ||||
|                     //Loss of lock indicator (LLI) | ||||
|                     // Loss of lock indicator (LLI) | ||||
|                     int32_t lli = 0;  // Include in the observation!! | ||||
|                     if (lli == 0) | ||||
|                         { | ||||
| @@ -11771,7 +11771,7 @@ int32_t Rinex_Printer::signalStrength(const double snr) | ||||
| boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Message& nav_msg) | ||||
| { | ||||
|     // if we are processing a file -> wait to leap second to resolve the ambiguity else take the week from the local system time | ||||
|     //: idea resolve the ambiguity with the leap second  http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm | ||||
|     // idea: resolve the ambiguity with the leap second  http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm | ||||
|     const double utc_t = nav_msg.utc_time(nav_msg.d_TOW); | ||||
|     boost::posix_time::time_duration t = boost::posix_time::milliseconds(static_cast<int64_t>((utc_t + 604800 * static_cast<double>(nav_msg.i_GPS_week)) * 1000)); | ||||
|     if (nav_msg.i_GPS_week < 512) | ||||
|   | ||||
| @@ -498,7 +498,7 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, co | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get a map with GPS L1 only observations | ||||
|     // Get a map with GPS L1 only observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|  | ||||
| @@ -547,7 +547,7 @@ std::string Rtcm::print_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, co | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get a map with GPS L1 only observations | ||||
|     // Get a map with GPS L1 only observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|  | ||||
| @@ -618,7 +618,7 @@ std::string Rtcm::print_MT1003(const Gps_Ephemeris& ephL1, const Gps_CNAV_Epheme | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get maps with GPS L1 and L2 observations | ||||
|     // Get maps with GPS L1 and L2 observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL2; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
| @@ -727,7 +727,7 @@ std::string Rtcm::print_MT1004(const Gps_Ephemeris& ephL1, const Gps_CNAV_Epheme | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get maps with GPS L1 and L2 observations | ||||
|     // Get maps with GPS L1 and L2 observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL2; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
| @@ -1177,7 +1177,7 @@ std::string Rtcm::print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, d | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get a map with GLONASS L1 only observations | ||||
|     // Get a map with GLONASS L1 only observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|  | ||||
| @@ -1226,7 +1226,7 @@ std::string Rtcm::print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, d | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get a map with GPS L1 only observations | ||||
|     // Get a map with GPS L1 only observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|  | ||||
| @@ -1301,7 +1301,7 @@ std::string Rtcm::print_MT1011(const Glonass_Gnav_Ephemeris& ephL1, const Glonas | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get maps with GPS L1 and L2 observations | ||||
|     // Get maps with GPS L1 and L2 observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL2; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
| @@ -1412,7 +1412,7 @@ std::string Rtcm::print_MT1012(const Glonass_Gnav_Ephemeris& ephL1, const Glonas | ||||
|     bool sync_flag = false; | ||||
|     bool divergence_free = false; | ||||
|  | ||||
|     //Get maps with GLONASS L1 and L2 observations | ||||
|     // Get maps with GLONASS L1 and L2 observations | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL1; | ||||
|     std::map<int32_t, Gnss_Synchro> observablesL2; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
| @@ -1887,13 +1887,13 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl | ||||
|     index += 1; | ||||
|     if (glonass_gnav_alm_health) | ||||
|         { | ||||
|         }  //Avoid comiler warning | ||||
|         }  // Avoid compiler warning | ||||
|  | ||||
|     glonass_gnav_alm_health_ind = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 1))); | ||||
|     index += 1; | ||||
|     if (glonass_gnav_alm_health_ind) | ||||
|         { | ||||
|         }  //Avoid comiler warning | ||||
|         }  // Avoid compiler warning | ||||
|  | ||||
|     glonass_gnav_eph.d_P_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 2))); | ||||
|     glonass_gnav_eph.d_P_1 = (glonass_gnav_eph.d_P_1 + 1) * 15; | ||||
| @@ -2309,7 +2309,7 @@ std::string Rtcm::print_MSM_1(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -2504,7 +2504,7 @@ std::string Rtcm::print_MSM_2(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -2617,7 +2617,7 @@ std::string Rtcm::print_MSM_3(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -2733,7 +2733,7 @@ std::string Rtcm::print_MSM_4(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -2892,7 +2892,7 @@ std::string Rtcm::print_MSM_5(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -3060,7 +3060,7 @@ std::string Rtcm::print_MSM_6(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (gal_eph.i_satellite_PRN != 0) && (glo_gnav_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -3179,7 +3179,7 @@ std::string Rtcm::print_MSM_7(const Gps_Ephemeris& gps_eph, | ||||
|         } | ||||
|     if (((gps_eph.i_satellite_PRN != 0) || (gps_cnav_eph.i_satellite_PRN != 0)) && (glo_gnav_eph.i_satellite_PRN != 0) && (gal_eph.i_satellite_PRN != 0)) | ||||
|         { | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  //print two messages? | ||||
|             LOG(WARNING) << "MSM messages for observables from different systems are not defined";  // print two messages? | ||||
|         } | ||||
|     if (msg_number == 0) | ||||
|         { | ||||
| @@ -3709,7 +3709,7 @@ int32_t Rtcm::set_DF002(uint32_t message_number) | ||||
|  | ||||
| int32_t Rtcm::set_DF003(uint32_t ref_station_ID) | ||||
| { | ||||
|     //uint32_t station_ID = ref_station_ID; | ||||
|     // uint32_t station_ID = ref_station_ID; | ||||
|     if (ref_station_ID > 4095) | ||||
|         { | ||||
|             LOG(WARNING) << "RTCM reference station ID must be between 0 and 4095, but it has been set to " << ref_station_ID; | ||||
| @@ -3745,7 +3745,7 @@ int32_t Rtcm::set_DF005(bool sync_flag) | ||||
|  | ||||
| int32_t Rtcm::set_DF006(const std::map<int32_t, Gnss_Synchro>& observables) | ||||
| { | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|     uint16_t nsats = 0; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|     for (observables_iter = observables.cbegin(); | ||||
| @@ -4007,7 +4007,7 @@ int32_t Rtcm::set_DF034(double obs_time) | ||||
|  | ||||
| int32_t Rtcm::set_DF035(const std::map<int32_t, Gnss_Synchro>& observables) | ||||
| { | ||||
|     //Number of satellites observed in current epoch | ||||
|     // Number of satellites observed in current epoch | ||||
|     uint16_t nsats = 0; | ||||
|     std::map<int32_t, Gnss_Synchro>::const_iterator observables_iter; | ||||
|     for (observables_iter = observables.begin(); | ||||
| @@ -4258,7 +4258,7 @@ int32_t Rtcm::set_DF052(const Gps_Ephemeris& gps_eph, double obs_time) | ||||
|     std::string hours = now_ptime.substr(9, 2); | ||||
|     std::string minutes = now_ptime.substr(11, 2); | ||||
|     std::string seconds = now_ptime.substr(13, 8); | ||||
|     //boost::gregorian::date d(boost::gregorian::from_undelimited_string(today_ptime)); | ||||
|     // boost::gregorian::date d(boost::gregorian::from_undelimited_string(today_ptime)); | ||||
|     uint32_t seconds_of_day = boost::lexical_cast<uint32_t>(hours) * 60 * 60 + boost::lexical_cast<uint32_t>(minutes) * 60 + boost::lexical_cast<uint32_t>(seconds); | ||||
|     DF052 = std::bitset<17>(seconds_of_day); | ||||
|     return 0; | ||||
| @@ -4866,7 +4866,7 @@ int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph) | ||||
| int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     auto SISA = static_cast<uint16_t>(gal_eph.SISA_3); | ||||
|     //SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010 | ||||
|     // SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010 | ||||
|     DF291 = std::bitset<8>(SISA); | ||||
|     return 0; | ||||
| } | ||||
| @@ -5047,7 +5047,7 @@ int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph) | ||||
| int32_t Rtcm::set_DF313(const Galileo_Ephemeris& gal_eph) | ||||
| { | ||||
|     auto bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b_5)); | ||||
|     //bdg_E5b_E1 = 0; //reserved | ||||
|     // bdg_E5b_E1 = 0; // reserved | ||||
|     DF313 = std::bitset<10>(bdg_E5b_E1); | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -384,7 +384,9 @@ int Rtcm_Printer::init_serial(const std::string& serial_device) | ||||
|      * Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1) | ||||
|      */ | ||||
|     int32_t fd = 0; | ||||
|     // clang-format off | ||||
|     struct termios options{}; | ||||
|     // clang-format on | ||||
|     int64_t BAUD; | ||||
|     int64_t DATABITS; | ||||
|     int64_t STOPBITS; | ||||
| @@ -404,7 +406,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device) | ||||
|     tcgetattr(fd, &options);  // read serial port options | ||||
|  | ||||
|     BAUD = B9600; | ||||
|     //BAUD  =  B38400; | ||||
|     // BAUD  =  B38400; | ||||
|     DATABITS = CS8; | ||||
|     STOPBITS = 0; | ||||
|     PARITYON = 0; | ||||
| @@ -412,7 +414,7 @@ int Rtcm_Printer::init_serial(const std::string& serial_device) | ||||
|  | ||||
|     options.c_cflag = BAUD | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD; | ||||
|     // enable receiver, set 8 bit data, ignore control lines | ||||
|     //options.c_cflag |= (CLOCAL | CREAD | CS8); | ||||
|     // options.c_cflag |= (CLOCAL | CREAD | CS8); | ||||
|     options.c_iflag = IGNPAR; | ||||
|  | ||||
|     // set the new port options | ||||
| @@ -432,7 +434,7 @@ void Rtcm_Printer::close_serial() | ||||
|  | ||||
| bool Rtcm_Printer::Print_Message(const std::string& message) | ||||
| { | ||||
|     //write to file | ||||
|     // write to file | ||||
|     if (d_rtcm_file_dump) | ||||
|         { | ||||
|             try | ||||
| @@ -446,7 +448,7 @@ bool Rtcm_Printer::Print_Message(const std::string& message) | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|     //write to serial device | ||||
|     // write to serial device | ||||
|     if (rtcm_dev_descriptor != -1) | ||||
|         { | ||||
|             if (write(rtcm_dev_descriptor, message.c_str(), message.length()) == -1) | ||||
|   | ||||
| @@ -719,7 +719,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                                         obs_data[i + valid_obs] = insert_obs_to_rtklib(obs_data[i + valid_obs], | ||||
|                                                             gnss_observables_iter->second, | ||||
|                                                             glonass_gnav_ephemeris_iter->second.d_WN, | ||||
|                                                             1);  //Band 1 (L2) | ||||
|                                                             1);  // Band 1 (L2) | ||||
|                                                         found_L1_obs = true; | ||||
|                                                         break; | ||||
|                                                     } | ||||
| @@ -1001,9 +1001,9 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time; | ||||
|  | ||||
|                     boost::posix_time::ptime p_time; | ||||
|                     // gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); //Corrected RX Time (Non integer multiply of 1 ms of granularity) | ||||
|                     // gtime_t rtklib_utc_time = gpst2utc(pvt_sol.time); // Corrected RX Time (Non integer multiply of 1 ms of granularity) | ||||
|                     // Uncorrected RX Time (integer multiply of 1 ms and the same observables time reported in RTCM and RINEX) | ||||
|                     gtime_t rtklib_time = timeadd(pvt_sol.time, rx_position_and_time(3));  //uncorrected rx time | ||||
|                     gtime_t rtklib_time = timeadd(pvt_sol.time, rx_position_and_time(3));  // uncorrected rx time | ||||
|                     gtime_t rtklib_utc_time = gpst2utc(rtklib_time); | ||||
|                     p_time = boost::posix_time::from_time_t(rtklib_utc_time.time); | ||||
|                     p_time += boost::posix_time::microseconds(static_cast<long>(round(rtklib_utc_time.sec * 1e6)));  // NOLINT(google-runtime-int) | ||||
|   | ||||
| @@ -236,6 +236,8 @@ void Channel::assist_acquisition_doppler(double Carrier_Doppler_hz) | ||||
| { | ||||
|     acq_->set_doppler_center(static_cast<int>(Carrier_Doppler_hz)); | ||||
| } | ||||
|  | ||||
|  | ||||
| void Channel::start_acquisition() | ||||
| { | ||||
|     std::lock_guard<std::mutex> lk(mx); | ||||
|   | ||||
| @@ -152,10 +152,10 @@ void beidou_b1i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u | ||||
|     const int32_t _codeFreqBasis = 2046000;  // Hz | ||||
|     const int32_t _codeLength = 2046; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength)); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);             // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(_codeFreqBasis);  // C/A chip period in sec | ||||
|  | ||||
| @@ -163,28 +163,27 @@ void beidou_b1i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read C/A code values ------------------------- | ||||
|             // --- Make index array to read C/A code values -------------------- | ||||
|             // The length of the index array depends on the sampling frequency - | ||||
|             // number of samples per millisecond (because one C/A code period is one | ||||
|             // millisecond). | ||||
|  | ||||
|             // _codeValueIndex = ceil((_ts * ((float)i + 1)) / _tc) - 1; | ||||
|             aux = (_ts * (i + 1)) / _tc; | ||||
|             _codeValueIndex = auxCeil(aux) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the C/A code ----------------------- | ||||
|             // --- Make the digitized version of the C/A code ------------------ | ||||
|             // The "upsampled" code is made by selecting values form the CA code | ||||
|             // chip array (caCode) for the time instances of each sample. | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = _code[_codeLength - 1]; | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     _dest[i] = _code[_codeValueIndex];  //repeat the chip -> upsample | ||||
|                     _dest[i] = _code[_codeValueIndex];  // repeat the chip -> upsample | ||||
|                 } | ||||
|         } | ||||
| } | ||||
|   | ||||
| @@ -214,19 +214,19 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u | ||||
|     const int32_t _codeFreqBasis = 10230000;  // Hz | ||||
|     const int32_t _codeLength = 10230; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength)); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);                    // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(_codeFreqBasis);         // C/A chip period in sec | ||||
|     beidou_b3i_code_gen_complex(_code, _prn, _chip_shift);  // generate C/A code 1 sample per chip | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read C/A code values ------------------------- | ||||
|             // --- Make index array to read C/A code values -------------------- | ||||
|             // The length of the index array depends on the sampling frequency - | ||||
|             // number of samples per millisecond (because one C/A code period is one | ||||
|             // millisecond). | ||||
| @@ -234,12 +234,12 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, u | ||||
|             aux = (_ts * (i + 1)) / _tc; | ||||
|             _codeValueIndex = auxCeil(aux) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the C/A code ----------------------- | ||||
|             // --- Make the digitized version of the C/A code ------------------ | ||||
|             // The "upsampled" code is made by selecting values form the CA code | ||||
|             // chip array (caCode) for the time instances of each sample. | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = _code[_codeLength - 1]; | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -112,10 +112,10 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|     const int32_t _codeFreqBasis = 511000;  // Hz | ||||
|     const int32_t _codeLength = 511; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength)); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);             // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(_codeFreqBasis);  // C/A chip period in sec | ||||
|  | ||||
| @@ -123,9 +123,9 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read C/A code values ------------------------- | ||||
|             // --- Make index array to read C/A code values -------------------- | ||||
|             // The length of the index array depends on the sampling frequency - | ||||
|             // number of samples per millisecond (because one C/A code period is one | ||||
|             // millisecond). | ||||
| @@ -133,12 +133,12 @@ void glonass_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|             aux = (_ts * (i + 1)) / _tc; | ||||
|             _codeValueIndex = auxCeil(aux) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the C/A code ----------------------- | ||||
|             // --- Make the digitized version of the C/A code ------------------ | ||||
|             // The "upsampled" code is made by selecting values form the CA code | ||||
|             // chip array (caCode) for the time instances of each sample. | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = _code[_codeLength - 1]; | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -112,10 +112,10 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|     const int32_t _codeFreqBasis = 511000;  // Hz | ||||
|     const int32_t _codeLength = 511; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength)); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);             // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(_codeFreqBasis);  // C/A chip period in sec | ||||
|  | ||||
| @@ -123,9 +123,9 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read C/A code values ------------------------- | ||||
|             // --- Make index array to read C/A code values -------------------- | ||||
|             // The length of the index array depends on the sampling frequency - | ||||
|             // number of samples per millisecond (because one C/A code period is one | ||||
|             // millisecond). | ||||
| @@ -133,12 +133,12 @@ void glonass_l2_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest | ||||
|             aux = (_ts * (i + 1)) / _tc; | ||||
|             _codeValueIndex = auxCeil(aux) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the C/A code ----------------------- | ||||
|             // --- Make the digitized version of the C/A code ------------------ | ||||
|             // The "upsampled" code is made by selecting values form the CA code | ||||
|             // chip array (caCode) for the time instances of each sample. | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = _code[_codeLength - 1]; | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -41,17 +41,17 @@ template <class T> | ||||
| class Gnss_circular_deque | ||||
| { | ||||
| public: | ||||
|     Gnss_circular_deque();                                                        // Default constructor | ||||
|     Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann);  // nchann = number of channels; max_size = channel capacity | ||||
|     unsigned int size(const unsigned int ch);                                     // Returns the number of available elements in a channel | ||||
|     T& at(const unsigned int ch, const unsigned int pos);                         // Returns a reference to an element | ||||
|     T& front(const unsigned int ch);                                              // Returns a reference to the first element in the deque | ||||
|     T& back(const unsigned int ch);                                               // Returns a reference to the last element in the deque | ||||
|     void push_back(const unsigned int ch, const T& new_data);                     // Inserts an element at the end of the deque | ||||
|     void pop_front(const unsigned int ch);                                        // Removes the first element of the deque | ||||
|     void clear(const unsigned int ch);                                            // Removes all the elements of the deque (Sets size to 0). Capacity is not modified | ||||
|     void reset(const unsigned int max_size, const unsigned int nchann);           // Removes all the elements in all the channels. Re-sets the number of channels and their capacity | ||||
|     void reset();                                                                 // Removes all the channels (Sets nchann to 0) | ||||
|     Gnss_circular_deque();                                                        //!< Default constructor | ||||
|     Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann);  //!< nchann = number of channels; max_size = channel capacity | ||||
|     unsigned int size(const unsigned int ch);                                     //!< Returns the number of available elements in a channel | ||||
|     T& at(const unsigned int ch, const unsigned int pos);                         //!< Returns a reference to an element | ||||
|     T& front(const unsigned int ch);                                              //!< Returns a reference to the first element in the deque | ||||
|     T& back(const unsigned int ch);                                               //!< Returns a reference to the last element in the deque | ||||
|     void push_back(const unsigned int ch, const T& new_data);                     //!< Inserts an element at the end of the deque | ||||
|     void pop_front(const unsigned int ch);                                        //!< Removes the first element of the deque | ||||
|     void clear(const unsigned int ch);                                            //!< Removes all the elements of the deque (Sets size to 0). Capacity is not modified | ||||
|     void reset(const unsigned int max_size, const unsigned int nchann);           //!< Removes all the elements in all the channels. Re-sets the number of channels and their capacity | ||||
|     void reset();                                                                 //!< Removes all the channels (Sets nchann to 0) | ||||
|  | ||||
| private: | ||||
|     std::vector<boost::circular_buffer<T>> d_data; | ||||
| @@ -64,18 +64,21 @@ Gnss_circular_deque<T>::Gnss_circular_deque() | ||||
|     reset(); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| Gnss_circular_deque<T>::Gnss_circular_deque(const unsigned int max_size, const unsigned int nchann) | ||||
| { | ||||
|     reset(max_size, nchann); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| unsigned int Gnss_circular_deque<T>::size(const unsigned int ch) | ||||
| { | ||||
|     return d_data.at(ch).size(); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| T& Gnss_circular_deque<T>::back(const unsigned int ch) | ||||
| { | ||||
| @@ -96,12 +99,14 @@ T& Gnss_circular_deque<T>::at(const unsigned int ch, const unsigned int pos) | ||||
|     return d_data.at(ch).at(pos); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| void Gnss_circular_deque<T>::clear(const unsigned int ch) | ||||
| { | ||||
|     d_data.at(ch).clear(); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| void Gnss_circular_deque<T>::reset(const unsigned int max_size, const unsigned int nchann) | ||||
| { | ||||
| @@ -115,18 +120,21 @@ void Gnss_circular_deque<T>::reset(const unsigned int max_size, const unsigned i | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| void Gnss_circular_deque<T>::reset() | ||||
| { | ||||
|     d_data.clear(); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| void Gnss_circular_deque<T>::pop_front(const unsigned int ch) | ||||
| { | ||||
|     d_data.at(ch).pop_front(); | ||||
| } | ||||
|  | ||||
|  | ||||
| template <class T> | ||||
| void Gnss_circular_deque<T>::push_back(const unsigned int ch, const T& new_data) | ||||
| { | ||||
|   | ||||
| @@ -165,20 +165,20 @@ void resampler(const gsl::span<float> _from, gsl::span<float> _dest, float _fs_i | ||||
| { | ||||
|     uint32_t _codeValueIndex; | ||||
|     float aux; | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     const float _t_in = 1 / _fs_in;    // Incoming sampling  period in sec | ||||
|     const float _t_out = 1 / _fs_out;  // Out sampling period in sec | ||||
|     for (uint32_t i = 0; i < _dest.size() - 1; i++) | ||||
|         { | ||||
|             //=== Digitizing =================================================== | ||||
|             //--- compute index array to read sampled values ------------------- | ||||
|             // === Digitizing ================================================== | ||||
|             // --- compute index array to read sampled values ------------------ | ||||
|             aux = (_t_out * (i + 1)) / _t_in; | ||||
|             _codeValueIndex = auxCeil2(aux) - 1; | ||||
|  | ||||
|             // if repeat the chip -> upsample by nearest neighborhood interpolation | ||||
|             _dest[i] = _from[_codeValueIndex]; | ||||
|         } | ||||
|     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|     _dest[_dest.size() - 1] = _from[_from.size() - 1]; | ||||
| } | ||||
|  | ||||
| @@ -188,19 +188,19 @@ void resampler(gsl::span<const std::complex<float>> _from, gsl::span<std::comple | ||||
| { | ||||
|     uint32_t _codeValueIndex; | ||||
|     float aux; | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     const float _t_in = 1 / _fs_in;    // Incoming sampling  period in sec | ||||
|     const float _t_out = 1 / _fs_out;  // Out sampling period in sec | ||||
|     for (uint32_t i = 0; i < _dest.size() - 1; i++) | ||||
|         { | ||||
|             //=== Digitizing =================================================== | ||||
|             //--- compute index array to read sampled values ------------------- | ||||
|             // === Digitizing ================================================== | ||||
|             // --- compute index array to read sampled values ------------------ | ||||
|             aux = (_t_out * (i + 1)) / _t_in; | ||||
|             _codeValueIndex = auxCeil2(aux) - 1; | ||||
|  | ||||
|             // if repeat the chip -> upsample by nearest neighborhood interpolation | ||||
|             _dest[i] = _from[_codeValueIndex]; | ||||
|         } | ||||
|     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|     _dest[_dest.size() - 1] = _from[_from.size() - 1]; | ||||
| } | ||||
|   | ||||
| @@ -101,24 +101,24 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui | ||||
|     float _tc; | ||||
|     const int32_t _codeLength = GPS_L2_M_CODE_LENGTH_CHIPS; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(_codeLength))); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);                    // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_HZ);  // L2C chip period in sec | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read L2C code values ------------------------- | ||||
|             // --- Make index array to read L2C code values -------------------- | ||||
|             _codeValueIndex = std::ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the L2C code ----------------------- | ||||
|             // --- Make the digitized version of the L2C code ------------------ | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = std::complex<float>(1.0 - 2.0 * _code[_codeLength - 1], 0); | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -218,24 +218,24 @@ void gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint | ||||
|     float _tc; | ||||
|     const int32_t _codeLength = GPS_L5I_CODE_LENGTH_CHIPS; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(_codeLength))); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);                   // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_HZ);  // L5I primary chip period in sec | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read L5 code values ------------------------- | ||||
|             // --- Make index array to read L5 code values --------------------- | ||||
|             _codeValueIndex = static_cast<int32_t>(std::ceil(_ts * static_cast<float>(i + 1) / _tc)) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the L5I code ----------------------- | ||||
|             // --- Make the digitized version of the L5I code ------------------ | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = std::complex<float>(1.0 - 2.0 * _code[_codeLength - 1], 0.0); | ||||
|                 } | ||||
|             else | ||||
| @@ -292,24 +292,24 @@ void gps_l5q_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint | ||||
|     float _tc; | ||||
|     const int32_t _codeLength = GPS_L5Q_CODE_LENGTH_CHIPS; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_HZ) / static_cast<double>(_codeLength))); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);                   // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_HZ);  // L5Q chip period in sec | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing ======================================================= | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read L5 code values ------------------------- | ||||
|             // --- Make index array to read L5 code values --------------------- | ||||
|             _codeValueIndex = static_cast<int32_t>(std::ceil(_ts * static_cast<float>(i + 1) / _tc)) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the L5Q code ----------------------- | ||||
|             // --- Make the digitized version of the L5Q code ------------------ | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) ----------- | ||||
|                     // --- Correct the last index (due to number rounding issues) ----------- | ||||
|                     _dest[i] = std::complex<float>(1.0 - 2.0 * _code[_codeLength - 1], 0); | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -162,19 +162,19 @@ void gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui | ||||
|     const int32_t _codeFreqBasis = 1023000;  // Hz | ||||
|     const int32_t _codeLength = 1023; | ||||
|  | ||||
|     //--- Find number of samples per spreading code ---------------------------- | ||||
|     // --- Find number of samples per spreading code --------------------------- | ||||
|     _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength)); | ||||
|  | ||||
|     //--- Find time constants -------------------------------------------------- | ||||
|     // --- Find time constants ------------------------------------------------- | ||||
|     _ts = 1.0 / static_cast<float>(_fs);                   // Sampling period in sec | ||||
|     _tc = 1.0 / static_cast<float>(_codeFreqBasis);        // C/A chip period in sec | ||||
|     gps_l1_ca_code_gen_complex(_code, _prn, _chip_shift);  // generate C/A code 1 sample per chip | ||||
|  | ||||
|     for (int32_t i = 0; i < _samplesPerCode; i++) | ||||
|         { | ||||
|             //=== Digitizing =================================================== | ||||
|             // === Digitizing ================================================== | ||||
|  | ||||
|             //--- Make index array to read C/A code values --------------------- | ||||
|             // --- Make index array to read C/A code values -------------------- | ||||
|             // The length of the index array depends on the sampling frequency - | ||||
|             // number of samples per millisecond (because one C/A code period is one | ||||
|             // millisecond). | ||||
| @@ -182,12 +182,12 @@ void gps_l1_ca_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui | ||||
|             aux = (_ts * (i + 1)) / _tc; | ||||
|             _codeValueIndex = auxCeil(aux) - 1; | ||||
|  | ||||
|             //--- Make the digitized version of the C/A code ------------------- | ||||
|             // --- Make the digitized version of the C/A code ------------------- | ||||
|             // The "upsampled" code is made by selecting values form the CA code | ||||
|             // chip array (caCode) for the time instances of each sample. | ||||
|             if (i == _samplesPerCode - 1) | ||||
|                 { | ||||
|                     //--- Correct the last index (due to number rounding issues) | ||||
|                     // --- Correct the last index (due to number rounding issues) | ||||
|                     _dest[i] = _code[_codeLength - 1]; | ||||
|                 } | ||||
|             else | ||||
|   | ||||
| @@ -45,6 +45,7 @@ | ||||
| #include <iostream>   // for cerr, cout | ||||
| #include <limits>     // for numeric_limits | ||||
| #include <utility>    // for move | ||||
| #include <vector>     // for vector | ||||
|  | ||||
| #if HAS_STD_FILESYSTEM | ||||
| #include <system_error> | ||||
| @@ -141,7 +142,7 @@ hybrid_observables_gs::hybrid_observables_gs(uint32_t nchannels_in, | ||||
|         } | ||||
|     T_rx_TOW_ms = 0U; | ||||
|     T_rx_remnant_to_20ms = 0; | ||||
|     T_rx_step_ms = 20;  //read from config at the adapter GNSS-SDR.observable_interval_ms!! | ||||
|     T_rx_step_ms = 20;  // read from config at the adapter GNSS-SDR.observable_interval_ms!! | ||||
|     T_rx_TOW_set = false; | ||||
|     T_status_report_timer_ms = 0; | ||||
|     // rework | ||||
| @@ -199,7 +200,7 @@ void hybrid_observables_gs::msg_handler_pvt_to_observables(const pmt::pmt_t &msg | ||||
|                     T_rx_offset_ms = new_rx_clock_offset_s * 1000.0; | ||||
|                     T_rx_TOW_ms = T_rx_TOW_ms - static_cast<int>(round(T_rx_offset_ms)); | ||||
|                     T_rx_remnant_to_20ms = (T_rx_TOW_ms % 20); | ||||
|                     //d_Rx_clock_buffer.clear();  // Clear all the elements in the buffer | ||||
|                     // d_Rx_clock_buffer.clear();  // Clear all the elements in the buffer | ||||
|                     for (uint32_t n = 0; n < d_nchannels_out; n++) | ||||
|                         { | ||||
|                             d_gnss_synchro_history->clear(n); | ||||
| @@ -475,7 +476,7 @@ void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data) | ||||
|     std::vector<Gnss_Synchro>::const_iterator it; | ||||
|     if (!T_rx_TOW_set) | ||||
|         { | ||||
|             //uint32_t TOW_ref = std::numeric_limits<uint32_t>::max(); | ||||
|             // int32_t TOW_ref = std::numeric_limits<uint32_t>::max(); | ||||
|             uint32_t TOW_ref = 0U; | ||||
|             for (it = data.cbegin(); it != data.cend(); it++) | ||||
|                 { | ||||
| @@ -622,14 +623,14 @@ int hybrid_observables_gs::general_work(int noutput_items __attribute__((unused) | ||||
|                     out[n][0] = epoch_data.at(n); | ||||
|                 } | ||||
|  | ||||
|             //report channel status every second | ||||
|             // report channel status every second | ||||
|             T_status_report_timer_ms += T_rx_step_ms; | ||||
|             if (T_status_report_timer_ms >= 1000) | ||||
|                 { | ||||
|                     for (uint32_t n = 0; n < d_nchannels_out; n++) | ||||
|                         { | ||||
|                             std::shared_ptr<Gnss_Synchro> gnss_synchro_sptr = std::make_shared<Gnss_Synchro>(epoch_data.at(n)); | ||||
|                             //publish valid gnss_synchro to the gnss_flowgraph channel status monitor | ||||
|                             // publish valid gnss_synchro to the gnss_flowgraph channel status monitor | ||||
|                             this->message_port_pub(pmt::mp("status"), pmt::make_any(gnss_synchro_sptr)); | ||||
|                         } | ||||
|                     T_status_report_timer_ms = 0; | ||||
|   | ||||
| @@ -41,7 +41,6 @@ | ||||
| #include <cstdint>                    // for int32_t | ||||
| #include <fstream>                    // for string, ofstream | ||||
| #include <memory>                     // for shared_ptr | ||||
| #include <vector>                     // for vector | ||||
|  | ||||
| class Gnss_Synchro; | ||||
| class hybrid_observables_gs; | ||||
|   | ||||
| @@ -78,14 +78,16 @@ public: | ||||
|  | ||||
| private: | ||||
|     boost::mutex d_mutex; | ||||
|     pcap_t *descr;  //ethernet pcap device descriptor | ||||
|     pcap_t *descr;  // ethernet pcap device descriptor | ||||
|     char *fifo_buff; | ||||
|     int fifo_read_ptr; | ||||
|     int fifo_write_ptr; | ||||
|     int fifo_items; | ||||
|     int d_sock_raw; | ||||
|     int d_udp_port; | ||||
|     // clang-format off | ||||
|     struct sockaddr_in si_me{}; | ||||
|     // clang-format on | ||||
|     std::string d_src_device; | ||||
|     std::string d_origin_address; | ||||
|     int d_udp_payload_size; | ||||
|   | ||||
| @@ -287,7 +287,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell | ||||
|     // Update satellite information for DNAV decoder | ||||
|     sat_prn = d_satellite.get_PRN(); | ||||
|     d_nav.i_satellite_PRN = sat_prn; | ||||
|     d_nav.i_signal_type = 1;  //!< BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q) | ||||
|     d_nav.i_signal_type = 1;  // BDS: data source (0:unknown,1:B1I,2:B1Q,3:B2I,4:B2Q,5:B3I,6:B3Q) | ||||
|  | ||||
|     // Update tel dec parameters for D2 NAV Messages | ||||
|     if (sat_prn > 0 and sat_prn < 6) | ||||
| @@ -315,7 +315,7 @@ void beidou_b1i_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satell | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             //back to normal satellites | ||||
|             // back to normal satellites | ||||
|             d_symbol_duration_ms = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT * BEIDOU_B1I_CODE_PERIOD_MS; | ||||
|             d_symbols_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS; | ||||
|             d_samples_per_preamble = BEIDOU_DNAV_PREAMBLE_LENGTH_SYMBOLS; | ||||
| @@ -395,7 +395,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ | ||||
|  | ||||
|     if (d_symbol_history.size() >= d_required_symbols) | ||||
|         { | ||||
|             //******* preamble correlation ******** | ||||
|             // ******* preamble correlation ******** | ||||
|             for (int32_t i = 0; i < d_samples_per_preamble; i++) | ||||
|                 { | ||||
|                     if (d_symbol_history[i] < 0)  // symbols clipping | ||||
| @@ -408,7 +408,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ | ||||
|                         } | ||||
|                 } | ||||
|         } | ||||
|     //******* frame sync ****************** | ||||
|     // ******* frame sync ****************** | ||||
|     if (d_stat == 0)  // no preamble information | ||||
|         { | ||||
|             if (abs(corr_value) >= d_samples_per_preamble) | ||||
| @@ -430,13 +430,13 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ | ||||
|                         { | ||||
|                             // try to decode frame | ||||
|                             DLOG(INFO) << "Starting BeiDou DNAV frame decoding for BeiDou B1I SAT " << this->d_satellite; | ||||
|                             d_preamble_index = d_sample_counter;  //record the preamble sample stamp | ||||
|                             d_preamble_index = d_sample_counter;  // record the preamble sample stamp | ||||
|  | ||||
|  | ||||
|                             d_stat = 2; | ||||
|  | ||||
|                             // ******* SAMPLES TO SYMBOLS ******* | ||||
|                             if (corr_value > 0)  //normal PLL lock | ||||
|                             if (corr_value > 0)  // normal PLL lock | ||||
|                                 { | ||||
|                                     for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++) | ||||
|                                         { | ||||
| @@ -493,7 +493,7 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ | ||||
|             if (d_sample_counter == d_preamble_index + static_cast<uint64_t>(d_preamble_period_samples)) | ||||
|                 { | ||||
|                     // ******* SAMPLES TO SYMBOLS ******* | ||||
|                     if (corr_value > 0)  //normal PLL lock | ||||
|                     if (corr_value > 0)  // normal PLL lock | ||||
|                         { | ||||
|                             for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++) | ||||
|                                 { | ||||
| @@ -543,9 +543,9 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ | ||||
|         { | ||||
|             // Reporting sow as gps time of week | ||||
|             d_TOW_at_Preamble_ms = static_cast<uint32_t>((d_nav.d_SOW + BEIDOU_DNAV_BDT2GPST_LEAP_SEC_OFFSET) * 1000.0); | ||||
|             //check TOW update consistency | ||||
|             // check TOW update consistency | ||||
|             uint32_t last_d_TOW_at_current_symbol_ms = d_TOW_at_current_symbol_ms; | ||||
|             //compute new TOW | ||||
|             // compute new TOW | ||||
|             d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + d_required_symbols * d_symbol_duration_ms; | ||||
|             flag_SOW_set = true; | ||||
|             d_nav.flag_new_SOW_available = false; | ||||
|   | ||||
| @@ -387,6 +387,7 @@ void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel) | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void beidou_b3i_telemetry_decoder_gs::reset() | ||||
| { | ||||
|     d_last_valid_preamble = d_sample_counter; | ||||
| @@ -397,6 +398,7 @@ void beidou_b3i_telemetry_decoder_gs::reset() | ||||
|     return; | ||||
| } | ||||
|  | ||||
|  | ||||
| int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|     int noutput_items __attribute__((unused)), | ||||
|     gr_vector_int &ninput_items __attribute__((unused)), | ||||
| @@ -420,7 +422,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|  | ||||
|     if (d_symbol_history.size() >= d_required_symbols) | ||||
|         { | ||||
|             //******* preamble correlation ******** | ||||
|             // ******* preamble correlation ******** | ||||
|             for (int32_t i = 0; i < d_samples_per_preamble; i++) | ||||
|                 { | ||||
|                     if (d_symbol_history[i] < 0)  // symbols clipping | ||||
| @@ -433,7 +435,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|                         } | ||||
|                 } | ||||
|         } | ||||
|     //******* frame sync ****************** | ||||
|     // ******* frame sync ****************** | ||||
|     if (d_stat == 0)  // no preamble information | ||||
|         { | ||||
|             if (abs(corr_value) >= d_samples_per_preamble) | ||||
| @@ -460,7 +462,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|                             d_stat = 2; | ||||
|  | ||||
|                             // ******* SAMPLES TO SYMBOLS ******* | ||||
|                             if (corr_value > 0)  //normal PLL lock | ||||
|                             if (corr_value > 0)  // normal PLL lock | ||||
|                                 { | ||||
|                                     for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++) | ||||
|                                         { | ||||
| @@ -520,7 +522,7 @@ int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|             if (d_sample_counter == d_preamble_index + static_cast<uint64_t>(d_preamble_period_samples)) | ||||
|                 { | ||||
|                     // ******* SAMPLES TO SYMBOLS ******* | ||||
|                     if (corr_value > 0)  //normal PLL lock | ||||
|                     if (corr_value > 0)  // normal PLL lock | ||||
|                         { | ||||
|                             for (uint32_t i = 0; i < BEIDOU_DNAV_PREAMBLE_PERIOD_SYMBOLS; i++) | ||||
|                                 { | ||||
| @@ -572,9 +574,9 @@ int beidou_b3i_telemetry_decoder_gs::general_work( | ||||
|         { | ||||
|             // Reporting sow as gps time of week | ||||
|             d_TOW_at_Preamble_ms = static_cast<uint32_t>((d_nav.d_SOW + BEIDOU_DNAV_BDT2GPST_LEAP_SEC_OFFSET) * 1000.0); | ||||
|             //check TOW update consistency | ||||
|             // check TOW update consistency | ||||
|             uint32_t last_d_TOW_at_current_symbol_ms = d_TOW_at_current_symbol_ms; | ||||
|             //compute new TOW | ||||
|             // compute new TOW | ||||
|             d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + d_required_symbols * d_symbol_duration_ms; | ||||
|             flag_SOW_set = true; | ||||
|             d_nav.flag_new_SOW_available = false; | ||||
|   | ||||
| @@ -95,7 +95,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs( | ||||
|                 d_frame_length_symbols = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS; | ||||
|                 CodeLength = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS; | ||||
|                 DataLength = (CodeLength / nn) - mm; | ||||
|                 d_max_symbols_without_valid_frame = GALILEO_INAV_PAGE_SYMBOLS * 30;  //rise alarm 60 seconds without valid tlm | ||||
|                 d_max_symbols_without_valid_frame = GALILEO_INAV_PAGE_SYMBOLS * 30;  // rise alarm 60 seconds without valid tlm | ||||
|  | ||||
|                 break; | ||||
|             } | ||||
| @@ -112,7 +112,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs( | ||||
|                 d_frame_length_symbols = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; | ||||
|                 CodeLength = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; | ||||
|                 DataLength = (CodeLength / nn) - mm; | ||||
|                 d_max_symbols_without_valid_frame = GALILEO_FNAV_SYMBOLS_PER_PAGE * 5;  //rise alarm 100 seconds without valid tlm | ||||
|                 d_max_symbols_without_valid_frame = GALILEO_FNAV_SYMBOLS_PER_PAGE * 5;  // rise alarm 100 seconds without valid tlm | ||||
|                 break; | ||||
|             } | ||||
|         default: | ||||
| @@ -309,7 +309,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(double *page_part_symbols, i | ||||
|         { | ||||
|             std::shared_ptr<Galileo_Almanac_Helper> tmp_obj = std::make_shared<Galileo_Almanac_Helper>(d_inav_nav.get_almanac()); | ||||
|             this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); | ||||
|             //debug | ||||
|             // debug | ||||
|             std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << std::endl; | ||||
|             DLOG(INFO) << "Current parameters:"; | ||||
|             DLOG(INFO) << "d_TOW_at_current_symbol_ms=" << d_TOW_at_current_symbol_ms; | ||||
| @@ -469,7 +469,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( | ||||
|         { | ||||
|             if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame) | ||||
|                 { | ||||
|                     int message = 1;  //bad telemetry | ||||
|                     int message = 1;  // bad telemetry | ||||
|                     DLOG(INFO) << "sent msg sat " << this->d_satellite; | ||||
|                     this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message)); | ||||
|                     d_sent_tlm_failed_msg = true; | ||||
| @@ -772,7 +772,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( | ||||
|         { | ||||
|             current_symbol.TOW_at_current_symbol_ms = d_TOW_at_current_symbol_ms; | ||||
|             // todo: Galileo to GPS time conversion should be moved to observable block. | ||||
|             // current_symbol.TOW_at_current_symbol_ms -= delta_t;  //Galileo to GPS TOW | ||||
|             // current_symbol.TOW_at_current_symbol_ms -= delta_t;  // Galileo to GPS TOW | ||||
|  | ||||
|             if (d_dump == true) | ||||
|                 { | ||||
|   | ||||
| @@ -342,7 +342,7 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ | ||||
|         { | ||||
|             if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame) | ||||
|                 { | ||||
|                     int message = 1;  //bad telemetry | ||||
|                     int message = 1;  // bad telemetry | ||||
|                     this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message)); | ||||
|                     d_sent_tlm_failed_msg = true; | ||||
|                 } | ||||
|   | ||||
| @@ -78,7 +78,7 @@ gps_l2c_telemetry_decoder_gs::gps_l2c_telemetry_decoder_gs( | ||||
|     d_flag_valid_word = false; | ||||
|     d_TOW_at_current_symbol = 0; | ||||
|     d_TOW_at_Preamble = 0; | ||||
|     d_state = 0;  //initial state | ||||
|     d_state = 0;  // initial state | ||||
|     d_crc_error_count = 0; | ||||
|  | ||||
|     // initialize the CNAV frame decoder (libswiftcnav) | ||||
| @@ -170,7 +170,7 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( | ||||
|         { | ||||
|             if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame) | ||||
|                 { | ||||
|                     int message = 1;  //bad telemetry | ||||
|                     int message = 1;  // bad telemetry | ||||
|                     this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message)); | ||||
|                     d_sent_tlm_failed_msg = true; | ||||
|                 } | ||||
|   | ||||
| @@ -165,7 +165,7 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u | ||||
|         { | ||||
|             if ((d_sample_counter - d_last_valid_preamble) > d_max_symbols_without_valid_frame) | ||||
|                 { | ||||
|                     int message = 1;  //bad telemetry | ||||
|                     int message = 1;  // bad telemetry | ||||
|                     this->message_port_pub(pmt::mp("telemetry_to_trk"), pmt::make_any(message)); | ||||
|                     d_sent_tlm_failed_msg = true; | ||||
|                 } | ||||
|   | ||||
| @@ -50,7 +50,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -159,7 +159,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -216,7 +216,7 @@ void BeidouB1iDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -225,7 +225,7 @@ void BeidouB1iDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -51,7 +51,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -163,7 +163,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -220,7 +220,7 @@ void BeidouB3iDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -229,7 +229,7 @@ void BeidouB3iDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -167,7 +167,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -225,7 +225,7 @@ void GalileoE1DllPllVemlTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -234,7 +234,7 @@ void GalileoE1DllPllVemlTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -92,6 +92,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -48,7 +48,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     bool dump; | ||||
| @@ -81,7 +81,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -145,7 +145,7 @@ void GalileoE1TcpConnectorTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -154,7 +154,7 @@ void GalileoE1TcpConnectorTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -48,7 +48,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 12000000); | ||||
| @@ -164,7 +164,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -221,7 +221,7 @@ void GalileoE5aDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -230,7 +230,7 @@ void GalileoE5aDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -89,6 +89,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -46,7 +46,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
| { | ||||
|     Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 12000000); | ||||
|     int32_t fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     trk_param_fpga.fs_in = fs_in; | ||||
| @@ -171,7 +171,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|     uint32_t device_base = configuration->property(role + ".device_base", 27); | ||||
|     trk_param_fpga.device_base = device_base; | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     // ################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     uint32_t code_samples_per_chip = 1; | ||||
|     auto code_length_chips = static_cast<uint32_t>(GALILEO_E5A_CODE_LENGTH_CHIPS); | ||||
|  | ||||
| @@ -260,7 +260,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); | ||||
|     channel_ = 0; | ||||
|  | ||||
| @@ -311,7 +311,7 @@ void GalileoE5aDllPllTrackingFpga::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -320,7 +320,7 @@ void GalileoE5aDllPllTrackingFpga::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     bool dump; | ||||
| @@ -61,7 +61,6 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|     float dll_bw_narrow_hz; | ||||
|     float early_late_space_chips; | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     //vector_length = configuration->property(role + ".vector_length", 2048); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump = configuration->property(role + ".dump", false); | ||||
| @@ -85,7 +84,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -201,7 +200,7 @@ void GlonassL1CaDllPllCAidTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -210,7 +209,7 @@ void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -48,7 +48,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     bool dump; | ||||
| @@ -77,7 +77,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -140,7 +140,7 @@ void GlonassL1CaDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -149,7 +149,7 @@ void GlonassL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -91,6 +91,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -47,7 +47,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     bool dump; | ||||
| @@ -59,7 +59,6 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|     float dll_bw_narrow_hz; | ||||
|     float early_late_space_chips; | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     //vector_length = configuration->property(role + ".vector_length", 2048); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump = configuration->property(role + ".dump", false); | ||||
| @@ -83,7 +82,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -199,7 +198,7 @@ void GlonassL2CaDllPllCAidTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -208,7 +207,7 @@ void GlonassL2CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -91,6 +91,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -46,7 +46,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     bool dump; | ||||
| @@ -75,7 +75,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -138,7 +138,7 @@ void GlonassL2CaDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -147,7 +147,7 @@ void GlonassL2CaDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -90,6 +90,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -50,7 +50,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -170,7 +170,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -227,7 +227,7 @@ void GpsL1CaDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -236,7 +236,7 @@ void GpsL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -51,7 +51,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( | ||||
| { | ||||
|     Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int32_t fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     trk_param_fpga.fs_in = fs_in; | ||||
| @@ -177,7 +177,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( | ||||
|     uint32_t device_base = configuration->property(role + ".device_base", 3); | ||||
|     trk_param_fpga.device_base = device_base; | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     // ################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     d_ca_codes = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<int32_t>(GPS_L1_CA_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int32_t), volk_gnsssdr_get_alignment())); | ||||
|     for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++) | ||||
|         { | ||||
| @@ -214,8 +214,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); | ||||
|     channel_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_fpga_sc->unique_id() << ")"; | ||||
| @@ -261,7 +260,7 @@ void GpsL1CaDllPllTrackingFpga::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect | ||||
|     // nothing to connect | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -270,7 +269,7 @@ void GpsL1CaDllPllTrackingFpga::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect | ||||
|     // nothing to disconnect | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -50,7 +50,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int order; | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
| @@ -89,7 +89,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( | ||||
|     bce_nu = configuration->property(role + ".bce_nu", 0); | ||||
|     bce_kappa = configuration->property(role + ".bce_kappa", 0); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -115,6 +115,16 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( | ||||
|         } | ||||
|     channel_ = 0; | ||||
|     DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")"; | ||||
|     if (in_streams_ == 0) | ||||
|         { | ||||
|             in_streams_ = 1; | ||||
|             // Avoid compiler warning | ||||
|         } | ||||
|     if (out_streams_ == 0) | ||||
|         { | ||||
|             out_streams_ = 1; | ||||
|             // Avoid compiler warning | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -150,7 +160,7 @@ void GpsL1CaKfTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -159,7 +169,7 @@ void GpsL1CaKfTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -146,7 +146,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -203,7 +203,7 @@ void GpsL2MDllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -212,7 +212,7 @@ void GpsL2MDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -56,7 +56,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( | ||||
| { | ||||
|     Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     trk_param_fpga.fs_in = fs_in; | ||||
| @@ -119,7 +119,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( | ||||
|  | ||||
|     auto* ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     // ################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(GPS_L2_M_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|     for (uint32_t PRN = 1; PRN <= NUM_PRNs; PRN++) | ||||
|         { | ||||
| @@ -136,7 +136,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( | ||||
|     trk_param_fpga.code_length_chips = GPS_L2_M_CODE_LENGTH_CHIPS; | ||||
|     trk_param_fpga.code_samples_per_chip = 1;  // 1 sample per chip | ||||
|  | ||||
|     //################# MAKE TRACKING GNU Radio object ################### | ||||
|     // ################# MAKE TRACKING GNU Radio object ################### | ||||
|     tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); | ||||
|  | ||||
|     channel_ = 0; | ||||
|   | ||||
| @@ -49,7 +49,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( | ||||
| { | ||||
|     Dll_Pll_Conf trk_param = Dll_Pll_Conf(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
| @@ -166,7 +166,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( | ||||
|     trk_param.max_carrier_lock_fail = configuration->property(role + ".max_carrier_lock_fail", trk_param.max_carrier_lock_fail); | ||||
|     trk_param.carrier_lock_th = configuration->property(role + ".carrier_lock_th", trk_param.carrier_lock_th); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
| @@ -223,7 +223,7 @@ void GpsL5DllPllTracking::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -232,7 +232,7 @@ void GpsL5DllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -89,6 +89,7 @@ public: | ||||
|     void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; | ||||
|  | ||||
|     void start_tracking() override; | ||||
|  | ||||
|     /*! | ||||
|      * \brief Stop running tracking | ||||
|      */ | ||||
|   | ||||
| @@ -53,7 +53,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
| { | ||||
|     Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga(); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     // ################# CONFIGURATION PARAMETERS ######################## | ||||
|     int32_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 12500000); | ||||
|     int32_t fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     trk_param_fpga.fs_in = fs_in; | ||||
| @@ -175,7 +175,8 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|     trk_param_fpga.device_name = device_name; | ||||
|     uint32_t device_base = configuration->property(role + ".device_base", 27); | ||||
|     trk_param_fpga.device_base = device_base; | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|  | ||||
|     // ################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     uint32_t code_samples_per_chip = 1; | ||||
|     auto code_length_chips = static_cast<uint32_t>(GPS_L5I_CODE_LENGTH_CHIPS); | ||||
|  | ||||
| @@ -332,7 +333,7 @@ void GpsL5DllPllTrackingFpga::connect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to connect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to connect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -341,7 +342,7 @@ void GpsL5DllPllTrackingFpga::disconnect(gr::top_block_sptr top_block) | ||||
|     if (top_block) | ||||
|         { /* top_block is not null */ | ||||
|         }; | ||||
|     //nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
|     // nothing to disconnect, now the tracking uses gr_sync_decimator | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -92,7 +92,7 @@ dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_) | ||||
| dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::block("dll_pll_veml_tracking", gr::io_signature::make(1, 1, sizeof(gr_complex)), | ||||
|                                                                               gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) | ||||
| { | ||||
|     //prevent telemetry symbols accumulation in output buffers | ||||
|     // prevent telemetry symbols accumulation in output buffers | ||||
|     this->set_max_noutput_items(1); | ||||
|     trk_parameters = conf_; | ||||
|     // Telemetry bit synchronization message port input | ||||
| @@ -326,7 +326,6 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl | ||||
|                     d_symbols_per_bit = 0; | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|     else | ||||
|         { | ||||
|             LOG(WARNING) << "Invalid System argument when instantiating tracking blocks"; | ||||
| @@ -545,7 +544,7 @@ void dll_pll_veml_tracking::msg_handler_telemetry_to_trk(const pmt::pmt_t &msg) | ||||
|                         { | ||||
|                             DLOG(INFO) << "Telemetry fault received in ch " << this->d_channel; | ||||
|                             gr::thread::scoped_lock lock(d_setlock); | ||||
|                             d_carrier_lock_fail_counter = 200000;  //force loss-of-lock condition | ||||
|                             d_carrier_lock_fail_counter = 200000;  // force loss-of-lock condition | ||||
|                         } | ||||
|                 } | ||||
|         } | ||||
| @@ -1049,7 +1048,7 @@ void dll_pll_veml_tracking::update_tracking_vars() | ||||
|     K_blk_samples = T_prn_samples + d_rem_code_phase_samples; | ||||
|     d_current_prn_length_samples = static_cast<int32_t>(std::floor(K_blk_samples));  // round to a discrete number of samples | ||||
|  | ||||
|     //################### PLL COMMANDS ################################################# | ||||
|     // ################### PLL COMMANDS ################################################# | ||||
|     // carrier phase step (NCO phase increment per sample) [rads/sample] | ||||
|     d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in; | ||||
|     // carrier phase rate step (NCO phase increment rate per sample) [rads/sample^2] | ||||
| @@ -1083,7 +1082,7 @@ void dll_pll_veml_tracking::update_tracking_vars() | ||||
|     // std::cout << fmod(b, PI_2) / fmod(a, PI_2) << std::endl; | ||||
|     d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast<double>(d_current_prn_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_prn_length_samples) * static_cast<double>(d_current_prn_length_samples)); | ||||
|  | ||||
|     //################### DLL COMMANDS ################################################# | ||||
|     // ################### DLL COMMANDS ################################################# | ||||
|     // code phase step (Code resampler phase increment per sample) [chips/sample] | ||||
|     d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in; | ||||
|     if (trk_parameters.high_dyn) | ||||
| @@ -1537,8 +1536,6 @@ void dll_pll_veml_tracking::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             //trk_parameters.dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             //trk_parameters.dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(dump_filename_.c_str(), std::ios::out | std::ios::binary); | ||||
|                             LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << dump_filename_.c_str(); | ||||
| @@ -1637,10 +1634,10 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | ||||
|                 d_P_accu = *d_Prompt; | ||||
|                 d_L_accu = *d_Late; | ||||
|  | ||||
|                 //fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period | ||||
|                 // fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period | ||||
|                 if (trk_parameters.bit_synchronization_time_limit_s < (d_sample_counter - d_acq_sample_stamp) / static_cast<int>(trk_parameters.fs_in)) | ||||
|                     { | ||||
|                         d_carrier_lock_fail_counter = 300000;  //force loss-of-lock condition | ||||
|                         d_carrier_lock_fail_counter = 300000;  // force loss-of-lock condition | ||||
|                         LOG(INFO) << systemName << " " << signal_pretty_name << " tracking synchronization time limit reached in channel " << d_channel | ||||
|                                   << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; | ||||
|                     } | ||||
| @@ -1678,9 +1675,9 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | ||||
|                                                     } | ||||
|                                             } | ||||
|                                     } | ||||
|                                 else if (d_symbols_per_bit > 1)  //Signal does not have secondary code. Search a bit transition by sign change | ||||
|                                 else if (d_symbols_per_bit > 1)  // Signal does not have secondary code. Search a bit transition by sign change | ||||
|                                     { | ||||
|                                         //******* preamble correlation ******** | ||||
|                                         // ******* preamble correlation ******** | ||||
|                                         d_Prompt_circular_buffer.push_back(*d_Prompt); | ||||
|                                         if (d_Prompt_circular_buffer.size() == d_secondary_code_length) | ||||
|                                             { | ||||
| @@ -1701,7 +1698,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) | ||||
|                             } | ||||
|                         else | ||||
|                             { | ||||
|                                 next_state = false;  //keep in state 2 during pull-in transitory | ||||
|                                 next_state = false;  // keep in state 2 during pull-in transitory | ||||
|                             } | ||||
|                         if (next_state) | ||||
|                             {  // reset extended correlator | ||||
|   | ||||
| @@ -83,8 +83,9 @@ dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Co | ||||
| dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_) : gr::block("dll_pll_veml_tracking_fpga", gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), | ||||
|                                                                                              gr::io_signature::make(1, 1, sizeof(Gnss_Synchro))) | ||||
| { | ||||
|     //prevent telemetry symbols accumulation in output buffers | ||||
|     // prevent telemetry symbols accumulation in output buffers | ||||
|     this->set_max_noutput_items(1); | ||||
|  | ||||
|     trk_parameters = conf_; | ||||
|     // Telemetry bit synchronization message port input | ||||
|     this->message_port_register_out(pmt::mp("events")); | ||||
| @@ -476,7 +477,7 @@ void dll_pll_veml_tracking_fpga::msg_handler_telemetry_to_trk(const pmt::pmt_t & | ||||
|                         { | ||||
|                             DLOG(INFO) << "Telemetry fault received in ch " << this->d_channel; | ||||
|                             gr::thread::scoped_lock lock(d_setlock); | ||||
|                             d_carrier_lock_fail_counter = 200000;  //force loss-of-lock condition | ||||
|                             d_carrier_lock_fail_counter = 200000;  // force loss-of-lock condition | ||||
|                         } | ||||
|                 } | ||||
|         } | ||||
| @@ -514,6 +515,7 @@ void dll_pll_veml_tracking_fpga::start_tracking() | ||||
|     m_condition.notify_one(); | ||||
| } | ||||
|  | ||||
|  | ||||
| dll_pll_veml_tracking_fpga::~dll_pll_veml_tracking_fpga() | ||||
| { | ||||
|     if (d_dump_file.is_open()) | ||||
| @@ -606,7 +608,6 @@ bool dll_pll_veml_tracking_fpga::cn0_and_tracking_lock_status(double coh_integra | ||||
|     float d_CN0_SNV_dB_Hz_raw = cn0_svn_estimator(d_Prompt_buffer.data(), trk_parameters.cn0_samples, static_cast<float>(coh_integration_time_s)); | ||||
|     d_CN0_SNV_dB_Hz = d_cn0_smoother.smooth(d_CN0_SNV_dB_Hz_raw); | ||||
|     // Carrier lock indicator | ||||
|     //d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer.data(), trk_parameters.cn0_samples); | ||||
|     d_carrier_lock_test = d_carrier_lock_test_smoother.smooth(carrier_lock_detector(d_Prompt_buffer.data(), 1)); | ||||
|     // Loss of lock detection | ||||
|     if (!d_pull_in_transitory) | ||||
| @@ -789,15 +790,12 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars() | ||||
|     // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT ####################### | ||||
|     // keep alignment parameters for the next input buffer | ||||
|     // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation | ||||
|     //T_prn_samples_prev = T_prn_samples; | ||||
|     T_prn_samples = T_prn_seconds * trk_parameters.fs_in; | ||||
|     //K_blk_samples = T_prn_samples + d_rem_code_phase_samples; // initially d_rem_code_phase_samples is zero. It is updated at the end of this function | ||||
|     K_blk_samples = T_prn_samples * d_current_fpga_integration_period + d_rem_code_phase_samples;  // initially d_rem_code_phase_samples is zero. It is updated at the end of this function | ||||
|  | ||||
|     auto actual_blk_length = static_cast<int32_t>(std::floor(K_blk_samples)); | ||||
|     //d_next_integration_length_samples = 2 * actual_blk_length - d_current_integration_length_samples; | ||||
|     d_next_integration_length_samples = actual_blk_length; | ||||
|     //################### PLL COMMANDS ################################################# | ||||
|  | ||||
|     // ################## PLL COMMANDS ################################################# | ||||
|     // carrier phase step (NCO phase increment per sample) [rads/sample] | ||||
|     d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in; | ||||
|     // carrier phase rate step (NCO phase increment rate per sample) [rads/sample^2] | ||||
| @@ -831,7 +829,7 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars() | ||||
|     // std::cout << fmod(b, PI_2) / fmod(a, PI_2) << std::endl; | ||||
|     d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast<double>(d_current_integration_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_integration_length_samples) * static_cast<double>(d_current_integration_length_samples)); | ||||
|  | ||||
|     //################### DLL COMMANDS ################################################# | ||||
|     // ################## DLL COMMANDS ################################################# | ||||
|     // code phase step (Code resampler phase increment per sample) [chips/sample] | ||||
|     d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in; | ||||
|     if (trk_parameters.high_dyn) | ||||
| @@ -956,7 +954,7 @@ void dll_pll_veml_tracking_fpga::save_correlation_results() | ||||
|                     else | ||||
|                         { | ||||
|                             d_P_data_accu += *d_Prompt; | ||||
|                             //std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << std::endl; | ||||
|                             // std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << std::endl; | ||||
|                         } | ||||
|                     d_current_data_symbol += d_current_fpga_integration_period; | ||||
|                     d_current_data_symbol %= d_symbols_per_bit; | ||||
| @@ -1301,8 +1299,6 @@ void dll_pll_veml_tracking_fpga::set_channel(uint32_t channel) | ||||
|                 { | ||||
|                     try | ||||
|                         { | ||||
|                             //trk_parameters.dump_filename.append(boost::lexical_cast<std::string>(d_channel)); | ||||
|                             //trk_parameters.dump_filename.append(".dat"); | ||||
|                             d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); | ||||
|                             d_dump_file.open(dump_filename_.c_str(), std::ios::out | std::ios::binary); | ||||
|                             LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << dump_filename_.c_str(); | ||||
| @@ -1506,13 +1502,10 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                 case 1:  // Pull-in | ||||
|                     { | ||||
|                         d_worker_is_done = false; | ||||
|  | ||||
|  | ||||
|                         boost::mutex::scoped_lock lock(d_mutex); | ||||
|                         while (!d_worker_is_done) m_condition.wait(lock); | ||||
|  | ||||
|                         // Signal alignment (skip samples until the incoming signal is aligned with local replica) | ||||
|  | ||||
|                         int64_t acq_trk_diff_samples; | ||||
|                         double acq_trk_diff_seconds; | ||||
|                         double delta_trk_to_acq_prn_start_samples; | ||||
| @@ -1533,7 +1526,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                         else | ||||
|                             { | ||||
|                                 // test mode | ||||
|  | ||||
|                                 acq_trk_diff_samples = -static_cast<int64_t>(counter_value) + static_cast<int64_t>(d_acq_sample_stamp); | ||||
|                                 acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in; | ||||
|                                 delta_trk_to_acq_prn_start_samples = static_cast<double>(acq_trk_diff_samples) + d_acq_code_phase_samples; | ||||
| @@ -1541,9 +1533,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                                 absolute_samples_offset = static_cast<uint64_t>(delta_trk_to_acq_prn_start_samples); | ||||
|                             } | ||||
|  | ||||
|  | ||||
|                         multicorrelator_fpga->set_initial_sample(absolute_samples_offset); | ||||
|                         //d_absolute_samples_offset = absolute_samples_offset; | ||||
|                         d_sample_counter = absolute_samples_offset; | ||||
|                         d_sample_counter_next = d_sample_counter; | ||||
|  | ||||
| @@ -1568,10 +1558,10 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                         std::cout << "Tracking of " << systemName << " " << signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; | ||||
|                         DLOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel; | ||||
|  | ||||
|                         //                DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)"; | ||||
|                         //                std::cout << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)" << std::endl; | ||||
|                         //                DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz | ||||
|                         //                           << ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples; | ||||
|                         // DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)"; | ||||
|                         // std::cout << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)" << std::endl; | ||||
|                         // DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz | ||||
|                         //            << ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples; | ||||
|  | ||||
|                         break; | ||||
|                     } | ||||
| @@ -1583,7 +1573,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                         do_correlation_step(); | ||||
|  | ||||
|                         // Save single correlation step variables | ||||
|  | ||||
|                         if (d_veml) | ||||
|                             { | ||||
|                                 d_VE_accu = *d_Very_Early; | ||||
| @@ -1593,16 +1582,15 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                         d_P_accu = *d_Prompt; | ||||
|                         d_L_accu = *d_Late; | ||||
|  | ||||
|                         //fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period | ||||
|                         // fail-safe: check if the secondary code or bit synchronization has not succeeded in a limited time period | ||||
|                         if (trk_parameters.bit_synchronization_time_limit_s < (d_sample_counter - d_acq_sample_stamp) / static_cast<int>(trk_parameters.fs_in)) | ||||
|                             { | ||||
|                                 d_carrier_lock_fail_counter = 300000;  //force loss-of-lock condition | ||||
|                                 d_carrier_lock_fail_counter = 300000;  // force loss-of-lock condition | ||||
|                                 LOG(INFO) << systemName << " " << signal_pretty_name << " tracking synchronization time limit reached in channel " << d_channel | ||||
|                                           << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl; | ||||
|                             } | ||||
|  | ||||
|                         // Check lock status | ||||
|  | ||||
|                         if (!cn0_and_tracking_lock_status(d_code_period)) | ||||
|                             { | ||||
|                                 clear_tracking_vars(); | ||||
| @@ -1643,9 +1631,9 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                                                             } | ||||
|                                                     } | ||||
|                                             } | ||||
|                                         else if (d_symbols_per_bit > 1)  //Signal does not have secondary code. Search a bit transition by sign change | ||||
|                                         else if (d_symbols_per_bit > 1)  // Signal does not have secondary code. Search a bit transition by sign change | ||||
|                                             { | ||||
|                                                 //******* preamble correlation ******** | ||||
|                                                 // ******* preamble correlation ******** | ||||
|                                                 d_Prompt_circular_buffer.push_back(*d_Prompt); | ||||
|                                                 if (d_Prompt_circular_buffer.size() == d_secondary_code_length) | ||||
|                                                     { | ||||
| @@ -1666,7 +1654,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                                     } | ||||
|                                 else | ||||
|                                     { | ||||
|                                         next_state = false;  //keep in state 2 during pull-in transitory | ||||
|                                         next_state = false;  // keep in state 2 during pull-in transitory | ||||
|                                     } | ||||
|  | ||||
|                                 if (next_state) | ||||
| @@ -1751,7 +1739,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                                             } | ||||
|                                     } | ||||
|                             } | ||||
|  | ||||
|                         break; | ||||
|                     } | ||||
|                 case 3:  // coherent integration (correlation time extension) | ||||
| @@ -1843,7 +1830,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                             } | ||||
|                         break; | ||||
|                     } | ||||
|  | ||||
|                 case 5:  // coherent integration (correlation time extension) | ||||
|                     { | ||||
|                         d_sample_counter = d_sample_counter_next; | ||||
| @@ -1889,8 +1875,6 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|  | ||||
|                         break; | ||||
|                     } | ||||
|  | ||||
|  | ||||
|                 case 6:  // narrow tracking IN THE FPGA | ||||
|                     { | ||||
|                         d_sample_counter = d_sample_counter_next; | ||||
| @@ -1956,13 +1940,15 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un | ||||
|                             } | ||||
|                         break; | ||||
|                     } | ||||
|                 default: | ||||
|                     break; | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|     if (current_synchro_data.Flag_valid_symbol_output) | ||||
|         { | ||||
|             current_synchro_data.fs = static_cast<int64_t>(trk_parameters.fs_in); | ||||
|             current_synchro_data.Tracking_sample_counter = d_sample_counter_next;  //d_sample_counter; | ||||
|             current_synchro_data.Tracking_sample_counter = d_sample_counter_next;  // d_sample_counter; | ||||
|             *out[0] = current_synchro_data; | ||||
|             return 1; | ||||
|         } | ||||
|   | ||||
| @@ -112,7 +112,7 @@ void ControlThread::init() | ||||
| { | ||||
|     // Instantiates a control queue, a GNSS flowgraph, and a control message factory | ||||
|     control_queue_ = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     cmd_interface_.set_msg_queue(control_queue_);  //set also the queue pointer for the telecommand thread | ||||
|     cmd_interface_.set_msg_queue(control_queue_);  // set also the queue pointer for the telecommand thread | ||||
|     try | ||||
|         { | ||||
|             flowgraph_ = std::make_shared<GNSSFlowgraph>(configuration_, control_queue_); | ||||
| @@ -274,8 +274,8 @@ void ControlThread::event_dispatcher(bool &valid_event, pmt::pmt_t &msg) | ||||
|         { | ||||
|             if (receiver_on_standby_ == false) | ||||
|                 { | ||||
|                     //perform non-priority tasks | ||||
|                     flowgraph_->acquisition_manager(0);  //start acquisition of untracked satellites | ||||
|                     // perform non-priority tasks | ||||
|                     flowgraph_->acquisition_manager(0);  // start acquisition of untracked satellites | ||||
|                 } | ||||
|         } | ||||
| } | ||||
| @@ -342,9 +342,9 @@ int ControlThread::run() | ||||
|     pmt::pmt_t msg; | ||||
|     while (flowgraph_->running() && !stop_) | ||||
|         { | ||||
|             //read event messages, triggered by event signaling with a 100 ms timeout to perform low priority receiver management tasks | ||||
|             // read event messages, triggered by event signaling with a 100 ms timeout to perform low priority receiver management tasks | ||||
|             bool valid_event = control_queue_->timed_wait_and_pop(msg, 100); | ||||
|             //call the new sat dispatcher and receiver controller | ||||
|             // call the new sat dispatcher and receiver controller | ||||
|             event_dispatcher(valid_event, msg); | ||||
|         } | ||||
|     std::cout << "Stopping GNSS-SDR, please wait!" << std::endl; | ||||
| @@ -618,7 +618,7 @@ bool ControlThread::read_assistance_from_XML() | ||||
|  | ||||
| void ControlThread::assist_GNSS() | ||||
| { | ||||
|     //######### GNSS Assistance ################################# | ||||
|     // ######### GNSS Assistance ################################# | ||||
|     // GNSS Assistance configuration | ||||
|     bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false); | ||||
|     bool enable_agnss_xml = configuration_->property("GNSS-SDR.AGNSS_XML_enabled", false); | ||||
|   | ||||
| @@ -303,7 +303,7 @@ void GNSSFlowgraph::connect() | ||||
|                     int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20)); | ||||
|                     ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0)); | ||||
|                     top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); | ||||
|                     top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_);  //extra port for the sample counter pulse | ||||
|                     top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_);  // extra port for the sample counter pulse | ||||
|                 } | ||||
|             catch (const std::exception& e) | ||||
|                 { | ||||
| @@ -327,7 +327,7 @@ void GNSSFlowgraph::connect() | ||||
|                         } | ||||
|                     int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20)); | ||||
|                     ch_out_fpga_sample_counter = gnss_sdr_make_fpga_sample_counter(fs, observable_interval_ms); | ||||
|                     top_block_->connect(ch_out_fpga_sample_counter, 0, observables_->get_left_block(), channels_count_);  //extra port for the sample counter pulse | ||||
|                     top_block_->connect(ch_out_fpga_sample_counter, 0, observables_->get_left_block(), channels_count_);  // extra port for the sample counter pulse | ||||
|                 } | ||||
|             catch (const std::exception& e) | ||||
|                 { | ||||
| @@ -353,7 +353,7 @@ void GNSSFlowgraph::connect() | ||||
|             int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20)); | ||||
|             ch_out_sample_counter = gnss_sdr_make_sample_counter(fs, observable_interval_ms, sig_conditioner_.at(0)->get_right_block()->output_signature()->sizeof_stream_item(0)); | ||||
|             top_block_->connect(sig_conditioner_.at(0)->get_right_block(), 0, ch_out_sample_counter, 0); | ||||
|             top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_);  //extra port for the sample counter pulse | ||||
|             top_block_->connect(ch_out_sample_counter, 0, observables_->get_left_block(), channels_count_);  // extra port for the sample counter pulse | ||||
|         } | ||||
|     catch (const std::exception& e) | ||||
|         { | ||||
| @@ -525,7 +525,7 @@ void GNSSFlowgraph::connect() | ||||
|                             top_block_->disconnect_all(); | ||||
|                             return; | ||||
|                         } | ||||
|                     signal_conditioner_connected.at(selected_signal_conditioner_ID) = true;  //notify that this signal conditioner is connected | ||||
|                     signal_conditioner_connected.at(selected_signal_conditioner_ID) = true;  // notify that this signal conditioner is connected | ||||
|                     DLOG(INFO) << "signal conditioner " << selected_signal_conditioner_ID << " connected to channel " << i; | ||||
|                 } | ||||
| #endif | ||||
| @@ -815,7 +815,7 @@ void GNSSFlowgraph::disconnect() | ||||
|                     // (if a signal source has more than 1 stream, then connect it to the multistream signal conditioner) | ||||
|                     if (sig_source_.at(i)->implementation() == "Raw_Array_Signal_Source") | ||||
|                         { | ||||
|                             //Multichannel Array | ||||
|                             // Multichannel Array | ||||
|                             for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++) | ||||
|                                 { | ||||
|                                     top_block_->disconnect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(i)->get_left_block(), j); | ||||
| @@ -1163,7 +1163,9 @@ void GNSSFlowgraph::remove_signal(const Gnss_Signal& gs) | ||||
|             break; | ||||
|         } | ||||
| } | ||||
| //project Doppler from primary frequency to secondary frequency | ||||
|  | ||||
|  | ||||
| // project Doppler from primary frequency to secondary frequency | ||||
| double GNSSFlowgraph::project_doppler(std::string searched_signal, double primary_freq_doppler_hz) | ||||
| { | ||||
|     switch (mapStringValues_[searched_signal]) | ||||
| @@ -1182,6 +1184,7 @@ double GNSSFlowgraph::project_doppler(std::string searched_signal, double primar | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void GNSSFlowgraph::acquisition_manager(unsigned int who) | ||||
| { | ||||
|     unsigned int current_channel; | ||||
| @@ -1235,7 +1238,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who) | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     //set Doppler center to 0 Hz | ||||
|                                     // set Doppler center to 0 Hz | ||||
|                                     channels_[current_channel]->assist_acquisition_doppler(0); | ||||
|                                 } | ||||
| #ifndef ENABLE_FPGA | ||||
| @@ -1285,7 +1288,6 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who) | ||||
| void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) | ||||
| { | ||||
|     //todo: the acquisition events are initiated from the acquisition success or failure queued msg. If the acquisition is disabled for non-assisted secondary freq channels, the engine stops.. | ||||
|  | ||||
|     std::lock_guard<std::mutex> lock(signal_list_mutex); | ||||
|     DLOG(INFO) << "Received " << what << " from " << who; | ||||
|     unsigned int sat = 0; | ||||
| @@ -1313,7 +1315,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) | ||||
|                 } | ||||
|             // call the acquisition manager to assign new satellite and start next acquisition (if required) | ||||
|             acquisition_manager(who); | ||||
|             //push back the old signal AFTER assigning a new one to avoid selecting the same signal | ||||
|             // push back the old signal AFTER assigning a new one to avoid selecting the same signal | ||||
|             if (sat == 0) | ||||
|                 { | ||||
|                     push_back_signal(gs); | ||||
|   | ||||
| @@ -92,7 +92,7 @@ std::string TcpCmdInterface::reset(const std::vector<std::string> &commandLine _ | ||||
|     std::string response; | ||||
|     if (control_queue_ != nullptr) | ||||
|         { | ||||
|             command_event_sptr new_evnt = command_event_make(200, 1);  //send the restart message (who=200,what=1) | ||||
|             command_event_sptr new_evnt = command_event_make(200, 1);  // send the restart message (who=200,what=1) | ||||
|             control_queue_->push(pmt::make_any(new_evnt)); | ||||
|             response = "OK\n"; | ||||
|         } | ||||
| @@ -109,7 +109,7 @@ std::string TcpCmdInterface::standby(const std::vector<std::string> &commandLine | ||||
|     std::string response; | ||||
|     if (control_queue_ != nullptr) | ||||
|         { | ||||
|             command_event_sptr new_evnt = command_event_make(300, 10);  //send the standby message (who=300,what=10) | ||||
|             command_event_sptr new_evnt = command_event_make(300, 10);  // send the standby message (who=300,what=10) | ||||
|             control_queue_->push(pmt::make_any(new_evnt)); | ||||
|             response = "OK\n"; | ||||
|         } | ||||
| @@ -200,7 +200,7 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin | ||||
|                 { | ||||
|                     if (control_queue_ != nullptr) | ||||
|                         { | ||||
|                             command_event_sptr new_evnt = command_event_make(300, 12);  //send the standby message (who=300,what=12) | ||||
|                             command_event_sptr new_evnt = command_event_make(300, 12);  // send the standby message (who=300,what=12) | ||||
|                             control_queue_->push(pmt::make_any(new_evnt)); | ||||
|                             response = "OK\n"; | ||||
|                         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez