mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Improve const correctness
Fix a bug that made the parameter PVT.nmea_dump_devname ignored Update changelog
This commit is contained in:
		| @@ -37,6 +37,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc | ||||
|   padding space in the stack and making the files more readable for humans. | ||||
| - Simpler, less error-prone design of the `GNSSBlockFactory` class public API | ||||
|   and internal implementation. | ||||
| - Simpler API for the `Pvt_Solution` class. | ||||
| - Improved system constant definition headers, numerical values are only written | ||||
|   once. | ||||
| - The software can now be built against the GNU Radio 3.9 API that uses standard | ||||
| @@ -104,6 +105,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc | ||||
|   samples parameter ignored when too large (that is, when set larger than | ||||
|   2^31-1). Now the `samples` parameter accepts values up to 2^64-1, that is, | ||||
|   18,446,744,073,709,551,615 samples. | ||||
| - Fixed a bug in the forwarding of NMEA messages to a serial port (configuration | ||||
|   of the `PVT.nmea_dump_devname` parameter was ignored). | ||||
| - Updated version of the Contributor Covenant to version 2.0. Added badge in the | ||||
|   README.md file. | ||||
|  | ||||
|   | ||||
| @@ -69,7 +69,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     // NMEA Printer settings | ||||
|     pvt_output_parameters.flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false); | ||||
|     pvt_output_parameters.nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename); | ||||
|     std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname); | ||||
|     pvt_output_parameters.nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname); | ||||
|  | ||||
|     // RINEX version | ||||
|     pvt_output_parameters.rinex_version = configuration->property(role + ".rinex_version", 3); | ||||
| @@ -95,13 +95,13 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     pvt_output_parameters.rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101); | ||||
|     pvt_output_parameters.rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234); | ||||
|     // RTCM message rates: least common multiple with output_rate_ms | ||||
|     int rtcm_MT1019_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     int rtcm_MT1020_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     int rtcm_MT1045_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     int rtcm_MSM_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), pvt_output_parameters.output_rate_ms); | ||||
|     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); | ||||
|     const int rtcm_MT1019_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MT1020_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MT1045_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MSM_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MT1077_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MT1087_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_rate_ms); | ||||
|     const int rtcm_MT1097_rate_ms = bc::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), pvt_output_parameters.output_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; | ||||
| @@ -184,16 +184,16 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|      *    1000  |  GPS L1 C/A + GPS L2C + GPS L5 | ||||
|      *    1001  |  GPS L1 C/A + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a | ||||
|      */ | ||||
|     int gps_1C_count = configuration->property("Channels_1C.count", 0); | ||||
|     int gps_2S_count = configuration->property("Channels_2S.count", 0); | ||||
|     int gps_L5_count = configuration->property("Channels_L5.count", 0); | ||||
|     int gal_1B_count = configuration->property("Channels_1B.count", 0); | ||||
|     int gal_E5a_count = configuration->property("Channels_5X.count", 0); | ||||
|     int gal_E5b_count = configuration->property("Channels_7X.count", 0); | ||||
|     int glo_1G_count = configuration->property("Channels_1G.count", 0); | ||||
|     int glo_2G_count = configuration->property("Channels_2G.count", 0); | ||||
|     int bds_B1_count = configuration->property("Channels_B1.count", 0); | ||||
|     int bds_B3_count = configuration->property("Channels_B3.count", 0); | ||||
|     const int gps_1C_count = configuration->property("Channels_1C.count", 0); | ||||
|     const int gps_2S_count = configuration->property("Channels_2S.count", 0); | ||||
|     const int gps_L5_count = configuration->property("Channels_L5.count", 0); | ||||
|     const int gal_1B_count = configuration->property("Channels_1B.count", 0); | ||||
|     const int gal_E5a_count = configuration->property("Channels_5X.count", 0); | ||||
|     const int gal_E5b_count = configuration->property("Channels_7X.count", 0); | ||||
|     const int glo_1G_count = configuration->property("Channels_1G.count", 0); | ||||
|     const int glo_2G_count = configuration->property("Channels_2G.count", 0); | ||||
|     const int bds_B1_count = configuration->property("Channels_B1.count", 0); | ||||
|     const int bds_B3_count = configuration->property("Channels_B3.count", 0); | ||||
|  | ||||
|     if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) | ||||
|         { | ||||
| @@ -376,8 +376,8 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     // RTKLIB PVT solver options | ||||
|     // Settings 1 | ||||
|     int positioning_mode = -1; | ||||
|     std::string default_pos_mode("Single"); | ||||
|     std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode);  // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h | ||||
|     const std::string default_pos_mode("Single"); | ||||
|     const std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode);  // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h | ||||
|     if (positioning_mode_str == "Single") | ||||
|         { | ||||
|             positioning_mode = PMODE_SINGLE; | ||||
| @@ -451,8 +451,8 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|             dynamics_model = 0; | ||||
|         } | ||||
|  | ||||
|     std::string default_iono_model("OFF"); | ||||
|     std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /*  (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     const std::string default_iono_model("OFF"); | ||||
|     const std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /*  (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     int iono_model = -1; | ||||
|     if (iono_model_str == "OFF") | ||||
|         { | ||||
| @@ -488,9 +488,9 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|             iono_model = IONOOPT_OFF; /* 0: ionosphere option: correction off */ | ||||
|         } | ||||
|  | ||||
|     std::string default_trop_model("OFF"); | ||||
|     const std::string default_trop_model("OFF"); | ||||
|     int trop_model = -1; | ||||
|     std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /*  (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     const std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /*  (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     if (trop_model_str == "OFF") | ||||
|         { | ||||
|             trop_model = TROPOPT_OFF; | ||||
| @@ -526,18 +526,18 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     int rec_PCV = 0; /*  Set whether the receiver antenna PCV (phase center variation) model is used or not. This feature requires a Receiver Antenna PCV File. */ | ||||
|  | ||||
|     /* Set whether the phase windup correction for PPP modes is applied or not. Only applicable to PPP‐* modes.*/ | ||||
|     int phwindup = configuration->property(role + ".phwindup", 0); | ||||
|     const int phwindup = configuration->property(role + ".phwindup", 0); | ||||
|  | ||||
|     /* Set whether the GPS Block IIA satellites in eclipse are excluded or not. | ||||
|     The eclipsing Block IIA satellites often degrade the PPP solutions due to unpredicted behavior of yaw‐attitude. Only applicable to PPP‐* modes.*/ | ||||
|     int reject_GPS_IIA = configuration->property(role + ".reject_GPS_IIA", 0); | ||||
|     const int reject_GPS_IIA = configuration->property(role + ".reject_GPS_IIA", 0); | ||||
|  | ||||
|     /* Set whether RAIM (receiver autonomous integrity monitoring) FDE (fault detection and exclusion) feature is enabled or not. | ||||
|     In case of RAIM FDE enabled, a satellite is excluded if SSE (sum of squared errors) of residuals is over a threshold. | ||||
|     The excluded satellite is selected to indicate the minimum SSE. */ | ||||
|     int raim_fde = configuration->property(role + ".raim_fde", 0); | ||||
|     const int raim_fde = configuration->property(role + ".raim_fde", 0); | ||||
|  | ||||
|     int earth_tide = configuration->property(role + ".earth_tide", 0); | ||||
|     const int earth_tide = configuration->property(role + ".earth_tide", 0); | ||||
|  | ||||
|     int nsys = 0; | ||||
|     if ((gps_1C_count > 0) || (gps_2S_count > 0) || (gps_L5_count > 0)) | ||||
| @@ -566,8 +566,8 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|         } | ||||
|  | ||||
|     // Settings 2 | ||||
|     std::string default_gps_ar("Continuous"); | ||||
|     std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */ | ||||
|     const std::string default_gps_ar("Continuous"); | ||||
|     const std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */ | ||||
|     int integer_ambiguity_resolution_gps = -1; | ||||
|     if (integer_ambiguity_resolution_gps_str == "OFF") | ||||
|         { | ||||
| @@ -615,54 +615,54 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|             integer_ambiguity_resolution_bds = 1; | ||||
|         } | ||||
|  | ||||
|     double min_ratio_to_fix_ambiguity = configuration->property(role + ".min_ratio_to_fix_ambiguity", 3.0); /* Set the integer ambiguity validation threshold for ratio‐test, | ||||
|     const double min_ratio_to_fix_ambiguity = configuration->property(role + ".min_ratio_to_fix_ambiguity", 3.0); /* Set the integer ambiguity validation threshold for ratio‐test, | ||||
|                                                                                                                which uses the ratio of squared residuals of the best integer vector to the second‐best vector. */ | ||||
|  | ||||
|     int min_lock_to_fix_ambiguity = configuration->property(role + ".min_lock_to_fix_ambiguity", 0); /* Set the minimum lock count to fix integer ambiguity.FLAGS_RINEX_version. | ||||
|     const int min_lock_to_fix_ambiguity = configuration->property(role + ".min_lock_to_fix_ambiguity", 0); /* Set the minimum lock count to fix integer ambiguity.FLAGS_RINEX_version. | ||||
|                                                                                                          If the lock count is less than the value, the ambiguity is excluded from the fixed integer vector. */ | ||||
|  | ||||
|     double min_elevation_to_fix_ambiguity = configuration->property(role + ".min_elevation_to_fix_ambiguity", 0.0); /* Set the minimum elevation (deg) to fix integer ambiguity. | ||||
|     const double min_elevation_to_fix_ambiguity = configuration->property(role + ".min_elevation_to_fix_ambiguity", 0.0); /* Set the minimum elevation (deg) to fix integer ambiguity. | ||||
|                                                                                                                         If the elevation of the satellite is less than the value, the ambiguity is excluded from the fixed integer vector. */ | ||||
|  | ||||
|     int outage_reset_ambiguity = configuration->property(role + ".outage_reset_ambiguity", 5); /* Set the outage count to reset ambiguity. If the data outage count is over the value, the estimated ambiguity is reset to the initial value.  */ | ||||
|     const int outage_reset_ambiguity = configuration->property(role + ".outage_reset_ambiguity", 5); /* Set the outage count to reset ambiguity. If the data outage count is over the value, the estimated ambiguity is reset to the initial value.  */ | ||||
|  | ||||
|     double slip_threshold = configuration->property(role + ".slip_threshold", 0.05); /* set the cycle‐slip threshold (m) of geometry‐free LC carrier‐phase difference between epochs */ | ||||
|     const double slip_threshold = configuration->property(role + ".slip_threshold", 0.05); /* set the cycle‐slip threshold (m) of geometry‐free LC carrier‐phase difference between epochs */ | ||||
|  | ||||
|     double threshold_reject_gdop = configuration->property(role + ".threshold_reject_gdop", 30.0); /* reject threshold of GDOP. If the GDOP is over the value, the observable is excluded for the estimation process as an outlier. */ | ||||
|     const double threshold_reject_gdop = configuration->property(role + ".threshold_reject_gdop", 30.0); /* reject threshold of GDOP. If the GDOP is over the value, the observable is excluded for the estimation process as an outlier. */ | ||||
|  | ||||
|     double threshold_reject_innovation = configuration->property(role + ".threshold_reject_innovation", 30.0); /* reject threshold of innovation (m). If the innovation is over the value, the observable is excluded for the estimation process as an outlier. */ | ||||
|     const double threshold_reject_innovation = configuration->property(role + ".threshold_reject_innovation", 30.0); /* reject threshold of innovation (m). If the innovation is over the value, the observable is excluded for the estimation process as an outlier. */ | ||||
|  | ||||
|     int number_filter_iter = configuration->property(role + ".number_filter_iter", 1); /* Set the number of iteration in the measurement update of the estimation filter. | ||||
|     const int number_filter_iter = configuration->property(role + ".number_filter_iter", 1); /* Set the number of iteration in the measurement update of the estimation filter. | ||||
|                                                                                          If the baseline length is very short like 1 m, the iteration may be effective to handle | ||||
|                                                                                          the nonlinearity of measurement equation. */ | ||||
|  | ||||
|     // Statistics | ||||
|     double bias_0 = configuration->property(role + ".bias_0", 30.0); | ||||
|     const double bias_0 = configuration->property(role + ".bias_0", 30.0); | ||||
|  | ||||
|     double iono_0 = configuration->property(role + ".iono_0", 0.03); | ||||
|     const double iono_0 = configuration->property(role + ".iono_0", 0.03); | ||||
|  | ||||
|     double trop_0 = configuration->property(role + ".trop_0", 0.3); | ||||
|     const double trop_0 = configuration->property(role + ".trop_0", 0.3); | ||||
|  | ||||
|     double sigma_bias = configuration->property(role + ".sigma_bias", 1e-4); /* Set the process noise standard deviation of carrier‐phase | ||||
|     const double sigma_bias = configuration->property(role + ".sigma_bias", 1e-4); /* Set the process noise standard deviation of carrier‐phase | ||||
|                                                                                 bias (ambiguity) (cycle/sqrt(s)) */ | ||||
|  | ||||
|     double sigma_iono = configuration->property(role + ".sigma_iono", 1e-3); /* Set the process noise standard deviation of vertical ionospheric delay per 10 km baseline (m/sqrt(s)). */ | ||||
|     const double sigma_iono = configuration->property(role + ".sigma_iono", 1e-3); /* Set the process noise standard deviation of vertical ionospheric delay per 10 km baseline (m/sqrt(s)). */ | ||||
|  | ||||
|     double sigma_trop = configuration->property(role + ".sigma_trop", 1e-4); /* Set the process noise standard deviation of zenith tropospheric delay (m/sqrt(s)). */ | ||||
|     const double sigma_trop = configuration->property(role + ".sigma_trop", 1e-4); /* Set the process noise standard deviation of zenith tropospheric delay (m/sqrt(s)). */ | ||||
|  | ||||
|     double sigma_acch = configuration->property(role + ".sigma_acch", 1e-1); /* Set the process noise standard deviation of the receiver acceleration as | ||||
|     const double sigma_acch = configuration->property(role + ".sigma_acch", 1e-1); /* Set the process noise standard deviation of the receiver acceleration as | ||||
|                                                                                 the horizontal component. (m/s2/sqrt(s)). If Receiver Dynamics is set to OFF, they are not used. */ | ||||
|  | ||||
|     double sigma_accv = configuration->property(role + ".sigma_accv", 1e-2); /* Set the process noise standard deviation of the receiver acceleration as | ||||
|     const double sigma_accv = configuration->property(role + ".sigma_accv", 1e-2); /* Set the process noise standard deviation of the receiver acceleration as | ||||
|                                                                                 the vertical component. (m/s2/sqrt(s)). If Receiver Dynamics is set to OFF, they are not used. */ | ||||
|  | ||||
|     double sigma_pos = configuration->property(role + ".sigma_pos", 0.0); | ||||
|     const double sigma_pos = configuration->property(role + ".sigma_pos", 0.0); | ||||
|  | ||||
|     double code_phase_error_ratio_l1 = configuration->property(role + ".code_phase_error_ratio_l1", 100.0); | ||||
|     double code_phase_error_ratio_l2 = configuration->property(role + ".code_phase_error_ratio_l2", 100.0); | ||||
|     double code_phase_error_ratio_l5 = configuration->property(role + ".code_phase_error_ratio_l5", 100.0); | ||||
|     double carrier_phase_error_factor_a = configuration->property(role + ".carrier_phase_error_factor_a", 0.003); | ||||
|     double carrier_phase_error_factor_b = configuration->property(role + ".carrier_phase_error_factor_b", 0.003); | ||||
|     const double code_phase_error_ratio_l1 = configuration->property(role + ".code_phase_error_ratio_l1", 100.0); | ||||
|     const double code_phase_error_ratio_l2 = configuration->property(role + ".code_phase_error_ratio_l2", 100.0); | ||||
|     const double code_phase_error_ratio_l5 = configuration->property(role + ".code_phase_error_ratio_l5", 100.0); | ||||
|     const double carrier_phase_error_factor_a = configuration->property(role + ".carrier_phase_error_factor_a", 0.003); | ||||
|     const double carrier_phase_error_factor_b = configuration->property(role + ".carrier_phase_error_factor_b", 0.003); | ||||
|  | ||||
|     snrmask_t snrmask = {{}, {{}, {}}}; | ||||
|  | ||||
| @@ -728,7 +728,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     rtkinit(&rtk, &rtklib_configuration_options); | ||||
|  | ||||
|     // Outputs | ||||
|     bool default_output_enabled = configuration->property(role + ".output_enabled", true); | ||||
|     const bool default_output_enabled = configuration->property(role + ".output_enabled", true); | ||||
|     pvt_output_parameters.output_enabled = default_output_enabled; | ||||
|     pvt_output_parameters.rinex_output_enabled = configuration->property(role + ".rinex_output_enabled", default_output_enabled); | ||||
|     pvt_output_parameters.gpx_output_enabled = configuration->property(role + ".gpx_output_enabled", default_output_enabled); | ||||
| @@ -738,7 +738,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration, | ||||
|     pvt_output_parameters.nmea_output_file_enabled = configuration->property(role + ".nmea_output_file_enabled", default_output_enabled); | ||||
|     pvt_output_parameters.rtcm_output_file_enabled = configuration->property(role + ".rtcm_output_file_enabled", false); | ||||
|  | ||||
|     std::string default_output_path = configuration->property(role + ".output_path", std::string(".")); | ||||
|     const std::string default_output_path = configuration->property(role + ".output_path", std::string(".")); | ||||
|     pvt_output_parameters.output_path = default_output_path; | ||||
|     pvt_output_parameters.rinex_output_path = configuration->property(role + ".rinex_output_path", default_output_path); | ||||
|     pvt_output_parameters.gpx_output_path = configuration->property(role + ".gpx_output_path", default_output_path); | ||||
|   | ||||
| @@ -201,8 +201,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
| #endif | ||||
| #endif | ||||
|     // initialize kml_printer | ||||
|     std::string kml_dump_filename; | ||||
|     kml_dump_filename = d_dump_filename; | ||||
|     const std::string kml_dump_filename = d_dump_filename; | ||||
|     d_kml_output_enabled = conf_.kml_output_enabled; | ||||
|     d_kml_rate_ms = conf_.kml_rate_ms; | ||||
|     if (d_kml_rate_ms == 0) | ||||
| @@ -220,8 +219,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
|         } | ||||
|  | ||||
|     // initialize gpx_printer | ||||
|     std::string gpx_dump_filename; | ||||
|     gpx_dump_filename = d_dump_filename; | ||||
|     const std::string gpx_dump_filename = d_dump_filename; | ||||
|     d_gpx_output_enabled = conf_.gpx_output_enabled; | ||||
|     d_gpx_rate_ms = conf_.gpx_rate_ms; | ||||
|     if (d_gpx_rate_ms == 0) | ||||
| @@ -239,8 +237,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
|         } | ||||
|  | ||||
|     // initialize geojson_printer | ||||
|     std::string geojson_dump_filename; | ||||
|     geojson_dump_filename = d_dump_filename; | ||||
|     const std::string geojson_dump_filename = d_dump_filename; | ||||
|     d_geojson_output_enabled = conf_.geojson_output_enabled; | ||||
|     d_geojson_rate_ms = conf_.geojson_rate_ms; | ||||
|     if (d_geojson_rate_ms == 0) | ||||
| @@ -275,8 +272,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
|         } | ||||
|  | ||||
|     // initialize rtcm_printer | ||||
|     std::string rtcm_dump_filename; | ||||
|     rtcm_dump_filename = d_dump_filename; | ||||
|     const std::string rtcm_dump_filename = d_dump_filename; | ||||
|     if (conf_.flag_rtcm_server or conf_.flag_rtcm_tty_port or conf_.rtcm_output_file_enabled) | ||||
|         { | ||||
|             d_rtcm_printer = std::make_unique<Rtcm_Printer>(rtcm_dump_filename, conf_.rtcm_output_file_enabled, conf_.flag_rtcm_server, conf_.flag_rtcm_tty_port, conf_.rtcm_tcp_port, conf_.rtcm_station_id, conf_.rtcm_dump_devname, true, conf_.rtcm_output_file_path); | ||||
| @@ -423,7 +419,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
|     // Create Sys V message queue | ||||
|     d_first_fix = true; | ||||
|     d_sysv_msg_key = 1101; | ||||
|     int msgflg = IPC_CREAT | 0666; | ||||
|     const int msgflg = IPC_CREAT | 0666; | ||||
|     if ((d_sysv_msqid = msgget(d_sysv_msg_key, msgflg)) == -1) | ||||
|         { | ||||
|             std::cout << "GNSS-SDR cannot create System V message queues.\n"; | ||||
| @@ -443,14 +439,14 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, | ||||
|         { | ||||
|             utc_diff_str = "+0000"; | ||||
|         } | ||||
|     int h = std::stoi(utc_diff_str.substr(0, 3), nullptr, 10); | ||||
|     int m = std::stoi(utc_diff_str[0] + utc_diff_str.substr(3), nullptr, 10); | ||||
|     const int h = std::stoi(utc_diff_str.substr(0, 3), nullptr, 10); | ||||
|     const int m = std::stoi(utc_diff_str[0] + utc_diff_str.substr(3), nullptr, 10); | ||||
|     d_utc_diff_time = boost::posix_time::hours(h) + boost::posix_time::minutes(m); | ||||
|     std::ostringstream os2; | ||||
| #ifdef HAS_PUT_TIME | ||||
|     os2 << std::put_time(&tm, "%Z"); | ||||
| #endif | ||||
|     std::string time_zone_abrv = os2.str(); | ||||
|     const std::string time_zone_abrv = os2.str(); | ||||
|     if (time_zone_abrv.empty()) | ||||
|         { | ||||
|             if (utc_diff_str == "+0000") | ||||
|   | ||||
| @@ -28,7 +28,7 @@ | ||||
| HybridObservables::HybridObservables(const ConfigurationInterface* configuration, | ||||
|     const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./observables.dat"; | ||||
|     const std::string default_dump_filename("./observables.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_mat_ = configuration->property(role + ".dump_mat", true); | ||||
|   | ||||
| @@ -37,8 +37,8 @@ DirectResamplerConditioner::DirectResamplerConditioner( | ||||
| { | ||||
|     const std::string default_item_type("short"); | ||||
|     const std::string default_dump_file("./data/signal_conditioner.dat"); | ||||
|     double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0); | ||||
|     double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     const double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0); | ||||
|     const double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     sample_freq_in_ = configuration->property(role_ + ".sample_freq_in", 4000000.0); | ||||
|     sample_freq_out_ = configuration->property(role_ + ".sample_freq_out", fs_in); | ||||
|     if (std::fabs(fs_in - sample_freq_out_) > std::numeric_limits<double>::epsilon()) | ||||
|   | ||||
| @@ -32,8 +32,8 @@ MmseResamplerConditioner::MmseResamplerConditioner( | ||||
| { | ||||
|     const std::string default_item_type("gr_complex"); | ||||
|     const std::string default_dump_file("./data/signal_conditioner.dat"); | ||||
|     double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0); | ||||
|     double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     const double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0); | ||||
|     const double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     sample_freq_in_ = configuration->property(role_ + ".sample_freq_in", 4000000.0); | ||||
|     sample_freq_out_ = configuration->property(role_ + ".sample_freq_out", fs_in); | ||||
|     if (std::fabs(fs_in - sample_freq_out_) > std::numeric_limits<double>::epsilon()) | ||||
|   | ||||
| @@ -60,6 +60,14 @@ SignalGenerator::SignalGenerator(const ConfigurationInterface* configuration, | ||||
|     std::vector<unsigned int> delay_chips; | ||||
|     std::vector<unsigned int> delay_sec; | ||||
|  | ||||
|     signal1.reserve(num_satellites); | ||||
|     system.reserve(num_satellites); | ||||
|     PRN.reserve(num_satellites); | ||||
|     CN0_dB.reserve(num_satellites); | ||||
|     doppler_Hz.reserve(num_satellites); | ||||
|     delay_chips.reserve(num_satellites); | ||||
|     delay_sec.reserve(num_satellites); | ||||
|  | ||||
|     for (unsigned int sat_idx = 0; sat_idx < num_satellites; sat_idx++) | ||||
|         { | ||||
|             std::string sat = std::to_string(sat_idx); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -27,7 +27,7 @@ BeidouB3iTelemetryDecoder::BeidouB3iTelemetryDecoder( | ||||
|     unsigned int in_streams, unsigned int out_streams) | ||||
|     : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = | ||||
|   | ||||
| @@ -33,7 +33,7 @@ GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -36,7 +36,7 @@ GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -33,7 +33,7 @@ GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ GlonassL2CaTelemetryDecoder::GlonassL2CaTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ GpsL5TelemetryDecoder::GpsL5TelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder( | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_dump_filename = "./navigation.dat"; | ||||
|     const std::string default_dump_filename("./navigation.dat"); | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|   | ||||
| @@ -41,7 +41,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     if (trk_params.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -64,7 +64,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( | ||||
|             std::cout << TEXT_RED << "WARNING: BEIDOU B1I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params.system = 'C'; | ||||
|     std::array<char, 3> sig_{'B', '1', '\0'}; | ||||
|     const std::array<char, 3> sig_{'B', '1', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -42,7 +42,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     trk_params.track_pilot = configuration->property(role + ".track_pilot", false); | ||||
|     if (trk_params.extend_correlation_symbols < 1) | ||||
| @@ -56,7 +56,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( | ||||
|             std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params.system = 'C'; | ||||
|     std::array<char, 3> sig_{'B', '3', '\0'}; | ||||
|     const std::array<char, 3> sig_{'B', '3', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -54,10 +54,10 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|         { | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     trk_params.system = 'E'; | ||||
|     std::array<char, 3> sig_{'1', 'B', '\0'}; | ||||
|     const std::array<char, 3> sig_{'1', 'B', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -57,10 +57,10 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     d_track_pilot = trk_params_fpga.track_pilot; | ||||
|     auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|     trk_params_fpga.vector_length = vector_length; | ||||
|     trk_params_fpga.system = 'E'; | ||||
|     std::array<char, 3> sig_{'1', 'B', '\0'}; | ||||
|     const std::array<char, 3> sig_{'1', 'B', '\0'}; | ||||
|     std::memcpy(trk_params_fpga.signal, sig_.data(), 3); | ||||
|  | ||||
|     // FPGA configuration parameters | ||||
|   | ||||
| @@ -58,7 +58,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( | ||||
|     size_t port_ch0 = configuration->property(role + ".port_ch0", 2060); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|   | ||||
| @@ -39,7 +39,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     if (trk_params.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -56,7 +56,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params.system = 'E'; | ||||
|     std::array<char, 3> sig_{'5', 'X', '\0'}; | ||||
|     const std::array<char, 3> sig_{'5', 'X', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -37,7 +37,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params_fpga.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); | ||||
|     trk_params_fpga.vector_length = vector_length; | ||||
|     d_track_pilot = trk_params_fpga.track_pilot; | ||||
|     if (trk_params_fpga.extend_correlation_symbols < 1) | ||||
| @@ -55,7 +55,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params_fpga.system = 'E'; | ||||
|     std::array<char, 3> sig_{'5', 'X', '\0'}; | ||||
|     const std::array<char, 3> sig_{'5', 'X', '\0'}; | ||||
|     std::memcpy(trk_params_fpga.signal, sig_.data(), 3); | ||||
|  | ||||
|     d_data_codes = nullptr; | ||||
| @@ -89,7 +89,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|  | ||||
|     for (uint32_t PRN = 1; PRN <= GALILEO_E5A_NUMBER_OF_CODES; PRN++) | ||||
|         { | ||||
|             std::array<char, 3> sig_a = {'5', 'X', '\0'}; | ||||
|             const std::array<char, 3> sig_a = {'5', 'X', '\0'}; | ||||
|             galileo_e5_a_code_gen_complex_primary(aux_code, PRN, sig_a); | ||||
|  | ||||
|             if (trk_params_fpga.track_pilot) | ||||
|   | ||||
| @@ -61,7 +61,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast<float>(0.5)); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_ == "gr_complex") | ||||
|   | ||||
| @@ -56,7 +56,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast<float>(0.5)); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|   | ||||
| @@ -59,7 +59,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast<float>(0.5)); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_ == "gr_complex") | ||||
|   | ||||
| @@ -54,7 +54,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast<float>(0.5)); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|   | ||||
| @@ -41,7 +41,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     if (trk_params.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -65,7 +65,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|         } | ||||
|  | ||||
|     trk_params.system = 'G'; | ||||
|     std::array<char, 3> sig_{'1', 'C', '\0'}; | ||||
|     const std::array<char, 3> sig_{'1', 'C', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -42,7 +42,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params_fpga.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int32_t>(std::round(trk_params_fpga.fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     trk_params_fpga.vector_length = vector_length; | ||||
|     if (trk_params_fpga.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -65,7 +65,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params_fpga.system = 'G'; | ||||
|     std::array<char, 3> sig_{'1', 'C', '\0'}; | ||||
|     const std::array<char, 3> sig_{'1', 'C', '\0'}; | ||||
|     std::memcpy(trk_params_fpga.signal, sig_.data(), 3); | ||||
|  | ||||
|     // FPGA configuration parameters | ||||
|   | ||||
| @@ -55,7 +55,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast<float>(0.5)); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     bool bce_run = configuration->property(role + ".bce_run", false); | ||||
|     unsigned int bce_ptrans = configuration->property(role + ".p_transient", 0); | ||||
|   | ||||
| @@ -47,7 +47,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( | ||||
|     size_t port_ch0 = configuration->property(role + ".port_ch0", 2060); | ||||
|     const std::string default_dump_filename("./track_ch"); | ||||
|     std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|     const auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); | ||||
|  | ||||
|     // ################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type == "gr_complex") | ||||
|   | ||||
| @@ -40,7 +40,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); | ||||
|     const auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     if (trk_params.extend_correlation_symbols != 1) | ||||
|         { | ||||
| @@ -54,7 +54,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params.system = 'G'; | ||||
|     std::array<char, 3> sig_{'2', 'S', '\0'}; | ||||
|     const std::array<char, 3> sig_{'2', 'S', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -47,7 +47,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params_fpga.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params_fpga.fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); | ||||
|     const auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params_fpga.fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); | ||||
|     trk_params_fpga.vector_length = vector_length; | ||||
|     trk_params_fpga.extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); | ||||
|     if (trk_params_fpga.extend_correlation_symbols != 1) | ||||
| @@ -63,7 +63,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params_fpga.system = 'G'; | ||||
|     std::array<char, 3> sig_{'2', 'S', '\0'}; | ||||
|     const std::array<char, 3> sig_{'2', 'S', '\0'}; | ||||
|     std::memcpy(trk_params_fpga.signal, sig_.data(), 3); | ||||
|  | ||||
|     // FPGA configuration parameters | ||||
|   | ||||
| @@ -40,7 +40,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)))); | ||||
|     const auto vector_length = static_cast<int>(std::round(static_cast<double>(trk_params.fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)))); | ||||
|     trk_params.vector_length = vector_length; | ||||
|     if (trk_params.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -57,7 +57,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; | ||||
|         } | ||||
|     trk_params.system = 'G'; | ||||
|     std::array<char, 3> sig_{'L', '5', '\0'}; | ||||
|     const std::array<char, 3> sig_{'L', '5', '\0'}; | ||||
|     std::memcpy(trk_params.signal, sig_.data(), 3); | ||||
|  | ||||
|     // ################# Make a GNU Radio Tracking block object ################ | ||||
|   | ||||
| @@ -44,7 +44,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|     trk_params_fpga.SetFromConfiguration(configuration, role); | ||||
|  | ||||
|     auto vector_length = static_cast<int32_t>(std::round(static_cast<double>(trk_params_fpga.fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)))); | ||||
|     const auto vector_length = static_cast<int32_t>(std::round(static_cast<double>(trk_params_fpga.fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)))); | ||||
|     trk_params_fpga.vector_length = vector_length; | ||||
|     if (trk_params_fpga.extend_correlation_symbols < 1) | ||||
|         { | ||||
| @@ -62,7 +62,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|         } | ||||
|     d_track_pilot = trk_params_fpga.track_pilot; | ||||
|     trk_params_fpga.system = 'G'; | ||||
|     std::array<char, 3> sig_{'L', '5', '\0'}; | ||||
|     const std::array<char, 3> sig_{'L', '5', '\0'}; | ||||
|     std::memcpy(trk_params_fpga.signal, sig_.data(), 3); | ||||
|  | ||||
|     // FPGA configuration parameters | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez