diff --git a/docs/changelog.md b/docs/changelog.md index 0c4bfd041..6353d23ba 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -37,6 +37,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades 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); diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 8858a22d6..4fc3a577f 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -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_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") diff --git a/src/algorithms/observables/adapters/hybrid_observables.cc b/src/algorithms/observables/adapters/hybrid_observables.cc index dd0372b80..53b4ce544 100644 --- a/src/algorithms/observables/adapters/hybrid_observables.cc +++ b/src/algorithms/observables/adapters/hybrid_observables.cc @@ -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); diff --git a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc index a45308915..028aa867c 100644 --- a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc @@ -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::epsilon()) diff --git a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc index 318fcb4e6..bed7acec2 100644 --- a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc @@ -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::epsilon()) diff --git a/src/algorithms/signal_generator/adapters/signal_generator.cc b/src/algorithms/signal_generator/adapters/signal_generator.cc index 2c6199c55..099271fda 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.cc +++ b/src/algorithms/signal_generator/adapters/signal_generator.cc @@ -60,6 +60,14 @@ SignalGenerator::SignalGenerator(const ConfigurationInterface* configuration, std::vector delay_chips; std::vector 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); diff --git a/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.cc index 321d86eeb..7550db484 100644 --- a/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/beidou_b1i_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.cc index 21e0b9d8f..0329b3fc5 100644 --- a/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/beidou_b3i_telemetry_decoder.cc @@ -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_ = diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc index 8347077c9..a9df198c3 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc index c30d3437e..851273c28 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc index 4c78c1f44..fab53caba 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc index ec6a4d0a7..deb4a40c1 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc index 7b6d21fb3..616cf7266 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc index 1f716d574..0bd3fca9b 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc index 76fa4eed9..3322e4f57 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc index 1f11aa66d..c12a5e797 100644 --- a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc @@ -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); diff --git a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc index 9ef1be39e..c19eac3a9 100644 --- a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc @@ -41,7 +41,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(trk_params.fs_in / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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 sig_{'B', '1', '\0'}; + const std::array sig_{'B', '1', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc index 543f61cbf..e0cd16f22 100644 --- a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc @@ -42,7 +42,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(static_cast(trk_params.fs_in) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(std::round(static_cast(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 sig_{'B', '3', '\0'}; + const std::array sig_{'B', '3', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc index 6a368c6d8..79bbdff3e 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -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(std::round(trk_params.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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 sig_{'1', 'B', '\0'}; + const std::array sig_{'1', 'B', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc index e0f9ad0c0..b957df4f4 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc @@ -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(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(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 sig_{'1', 'B', '\0'}; + const std::array sig_{'1', 'B', '\0'}; std::memcpy(trk_params_fpga.signal, sig_.data(), 3); // FPGA configuration parameters diff --git a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc index 2d2345ae1..70e5a118e 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc @@ -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(std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc index 7ce1ffcbb..853431247 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -39,7 +39,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(trk_params.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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 sig_{'5', 'X', '\0'}; + const std::array sig_{'5', 'X', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc index 777d3cd33..810de81aa 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc @@ -37,7 +37,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( DLOG(INFO) << "role " << role; trk_params_fpga.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(trk_params_fpga.fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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 sig_{'5', 'X', '\0'}; + const std::array 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 sig_a = {'5', 'X', '\0'}; + const std::array sig_a = {'5', 'X', '\0'}; galileo_e5_a_code_gen_complex_primary(aux_code, PRN, sig_a); if (trk_params_fpga.track_pilot) diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc index bff443447..98bd40895 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc @@ -61,7 +61,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast(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(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc index 1a70c7f9d..a5bff54de 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc @@ -56,7 +56,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast(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(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc index 40086eb43..55f81fe89 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc @@ -59,7 +59,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast(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(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc index acf5fd556..41dc82b13 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc @@ -54,7 +54,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast(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(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc index bf347108a..367e31c6a 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc @@ -41,7 +41,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(trk_params.fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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 sig_{'1', 'C', '\0'}; + const std::array sig_{'1', 'C', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc index de2fc97a9..2c4f692cd 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc @@ -42,7 +42,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga( DLOG(INFO) << "role " << role; trk_params_fpga.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(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(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 sig_{'1', 'C', '\0'}; + const std::array sig_{'1', 'C', '\0'}; std::memcpy(trk_params_fpga.signal, sig_.data(), 3); // FPGA configuration parameters diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc index 893dcd31c..e177365c2 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc @@ -55,7 +55,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( float early_late_space_chips = configuration->property(role + ".early_late_space_chips", static_cast(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(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc index cd54bc27a..0ee892ea3 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc @@ -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(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); + const auto vector_length = static_cast(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") diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc index 311350b46..f75ba1d37 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc @@ -40,7 +40,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(static_cast(trk_params.fs_in) / (static_cast(GPS_L2_M_CODE_RATE_CPS) / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS)))); + const auto vector_length = static_cast(std::round(static_cast(trk_params.fs_in) / (static_cast(GPS_L2_M_CODE_RATE_CPS) / static_cast(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 sig_{'2', 'S', '\0'}; + const std::array sig_{'2', 'S', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc index 18c08d9f2..ddbdee120 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc @@ -47,7 +47,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga( DLOG(INFO) << "role " << role; trk_params_fpga.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(static_cast(trk_params_fpga.fs_in) / (static_cast(GPS_L2_M_CODE_RATE_CPS) / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS)))); + const auto vector_length = static_cast(std::round(static_cast(trk_params_fpga.fs_in) / (static_cast(GPS_L2_M_CODE_RATE_CPS) / static_cast(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 sig_{'2', 'S', '\0'}; + const std::array sig_{'2', 'S', '\0'}; std::memcpy(trk_params_fpga.signal, sig_.data(), 3); // FPGA configuration parameters diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc index 21bbf816f..7a331243c 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc @@ -40,7 +40,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( DLOG(INFO) << "role " << role; trk_params.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(static_cast(trk_params.fs_in) / (static_cast(GPS_L5I_CODE_RATE_CPS) / static_cast(GPS_L5I_CODE_LENGTH_CHIPS)))); + const auto vector_length = static_cast(std::round(static_cast(trk_params.fs_in) / (static_cast(GPS_L5I_CODE_RATE_CPS) / static_cast(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 sig_{'L', '5', '\0'}; + const std::array sig_{'L', '5', '\0'}; std::memcpy(trk_params.signal, sig_.data(), 3); // ################# Make a GNU Radio Tracking block object ################ diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc index 4649968c7..4cbeb49a3 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc @@ -44,7 +44,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( DLOG(INFO) << "role " << role; trk_params_fpga.SetFromConfiguration(configuration, role); - auto vector_length = static_cast(std::round(static_cast(trk_params_fpga.fs_in) / (static_cast(GPS_L5I_CODE_RATE_CPS) / static_cast(GPS_L5I_CODE_LENGTH_CHIPS)))); + const auto vector_length = static_cast(std::round(static_cast(trk_params_fpga.fs_in) / (static_cast(GPS_L5I_CODE_RATE_CPS) / static_cast(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 sig_{'L', '5', '\0'}; + const std::array sig_{'L', '5', '\0'}; std::memcpy(trk_params_fpga.signal, sig_.data(), 3); // FPGA configuration parameters