From e80122f4ffb1881570f0bf94ff89401d11ee09fd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Sep 2019 08:56:37 +0200 Subject: [PATCH] Apply clang tidy checks and clang-format --- .clang-format | 2 +- .../PVT/gnuradio_blocks/rtklib_pvt_gs.h | 6 ++-- src/algorithms/PVT/libs/ls_pvt.cc | 8 ++--- src/algorithms/PVT/libs/pvt_solution.cc | 6 ++-- src/algorithms/PVT/libs/rtklib_solver.cc | 2 +- src/algorithms/PVT/libs/rtklib_solver.h | 2 +- ...lileo_e1_pcps_8ms_ambiguous_acquisition.cc | 2 +- .../galileo_e1_pcps_ambiguous_acquisition.cc | 4 +-- ...eo_e1_pcps_cccwsr_ambiguous_acquisition.cc | 2 +- ...ileo_e1_pcps_tong_ambiguous_acquisition.cc | 2 +- ...ileo_e5a_noncoherent_iq_acquisition_caf.cc | 2 +- .../adapters/galileo_e5a_pcps_acquisition.cc | 6 ++-- .../adapters/gps_l1_ca_pcps_acquisition.cc | 4 +-- ...gps_l1_ca_pcps_acquisition_fine_doppler.cc | 2 +- .../gps_l1_ca_pcps_opencl_acquisition.cc | 2 +- .../gps_l1_ca_pcps_quicksync_acquisition.cc | 2 +- .../gps_l1_ca_pcps_tong_acquisition.cc | 2 +- .../adapters/gps_l2_m_pcps_acquisition.cc | 4 +-- .../adapters/gps_l5i_pcps_acquisition.cc | 4 +-- .../adapters/gps_l5i_pcps_acquisition_fpga.cc | 2 +- ...o_e5a_noncoherent_iq_acquisition_caf_cc.cc | 8 ++--- ...eo_e5a_noncoherent_iq_acquisition_caf_cc.h | 6 ++-- .../galileo_pcps_8ms_acquisition_cc.cc | 12 +++---- .../galileo_pcps_8ms_acquisition_cc.h | 6 ++-- .../pcps_assisted_acquisition_cc.cc | 12 +++---- .../pcps_assisted_acquisition_cc.h | 6 ++-- .../pcps_cccwsr_acquisition_cc.cc | 12 +++---- .../pcps_cccwsr_acquisition_cc.h | 6 ++-- .../pcps_quicksync_acquisition_cc.cc | 12 +++---- .../pcps_quicksync_acquisition_cc.h | 6 ++-- .../pcps_tong_acquisition_cc.cc | 12 +++---- .../pcps_tong_acquisition_cc.h | 6 ++-- .../acquisition/libs/fpga_acquisition.cc | 2 +- src/algorithms/channel/adapters/channel.cc | 12 +++---- src/algorithms/channel/libs/channel_fsm.h | 6 ++-- .../channel/libs/channel_msg_receiver_cc.h | 6 ++-- .../adapters/array_signal_conditioner.h | 2 +- .../conditioner/adapters/signal_conditioner.h | 2 +- .../interleaved_byte_to_complex_byte.h | 2 +- .../input_filter/gnuradio_blocks/beamformer.h | 6 ++-- src/algorithms/libs/geofunctions.h | 6 ++-- src/algorithms/libs/opencl/cl.hpp | 6 ++-- src/algorithms/libs/opencl/fft_execute.cc | 6 ++-- .../libs/opencl/fft_kernelstring.cc | 32 +++++++++++++------ src/algorithms/libs/opencl/fft_setup.cc | 5 +-- src/algorithms/libs/rtklib/rtklib_solution.cc | 2 +- .../gnuradio_blocks/hybrid_observables_gs.cc | 4 +-- .../gnuradio_blocks/hybrid_observables_gs.h | 6 ++-- .../direct_resampler_conditioner_cb.h | 6 ++-- .../direct_resampler_conditioner_cc.h | 6 ++-- .../direct_resampler_conditioner_cs.h | 6 ++-- .../gnuradio_blocks/signal_generator_c.cc | 4 +-- .../gnuradio_blocks/signal_generator_c.h | 14 ++++---- .../adapters/ad9361_fpga_signal_source.cc | 6 +--- .../adapters/file_signal_source.cc | 2 +- .../multichannel_file_signal_source.cc | 2 +- .../adapters/nsr_file_signal_source.cc | 2 +- .../adapters/spir_file_signal_source.cc | 2 +- .../two_bit_cpx_file_signal_source.cc | 2 +- .../two_bit_packed_file_signal_source.cc | 2 +- .../signal_source/libs/ad9361_manager.h | 6 +--- .../beidou_b1i_telemetry_decoder_gs.h | 6 ++-- .../beidou_b3i_telemetry_decoder_gs.h | 6 ++-- .../galileo_telemetry_decoder_gs.h | 6 ++-- .../glonass_l1_ca_telemetry_decoder_gs.h | 6 ++-- .../glonass_l2_ca_telemetry_decoder_gs.h | 6 ++-- .../gps_l1_ca_telemetry_decoder_gs.h | 6 ++-- .../gps_l2c_telemetry_decoder_gs.h | 6 ++-- .../gps_l5_telemetry_decoder_gs.h | 6 ++-- .../sbas_l1_telemetry_decoder_gs.h | 6 ++-- .../adapters/gps_l2_m_dll_pll_tracking.h | 6 ++-- .../gnuradio_blocks/dll_pll_veml_tracking.h | 6 ++-- .../dll_pll_veml_tracking_fpga.cc | 4 +-- .../dll_pll_veml_tracking_fpga.h | 6 ++-- .../galileo_e1_tcp_connector_tracking_cc.cc | 4 +-- .../galileo_e1_tcp_connector_tracking_cc.h | 6 ++-- ...glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 6 ++-- .../glonass_l1_ca_dll_pll_c_aid_tracking_cc.h | 6 ++-- ...glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 8 ++--- .../glonass_l1_ca_dll_pll_c_aid_tracking_sc.h | 6 ++-- .../glonass_l1_ca_dll_pll_tracking_cc.cc | 4 +-- .../glonass_l1_ca_dll_pll_tracking_cc.h | 6 ++-- ...glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc | 6 ++-- .../glonass_l2_ca_dll_pll_c_aid_tracking_cc.h | 6 ++-- ...glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc | 8 ++--- .../glonass_l2_ca_dll_pll_c_aid_tracking_sc.h | 6 ++-- .../glonass_l2_ca_dll_pll_tracking_cc.cc | 4 +-- .../glonass_l2_ca_dll_pll_tracking_cc.h | 6 ++-- .../gps_l1_ca_dll_pll_tracking_gpu_cc.h | 6 ++-- .../gps_l1_ca_kf_tracking_cc.cc | 4 +-- .../gps_l1_ca_kf_tracking_cc.h | 6 ++-- .../gps_l1_ca_tcp_connector_tracking_cc.cc | 4 +-- .../gps_l1_ca_tcp_connector_tracking_cc.h | 6 ++-- .../tracking/libs/fpga_multicorrelator.cc | 14 ++++---- .../tracking/libs/fpga_multicorrelator.h | 6 ++-- .../tracking/libs/tracking_discriminators.h | 4 ++- src/core/libs/INIReader.h | 6 ++-- src/core/libs/channel_event.h | 6 ++-- src/core/libs/channel_status_msg_receiver.h | 6 ++-- src/core/libs/command_event.h | 6 ++-- src/core/libs/gnss_sdr_sample_counter.h | 2 +- src/core/libs/gnss_sdr_supl_client.h | 2 +- src/core/libs/gnss_sdr_time_counter.h | 2 +- src/core/libs/string_converter.h | 2 +- src/core/receiver/concurrent_map.h | 6 ++-- src/core/receiver/concurrent_queue.h | 7 ++-- src/core/receiver/control_thread.cc | 2 +- src/core/receiver/control_thread.h | 2 +- src/core/receiver/file_configuration.h | 2 +- src/core/receiver/gnss_flowgraph.cc | 16 +++++----- src/core/receiver/gnss_flowgraph.h | 2 +- src/core/receiver/in_memory_configuration.h | 2 +- src/core/receiver/tcp_cmd_interface.h | 2 +- .../beidou_dnav_navigation_message.cc | 6 ++-- .../gps_navigation_message.cc | 2 +- .../libs/rtklib_solver_dump_reader.h | 6 ++-- .../libs/spirent_motion_csv_dump_reader.h | 6 ++-- .../gps_l1_ca_pcps_acquisition_test.cc | 8 ++--- .../libs/acquisition_dump_reader.h | 6 ++-- .../libs/acquisition_msg_rx.cc | 2 +- .../libs/acquisition_msg_rx.h | 6 ++-- .../libs/observables_dump_reader.h | 6 ++-- .../libs/tlm_dump_reader.h | 6 ++-- .../libs/tracking_dump_reader.h | 6 ++-- .../libs/tracking_true_obs_reader.h | 6 ++-- .../libs/true_observables_reader.h | 6 ++-- .../tracking/bayesian_estimation_test.cc | 2 +- .../tracking/cpu_multicorrelator_test.cc | 2 +- .../tracking/cubature_filter_test.cc | 2 +- .../gps_l1_ca_dll_pll_tracking_test_fpga.cc | 6 ++-- .../tracking/unscented_filter_test.cc | 2 +- src/utils/front-end-cal/main.cc | 4 +-- 132 files changed, 359 insertions(+), 347 deletions(-) diff --git a/.clang-format b/.clang-format index f13c68662..24899e353 100644 --- a/.clang-format +++ b/.clang-format @@ -53,7 +53,7 @@ IncludeCategories: Priority: 1 - Regex: '^.*(boost|gflags|glog|gnsssdr|gnuradio|gpstk|gsl|gtest|pmt|uhd|volk)/' Priority: 2 - - Regex: '^.*(armadillo|matio|pugixml)' + - Regex: '^.*(armadillo|iio|matio|pugixml)' Priority: 2 - Regex: '.*' Priority: 3 diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index 1956923a7..d0f4701ed 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_RTKLIB_PVT_GS_H -#define GNSS_SDR_RTKLIB_PVT_GS_H +#ifndef GNSS_SDR_RTKLIB_PVT_GS_H_ +#define GNSS_SDR_RTKLIB_PVT_GS_H_ #include "gnss_synchro.h" #include "rtklib.h" @@ -252,4 +252,4 @@ private: boost::posix_time::time_duration d_utc_diff_time; }; -#endif +#endif // GNSS_SDR_RTKLIB_PVT_GS_H_ diff --git a/src/algorithms/PVT/libs/ls_pvt.cc b/src/algorithms/PVT/libs/ls_pvt.cc index cf93924be..3b3975894 100644 --- a/src/algorithms/PVT/libs/ls_pvt.cc +++ b/src/algorithms/PVT/libs/ls_pvt.cc @@ -224,7 +224,7 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs, // --- Correct satellite position (do to earth rotation) ------- Rot_X = Ls_Pvt::rotateSatellite(traveltime, X.col(i)); // armadillo - //--- Find DOA and range of satellites + // -- Find DOA and range of satellites double* azim = nullptr; double* elev = nullptr; double* dist = nullptr; @@ -254,7 +254,7 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs, // --- Apply the corrections ---------------------------------------- omc(i) = (obs(i) - norm(Rot_X - pos.subvec(0, 2), 2) - pos(3) - trop); // Armadillo - //--- Construct the A matrix --------------------------------------- + // -- Construct the A matrix --------------------------------------- // Armadillo A(i, 0) = (-(Rot_X(0) - pos(0))) / obs(i); A(i, 1) = (-(Rot_X(1) - pos(1))) / obs(i); @@ -262,10 +262,10 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs, A(i, 3) = 1.0; } - //--- Find position update --------------------------------------------- + // -- Find position update --------------------------------------------- x = arma::solve(w * A, w * omc); // Armadillo - //--- Apply position update -------------------------------------------- + // -- Apply position update -------------------------------------------- pos = pos + x; if (arma::norm(x, 2) < 1e-4) { diff --git a/src/algorithms/PVT/libs/pvt_solution.cc b/src/algorithms/PVT/libs/pvt_solution.cc index 4b7e33625..b61f985e7 100644 --- a/src/algorithms/PVT/libs/pvt_solution.cc +++ b/src/algorithms/PVT/libs/pvt_solution.cc @@ -70,16 +70,16 @@ arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec * X_sat_rot - rotated satellite's coordinates (ECEF) */ - //--- Find rotation angle -------------------------------------------------- + // -- Find rotation angle -------------------------------------------------- double omegatau; omegatau = OMEGA_EARTH_DOT * traveltime; - //--- Build a rotation matrix ---------------------------------------------- + // -- Build a rotation matrix ---------------------------------------------- arma::mat R3 = {{cos(omegatau), sin(omegatau), 0.0}, {-sin(omegatau), cos(omegatau), 0.0}, {0.0, 0.0, 1.0}}; - //--- Do the rotation ------------------------------------------------------ + // -- Do the rotation ------------------------------------------------------ arma::vec X_sat_rot; X_sat_rot = R3 * X_sat; return X_sat_rot; diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index a3e3f4dd9..a6183d854 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -91,7 +91,7 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, const std::string &dump_filename, bo { // init empty ephemeris for all the available GNSS channels d_nchannels = nchannels; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_flag_dump_enabled = flag_dump_to_file; d_flag_dump_mat_enabled = flag_dump_to_mat; this->set_averaging_flag(false); diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h index b3ffc17f5..75e631936 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.h +++ b/src/algorithms/PVT/libs/rtklib_solver.h @@ -139,4 +139,4 @@ private: bool save_matfile(); }; -#endif +#endif // GNSS_SDR_RTKLIB_SOLVER_H_ diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc index c29c9e78f..a1acb8bbb 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc @@ -79,7 +79,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code (4 ms) ----------------- + // -- Find number of samples per spreading code (4 ms) ----------------- code_length_ = round( fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)); diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 97b537f34..deedb672a 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -107,14 +107,14 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( acq_parameters_.resampler_ratio = decimation; acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast(acq_parameters_.resampler_ratio); } - //--- Find number of samples per spreading code (4 ms) ----------------- + // -- Find number of samples per spreading code (4 ms) ----------------- code_length_ = static_cast(std::floor(static_cast(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast(acq_parameters_.resampled_fs))); } else { - //--- Find number of samples per spreading code (4 ms) ----------------- + // -- Find number of samples per spreading code (4 ms) ----------------- code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast(acq_parameters_.fs_in))); diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc index 5a4da4eac..88cace197 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc @@ -77,7 +77,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code (4 ms) ----------------- + // -- Find number of samples per spreading code (4 ms) ----------------- code_length_ = round( fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)); diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc index c9c3f8a19..fba4d7940 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc @@ -81,7 +81,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code (4 ms) ----------------- + // -- Find number of samples per spreading code (4 ms) ----------------- code_length_ = round( fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)); diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc index e39b1cedf..a6a1db920 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc @@ -89,7 +89,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); - //--- Find number of samples per spreading code (1ms)------------------------- + // -- Find number of samples per spreading code (1ms)------------------------- code_length_ = round(static_cast(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast(GALILEO_E5A_CODE_LENGTH_CHIPS)); vector_length_ = code_length_ * sampled_ms_; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index 289967b11..aafdcc6ae 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -105,7 +105,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast(acq_parameters_.resampler_ratio); } - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast(acq_parameters_.resampled_fs))); @@ -113,13 +113,13 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con else { acq_parameters_.resampled_fs = fs_in_; - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast(acq_parameters_.fs_in))); } - //--- Find number of samples per spreading code (1ms)------------------------- + // -- Find number of samples per spreading code (1ms)------------------------- code_length_ = static_cast(std::round(static_cast(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast(GALILEO_E5A_CODE_LENGTH_CHIPS))); vector_length_ = code_length_ * sampled_ms_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index a56b9667e..7e85ad3c6 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -107,7 +107,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( acq_parameters_.resampler_ratio = decimation; acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast(acq_parameters_.resampler_ratio); } - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(acq_parameters_.resampled_fs) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast(acq_parameters_.resampled_fs))); @@ -115,7 +115,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( else { acq_parameters_.resampled_fs = fs_in_; - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast(acq_parameters_.fs_in))); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 25e6fa78f..dc9da15ea 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -77,7 +77,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( acq_parameters.blocking_on_standby = configuration->property(role + ".blocking_on_standby", false); - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)); acq_parameters.samples_per_ms = vector_length_; code_ = std::vector>(vector_length_); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc index 1d2b23951..96c93cb54 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.cc @@ -80,7 +80,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)); vector_length_ = code_length_ * sampled_ms_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc index 327f5d024..2cb0ebe75 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc @@ -65,7 +65,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( } sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)); /* Calculate the folding factor value based on the calculations */ diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc index 604078867..db3765b3c 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc @@ -71,7 +71,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)); vector_length_ = code_length_ * sampled_ms_; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index be9738352..524f58a3e 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -111,7 +111,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast(acq_parameters_.resampler_ratio); } - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(acq_parameters_.resampled_fs) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GPS_L2_M_CODE_RATE_CPS) * static_cast(acq_parameters_.resampled_fs))); @@ -119,7 +119,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( else { acq_parameters_.resampled_fs = fs_in_; - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GPS_L2_M_CODE_RATE_CPS) * static_cast(acq_parameters_.fs_in))); diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 2e4479feb..3ba8c2a98 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -118,7 +118,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast(acq_parameters_.resampler_ratio); } - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast(acq_parameters_.resampled_fs))); @@ -126,7 +126,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( else { acq_parameters_.resampled_fs = fs_in_; - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS))); acq_parameters_.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters_.samples_per_chip = static_cast(ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast(acq_parameters_.fs_in))); diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc index 91d71bac7..15e615624 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc @@ -78,7 +78,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1); acq_parameters.sampled_ms = sampled_ms; - //--- Find number of samples per spreading code ------------------------- + // -- Find number of samples per spreading code ------------------------- auto code_length = static_cast(std::round(static_cast(fs_in) / (GPS_L5I_CODE_RATE_CPS / static_cast(GPS_L5I_CODE_LENGTH_CHIPS)))); acq_parameters.code_length = code_length; // The FPGA can only use FFT lengths that are a power of two. diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc index 230027747..6ec7a671c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc @@ -52,14 +52,14 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename, + const std::string &dump_filename, bool both_signal_components_, int CAF_window_hz_, int Zero_padding_) { return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr( new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, - samples_per_code, bit_transition_flag, dump, std::move(dump_filename), both_signal_components_, CAF_window_hz_, Zero_padding_)); + samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_)); } @@ -72,7 +72,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename, + const std::string &dump_filename, bool both_signal_components_, int CAF_window_hz_, int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc", @@ -136,7 +136,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h index 9163f38a4..b4ea6def2 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h @@ -60,7 +60,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename, + const std::string& dump_filename, bool both_signal_components_, int CAF_window_hz_, int Zero_padding_); @@ -186,7 +186,7 @@ private: int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename, + const std::string& dump_filename, bool both_signal_components_, int CAF_window_hz_, int Zero_padding_); @@ -198,7 +198,7 @@ private: int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename, + const std::string& dump_filename, bool both_signal_components_, int CAF_window_hz_, int Zero_padding_); diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc index e53cddc4d..bc8b5e5d1 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc @@ -46,11 +46,11 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc( int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, - bool dump, std::string dump_filename) + bool dump, const std::string &dump_filename) { return galileo_pcps_8ms_acquisition_cc_sptr( new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, - samples_per_code, dump, std::move(dump_filename))); + samples_per_code, dump, dump_filename)); } @@ -62,9 +62,9 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + const std::string &dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER @@ -94,7 +94,7 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h index 31d52a9a6..4e418800d 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h @@ -55,7 +55,7 @@ galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms, int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename); + const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition for @@ -177,7 +177,7 @@ private: int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename); + const std::string& dump_filename); galileo_pcps_8ms_acquisition_cc( uint32_t sampled_ms, @@ -187,7 +187,7 @@ private: int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename); + const std::string& dump_filename); void calculate_magnitudes( gr_complex* fft_begin, diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc index 8d66efdf9..6cd0b721f 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc @@ -50,20 +50,20 @@ extern Concurrent_Map global_gps_acq_assist_map; pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t samples_per_ms, bool dump, - std::string dump_filename) + const std::string &dump_filename) { return pcps_assisted_acquisition_cc_sptr( new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, - fs_in, samples_per_ms, dump, std::move(dump_filename))); + fs_in, samples_per_ms, dump, dump_filename)); } pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t samples_per_ms, bool dump, - std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex)), - gr::io_signature::make(0, 0, sizeof(gr_complex))) + const std::string &dump_filename) : gr::block("pcps_assisted_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex)), + gr::io_signature::make(0, 0, sizeof(gr_complex))) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER @@ -90,7 +90,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h index 9a5c8111c..4069a8626 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h @@ -70,7 +70,7 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( int32_t doppler_min, int64_t fs_in, int32_t samples_per_ms, - bool dump, std::string dump_filename); + bool dump, const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition. @@ -181,12 +181,12 @@ private: pcps_make_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t samples_per_ms, bool dump, - std::string dump_filename); + const std::string& dump_filename); pcps_assisted_acquisition_cc(int32_t max_dwells, uint32_t sampled_ms, int32_t doppler_max, int32_t doppler_min, int64_t fs_in, int32_t samples_per_ms, bool dump, - std::string dump_filename); + const std::string& dump_filename); void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc index 39fc2f4a0..ff909f2d9 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc @@ -52,11 +52,11 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, - bool dump, std::string dump_filename) + bool dump, const std::string &dump_filename) { return pcps_cccwsr_acquisition_cc_sptr( new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, - samples_per_ms, samples_per_code, dump, std::move(dump_filename))); + samples_per_ms, samples_per_code, dump, dump_filename)); } @@ -68,9 +68,9 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + const std::string &dump_filename) : gr::block("pcps_cccwsr_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER @@ -104,7 +104,7 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h index f7610c1d8..72d2de517 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h @@ -61,7 +61,7 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( int32_t samples_per_ms, int32_t samples_per_code, bool dump, - std::string dump_filename); + const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition with @@ -179,12 +179,12 @@ private: pcps_cccwsr_make_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, uint32_t doppler_max, int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, - bool dump, std::string dump_filename); + bool dump, const std::string& dump_filename); pcps_cccwsr_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, uint32_t doppler_max, int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, - bool dump, std::string dump_filename); + bool dump, const std::string& dump_filename); void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index 5dc389af8..6a469dc0e 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -50,7 +50,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( int32_t samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename) + const std::string& dump_filename) { return pcps_quicksync_acquisition_cc_sptr( new pcps_quicksync_acquisition_cc( @@ -59,7 +59,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( fs_in, samples_per_ms, samples_per_code, bit_transition_flag, - dump, std::move(dump_filename))); + dump, dump_filename)); } @@ -70,9 +70,9 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( int32_t samples_per_ms, int32_t samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc", - gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), - gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) + const std::string& dump_filename) : gr::block("pcps_quicksync_acquisition_cc", + gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), + gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER @@ -112,7 +112,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_code_folded = std::vector(d_fft_size, lv_cmake(0.0F, 0.0F)); d_signal_folded.reserve(d_fft_size); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h index 7a414ed62..9d658cde4 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h @@ -79,7 +79,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( int32_t samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition with @@ -202,7 +202,7 @@ private: int32_t samples_per_ms, int32_t samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); pcps_quicksync_acquisition_cc(uint32_t folding_factor, uint32_t sampled_ms, uint32_t max_dwells, @@ -210,7 +210,7 @@ private: int32_t samples_per_ms, int32_t samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc index fc249cf65..cdb0254b6 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -68,11 +68,11 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( uint32_t tong_init_val, uint32_t tong_max_val, uint32_t tong_max_dwells, - bool dump, std::string dump_filename) + bool dump, const std::string &dump_filename) { return pcps_tong_acquisition_cc_sptr( new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code, - tong_init_val, tong_max_val, tong_max_dwells, dump, std::move(dump_filename))); + tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename)); } @@ -86,9 +86,9 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( uint32_t tong_max_val, uint32_t tong_max_dwells, bool dump, - std::string dump_filename) : gr::block("pcps_tong_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + const std::string &dump_filename) : gr::block("pcps_tong_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER @@ -120,7 +120,7 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h index 32734729e..c37c61dc7 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h @@ -77,7 +77,7 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( uint32_t tong_max_val, uint32_t tong_max_dwells, bool dump, - std::string dump_filename); + const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition with @@ -195,13 +195,13 @@ private: int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, uint32_t tong_init_val, uint32_t tong_max_val, uint32_t tong_max_dwells, - bool dump, std::string dump_filename); + bool dump, const std::string& dump_filename); pcps_tong_acquisition_cc(uint32_t sampled_ms, uint32_t doppler_max, int64_t fs_in, int32_t samples_per_ms, int32_t samples_per_code, uint32_t tong_init_val, uint32_t tong_max_val, uint32_t tong_max_dwells, - bool dump, std::string dump_filename); + bool dump, const std::string& dump_filename); void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.cc b/src/algorithms/acquisition/libs/fpga_acquisition.cc index 92a9edef2..00c176730 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.cc +++ b/src/algorithms/acquisition/libs/fpga_acquisition.cc @@ -211,7 +211,7 @@ void Fpga_Acquisition::configure_acquisition() d_map_base[0] = d_select_queue; d_map_base[1] = d_vector_length; d_map_base[2] = d_nsamples; - d_map_base[7] = static_cast(log2(static_cast(d_vector_length))); // log2 FFTlength + d_map_base[7] = static_cast(std::log2(static_cast(d_vector_length))); // log2 FFTlength d_map_base[12] = d_excludelimit; } diff --git a/src/algorithms/channel/adapters/channel.cc b/src/algorithms/channel/adapters/channel.cc index 808f6e871..e3407bfa1 100644 --- a/src/algorithms/channel/adapters/channel.cc +++ b/src/algorithms/channel/adapters/channel.cc @@ -44,13 +44,13 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, const const std::shared_ptr& trk, const std::shared_ptr& nav, const std::string& role, const std::string& implementation, const std::shared_ptr >& queue) { - acq_ = std::move(acq); - trk_ = std::move(trk); - nav_ = std::move(nav); - role_ = std::move(role); - implementation_ = std::move(implementation); + acq_ = acq; + trk_ = trk; + nav_ = nav; + role_ = role; + implementation_ = implementation; channel_ = channel; - queue_ = std::move(queue); + queue_ = queue; channel_fsm_ = std::make_shared(); flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false); diff --git a/src/algorithms/channel/libs/channel_fsm.h b/src/algorithms/channel/libs/channel_fsm.h index 03864861a..d03f93323 100644 --- a/src/algorithms/channel/libs/channel_fsm.h +++ b/src/algorithms/channel/libs/channel_fsm.h @@ -30,8 +30,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CHANNEL_FSM_H -#define GNSS_SDR_CHANNEL_FSM_H +#ifndef GNSS_SDR_CHANNEL_FSM_H_ +#define GNSS_SDR_CHANNEL_FSM_H_ #include "acquisition_interface.h" #include "concurrent_queue.h" @@ -83,4 +83,4 @@ private: std::mutex mx; }; -#endif // GNSS_SDR_CHANNEL_FSM_H +#endif // GNSS_SDR_CHANNEL_FSM_H_ diff --git a/src/algorithms/channel/libs/channel_msg_receiver_cc.h b/src/algorithms/channel/libs/channel_msg_receiver_cc.h index 7f1fa7975..a8d80f739 100644 --- a/src/algorithms/channel/libs/channel_msg_receiver_cc.h +++ b/src/algorithms/channel/libs/channel_msg_receiver_cc.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H -#define GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H +#ifndef GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H_ +#define GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H_ #include "channel_fsm.h" #include @@ -58,4 +58,4 @@ private: void msg_handler_events(pmt::pmt_t msg); }; -#endif +#endif // GNSS_SDR_CHANNEL_MSG_RECEIVER_CC_H_ diff --git a/src/algorithms/conditioner/adapters/array_signal_conditioner.h b/src/algorithms/conditioner/adapters/array_signal_conditioner.h index 14263ceef..4a3812356 100644 --- a/src/algorithms/conditioner/adapters/array_signal_conditioner.h +++ b/src/algorithms/conditioner/adapters/array_signal_conditioner.h @@ -81,4 +81,4 @@ private: bool connected_; }; -#endif /*GNSS_SDR_SIGNAL_CONDITIONER_H_*/ +#endif // GNSS_SDR_SIGNAL_CONDITIONER_H_ diff --git a/src/algorithms/conditioner/adapters/signal_conditioner.h b/src/algorithms/conditioner/adapters/signal_conditioner.h index 86378b6c2..2a11545c8 100644 --- a/src/algorithms/conditioner/adapters/signal_conditioner.h +++ b/src/algorithms/conditioner/adapters/signal_conditioner.h @@ -79,4 +79,4 @@ private: bool connected_; }; -#endif /*GNSS_SDR_SIGNAL_CONDITIONER_H_*/ +#endif // GNSS_SDR_SIGNAL_CONDITIONER_H_ diff --git a/src/algorithms/data_type_adapter/gnuradio_blocks/interleaved_byte_to_complex_byte.h b/src/algorithms/data_type_adapter/gnuradio_blocks/interleaved_byte_to_complex_byte.h index 9c3ba3a94..87ff4ab78 100644 --- a/src/algorithms/data_type_adapter/gnuradio_blocks/interleaved_byte_to_complex_byte.h +++ b/src/algorithms/data_type_adapter/gnuradio_blocks/interleaved_byte_to_complex_byte.h @@ -57,4 +57,4 @@ private: interleaved_byte_to_complex_byte(); }; -#endif +#endif // GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_BYTE_H_ diff --git a/src/algorithms/input_filter/gnuradio_blocks/beamformer.h b/src/algorithms/input_filter/gnuradio_blocks/beamformer.h index bd417818a..9c5e65f16 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/beamformer.h +++ b/src/algorithms/input_filter/gnuradio_blocks/beamformer.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_BEAMFORMER_H -#define GNSS_SDR_BEAMFORMER_H +#ifndef GNSS_SDR_BEAMFORMER_H_ +#define GNSS_SDR_BEAMFORMER_H_ #include #include @@ -58,4 +58,4 @@ private: std::vector weight_vector = std::vector(GNSS_SDR_BEAMFORMER_CHANNELS, gr_complex(1.0, 0.0)); }; -#endif +#endif // GNSS_SDR_BEAMFORMER_H_ diff --git a/src/algorithms/libs/geofunctions.h b/src/algorithms/libs/geofunctions.h index 9aaf68387..3f18dde79 100644 --- a/src/algorithms/libs/geofunctions.h +++ b/src/algorithms/libs/geofunctions.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GEOFUNCTIONS_H -#define GNSS_SDR_GEOFUNCTIONS_H +#ifndef GNSS_SDR_GEOFUNCTIONS_H_ +#define GNSS_SDR_GEOFUNCTIONS_H_ #if ARMA_NO_BOUND_CHECKING #define ARMA_NO_DEBUG 1 @@ -185,4 +185,4 @@ double clsin(const arma::colvec &ar, int degree, double argument); */ void clksin(const arma::colvec &ar, int degree, double arg_real, double arg_imag, double *re, double *im); -#endif +#endif // GNSS_SDR_GEOFUNCTIONS_H_ diff --git a/src/algorithms/libs/opencl/cl.hpp b/src/algorithms/libs/opencl/cl.hpp index 39e96f46b..c6bfebc45 100644 --- a/src/algorithms/libs/opencl/cl.hpp +++ b/src/algorithms/libs/opencl/cl.hpp @@ -7809,7 +7809,7 @@ public: } }; -//------------------------------------------------------------------------------------------------------ +// ----------------------------------------------------------------------------------------------------- template < @@ -12904,7 +12904,7 @@ struct functionImplementation_ 1) @@ -446,7 +447,10 @@ static int insertGlobalStoresAndTranspose(string &kernelString, int N, int maxRadix, int Nr, int numWorkItemsPerXForm, int numXFormsPerWG, int mem_coalesce_width, clFFT_DataFormat dataFormat) { int groupSize = numWorkItemsPerXForm * numXFormsPerWG; - int i, j, k, ind; + int i; + int j; + int k; + int ind; int lMemSize = 0; int numIter = maxRadix / Nr; string indent = string(""); @@ -597,7 +601,8 @@ insertfftKernel(string &kernelString, int Nr, int numIter) static void insertTwiddleKernel(string &kernelString, int Nr, int numIter, int Nprev, int len, int numWorkItemsPerXForm) { - int z, k; + int z; + int k; int logNPrev = (int)log2(Nprev); for (z = 0; z < numIter; z++) @@ -662,7 +667,8 @@ getPadding(int numWorkItemsPerXForm, int Nprev, int numWorkItemsReq, int numXFor static void insertLocalStores(string &kernelString, int numIter, int Nr, int numWorkItemsPerXForm, int numWorkItemsReq, int offset, string &comp) { - int z, k; + int z; + int k; for (z = 0; z < numIter; z++) { @@ -787,8 +793,10 @@ createLocalMemfftKernelString(cl_fft_plan *plan) } assert(tmpLen == n && "product of radices choosen doesnt match the length of signal\n"); - int offset, midPad; - string localString(""), kernelName(""); + int offset; + int midPad; + string localString(""); + string kernelName(""); clFFT_DataFormat dataFormat = plan->format; string *kernelString = plan->kernel_string; @@ -938,11 +946,16 @@ void getGlobalRadixInfo(int n, int *radix, int *R1, int *R2, int *numRadices) static void createGlobalFFTKernelString(cl_fft_plan *plan, int n, int BS, cl_fft_kernel_dir dir, int vertBS) { - int i, j, k, t; + int i; + int j; + int k; + int t; int radixArr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int R1Arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int R2Arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - int radix, R1, R2; + int radix; + int R1; + int R2; int numRadices; int maxThreadsPerBlock = plan->max_work_item_per_workgroup; @@ -955,7 +968,8 @@ createGlobalFFTKernelString(cl_fft_plan *plan, int n, int BS, cl_fft_kernel_dir int numPasses = numRadices; - string localString(""), kernelName(""); + string localString(""); + string kernelName(""); string *kernelString = plan->kernel_string; cl_fft_kernel_info **kInfo = &plan->kernel_info; int kCount = 0; diff --git a/src/algorithms/libs/opencl/fft_setup.cc b/src/algorithms/libs/opencl/fft_setup.cc index a56c05328..4649b76a3 100644 --- a/src/algorithms/libs/opencl/fft_setup.cc +++ b/src/algorithms/libs/opencl/fft_setup.cc @@ -220,7 +220,7 @@ int getMaxKernelWorkGroupSize(cl_fft_plan *plan, unsigned int *max_wg_size, unsi #define ERR_MACRO(err) \ { \ - if (err != CL_SUCCESS) \ + if ((err) != CL_SUCCESS) \ { \ if (error_code) \ *error_code = err; \ @@ -381,7 +381,8 @@ void clFFT_DestroyPlan(clFFT_Plan plan) void clFFT_DumpPlan(clFFT_Plan Plan, FILE *file) { - size_t gDim, lDim; + size_t gDim; + size_t lDim; FILE *out; if (!file) out = stdout; diff --git a/src/algorithms/libs/rtklib/rtklib_solution.cc b/src/algorithms/libs/rtklib/rtklib_solution.cc index f2fc6c702..f5cc787c9 100644 --- a/src/algorithms/libs/rtklib/rtklib_solution.cc +++ b/src/algorithms/libs/rtklib/rtklib_solution.cc @@ -62,7 +62,7 @@ /* constants and macros ------------------------------------------------------*/ #define SQR_SOL(x) ((x) < 0.0 ? -(x) * (x) : (x) * (x)) -#define SQRT_SOL(x) ((x) < 0.0 ? 0.0 : sqrt(x)) +#define SQRT_SOL(x) ((x) < 0.0 ? 0.0 : std::sqrt(x)) const int MAXFIELD = 64; /* max number of fields in a record */ diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc index 1bb373689..b09618f0f 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.cc @@ -68,7 +68,7 @@ namespace errorlib = boost::system; hybrid_observables_gs_sptr hybrid_observables_gs_make(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, const std::string &dump_filename) { - return hybrid_observables_gs_sptr(new hybrid_observables_gs(nchannels_in, nchannels_out, dump, dump_mat, std::move(dump_filename))); + return hybrid_observables_gs_sptr(new hybrid_observables_gs(nchannels_in, nchannels_out, dump, dump_mat, dump_filename)); } @@ -89,7 +89,7 @@ hybrid_observables_gs::hybrid_observables_gs(uint32_t nchannels_in, d_dump = dump; d_dump_mat = dump_mat and d_dump; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_nchannels_out = nchannels_out; d_nchannels_in = nchannels_in; d_gnss_synchro_history = std::make_shared>(1000, d_nchannels_out); diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h index aaabf4cbc..15c9ab722 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_gs.h @@ -31,8 +31,8 @@ */ -#ifndef GNSS_SDR_HYBRID_OBSERVABLES_GS_H -#define GNSS_SDR_HYBRID_OBSERVABLES_GS_H +#ifndef GNSS_SDR_HYBRID_OBSERVABLES_GS_H_ +#define GNSS_SDR_HYBRID_OBSERVABLES_GS_H_ #include // for boost::circular_buffer #include // for boost::shared_ptr @@ -105,4 +105,4 @@ private: int32_t save_matfile(); }; -#endif +#endif // GNSS_SDR_HYBRID_OBSERVABLES_GS_H_ diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.h b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.h index 2aeb7f88f..166b66d99 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.h +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cb.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H -#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H +#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H_ +#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H_ #include #include @@ -84,4 +84,4 @@ private: uint32_t d_phase_step; }; -#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */ +#endif // GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H_ diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.h b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.h index 6c8d1df1d..c368d9930 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.h +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cc.h @@ -36,8 +36,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H -#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H +#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H_ +#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H_ #include #include @@ -91,4 +91,4 @@ private: uint32_t d_phase_step; }; -#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H */ +#endif // GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H_ diff --git a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.h b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.h index d2221ee03..31229471e 100644 --- a/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.h +++ b/src/algorithms/resampler/gnuradio_blocks/direct_resampler_conditioner_cs.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H -#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H +#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H_ +#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H_ #include #include @@ -84,4 +84,4 @@ private: uint32_t d_phase_step; }; -#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */ +#endif // GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H_ diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc index 52fe907a8..df56aa9b8 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc @@ -49,12 +49,12 @@ * a boost shared_ptr. This is effectively the public constructor. */ signal_generator_c_sptr -signal_make_generator_c(std::vector signal1, std::vector system, const std::vector &PRN, +signal_make_generator_c(const std::vector &signal1, const std::vector &system, const std::vector &PRN, const std::vector &CN0_dB, const std::vector &doppler_Hz, const std::vector &delay_chips, const std::vector &delay_sec, bool data_flag, bool noise_flag, unsigned int fs_in, unsigned int vector_length, float BW_BB) { - return gnuradio::get_initial_sptr(new signal_generator_c(std::move(signal1), std::move(system), PRN, CN0_dB, doppler_Hz, delay_chips, delay_sec, + return gnuradio::get_initial_sptr(new signal_generator_c(signal1, system, PRN, CN0_dB, doppler_Hz, delay_chips, delay_sec, data_flag, noise_flag, fs_in, vector_length, BW_BB)); } diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h index 44104ecc5..ff1fb4e7c 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_SIGNAL_GENERATOR_C_H -#define GNSS_SDR_SIGNAL_GENERATOR_C_H +#ifndef GNSS_SDR_SIGNAL_GENERATOR_C_H_ +#define GNSS_SDR_SIGNAL_GENERATOR_C_H_ #include "gnss_signal.h" #include @@ -60,8 +60,8 @@ using signal_generator_c_sptr = boost::shared_ptr; * interface for creating new instances. */ signal_generator_c_sptr signal_make_generator_c( - std::vector signal1, - std::vector system, + const std::vector &signal1, + const std::vector &system, const std::vector &PRN, const std::vector &CN0_dB, const std::vector &doppler_Hz, @@ -92,8 +92,8 @@ public: private: friend signal_generator_c_sptr signal_make_generator_c( - std::vector signal1, - std::vector system, + const std::vector &signal1, + const std::vector &system, const std::vector &PRN, const std::vector &CN0_dB, const std::vector &doppler_Hz, @@ -154,4 +154,4 @@ private: std::normal_distribution normal_dist; }; -#endif /* GNSS_SDR_SIGNAL_GENERATOR_C_H */ +#endif /* GNSS_SDR_SIGNAL_GENERATOR_C_H_ */ diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc index 51188647a..1e9485b3d 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.cc @@ -36,15 +36,11 @@ #include "ad9361_manager.h" #include "configuration_interface.h" #include +#include #include #include // for cout, endl #include -#ifdef __APPLE__ -#include -#else -#include -#endif Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_stream, unsigned int out_stream, diff --git a/src/algorithms/signal_source/adapters/file_signal_source.cc b/src/algorithms/signal_source/adapters/file_signal_source.cc index 016c8e7e4..4be713d03 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/file_signal_source.cc @@ -44,7 +44,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, - const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) + const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) { std::string default_filename = "./example_capture.dat"; std::string default_item_type = "short"; diff --git a/src/algorithms/signal_source/adapters/multichannel_file_signal_source.cc b/src/algorithms/signal_source/adapters/multichannel_file_signal_source.cc index 5ee5dbc63..b50729edb 100644 --- a/src/algorithms/signal_source/adapters/multichannel_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/multichannel_file_signal_source.cc @@ -43,7 +43,7 @@ MultichannelFileSignalSource::MultichannelFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, - const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) + const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) { std::string default_filename = "./example_capture.dat"; std::string default_item_type = "short"; diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc index 03e83b229..c0430d5b0 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc @@ -44,7 +44,7 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, - const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) + const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) { std::string default_filename = "../data/my_capture.dat"; std::string default_item_type = "byte"; diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc index fa512d387..477ca811e 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc @@ -43,7 +43,7 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, - const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) + const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) { std::string default_filename = "../data/my_capture.dat"; std::string default_item_type = "int"; diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc index e23997236..c24111f6c 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc @@ -48,7 +48,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), - queue_(std::move(queue)) + queue_(queue) { std::string default_filename = "../data/my_capture.dat"; std::string default_item_type = "byte"; diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc index ef6431632..99a99bf8a 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc @@ -50,7 +50,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac const std::shared_ptr>& queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), - queue_(std::move(queue)) + queue_(queue) { std::string default_filename = "../data/my_capture.dat"; std::string default_item_type = "byte"; diff --git a/src/algorithms/signal_source/libs/ad9361_manager.h b/src/algorithms/signal_source/libs/ad9361_manager.h index f716fd287..629a30526 100644 --- a/src/algorithms/signal_source/libs/ad9361_manager.h +++ b/src/algorithms/signal_source/libs/ad9361_manager.h @@ -33,14 +33,10 @@ #ifndef GNSS_SDR_AD9361_MANAGER_H_ #define GNSS_SDR_AD9361_MANAGER_H_ +#include #include #include -#ifdef __APPLE__ -#include -#else -#include -#endif /* RX is input, TX is output */ enum iodev diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h index d39eb0108..2143dab5c 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h @@ -30,8 +30,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H_ #include "beidou_dnav_navigation_message.h" @@ -124,4 +124,4 @@ private: std::ofstream d_dump_file; }; -#endif +#endif // GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.h index b546a2eca..c2c26e2b0 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H_ #include "beidou_dnav_navigation_message.h" #include "gnss_satellite.h" @@ -121,4 +121,4 @@ private: std::ofstream d_dump_file; }; -#endif +#endif // GNSS_SDR_BEIDOU_B3I_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h index d6b81b658..ddec265ce 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h @@ -29,8 +29,8 @@ */ -#ifndef GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H_ #include "galileo_fnav_message.h" @@ -144,4 +144,4 @@ private: int32_t DataLength; }; -#endif +#endif // GNSS_SDR_GALILEO_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.h index 7faf89038..f05e28eff 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H_ #include "GLONASS_L1_L2_CA.h" @@ -123,4 +123,4 @@ private: std::ofstream d_dump_file; }; -#endif +#endif // GNSS_SDR_GLONASS_L1_CA_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.h index 712754630..2891b29c5 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H_ #include "GLONASS_L1_L2_CA.h" @@ -121,4 +121,4 @@ private: std::ofstream d_dump_file; }; -#endif +#endif // GNSS_SDR_GLONASS_L2_CA_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h index 237d9ba17..6eefc556d 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H_ #include "GPS_L1_CA.h" #include "gnss_satellite.h" @@ -117,4 +117,4 @@ private: std::ofstream d_dump_file; }; -#endif +#endif // GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.h index 36d3c917a..405e383e1 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.h @@ -27,8 +27,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H_ #include "gnss_satellite.h" @@ -102,4 +102,4 @@ private: }; -#endif +#endif // GNSS_SDR_GPS_L2C_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.h index 45e2776a0..d340cb2f2 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.h @@ -27,8 +27,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H_ #include "GPS_L5.h" // for GPS_L5I_NH_CODE_LENGTH @@ -98,4 +98,4 @@ private: }; -#endif +#endif // GNSS_SDR_GPS_L5_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.h index 4ef644719..48a52468a 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H -#define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H +#ifndef GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H_ +#define GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H_ #include "gnss_satellite.h" #include // for crc_optimal @@ -169,4 +169,4 @@ private: } d_crc_verifier; }; -#endif +#endif // GNSS_SDR_SBAS_L1_TELEMETRY_DECODER_GS_H_ diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h index 830ac73cf..33a0d1cba 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h @@ -35,8 +35,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ -#define GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ +#ifndef GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H_ +#define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H_ #include "dll_pll_veml_tracking.h" #include "tracking_interface.h" @@ -105,4 +105,4 @@ private: unsigned int out_streams_; }; -#endif // GNSS_SDR_gps_l2_m_dll_pll_tracking_H_ +#endif // GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h index df2d5319f..f79bf00dd 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_H -#define GNSS_SDR_DLL_PLL_VEML_TRACKING_H +#ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_H_ +#define GNSS_SDR_DLL_PLL_VEML_TRACKING_H_ #include "cpu_multicorrelator_real_codes.h" #include "dll_pll_conf.h" @@ -216,4 +216,4 @@ private: bool d_dump_mat; }; -#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H +#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc index 96e691a04..0caffd514 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -54,7 +54,7 @@ #include // for mp #include #include // for fill_n -#include // for fmod, round, floor +#include // for fmod, round, floor, fabs #include // for exception #include // for cout, cerr #include @@ -746,7 +746,7 @@ void dll_pll_veml_tracking_fpga::run_dll_pll() if (d_dll_filt_history.full()) { float avg_code_error_chips_s = std::accumulate(d_dll_filt_history.begin(), d_dll_filt_history.end(), 0.0) / static_cast(d_dll_filt_history.capacity()); - if (fabs(avg_code_error_chips_s) > 1.0) + if (std::fabs(avg_code_error_chips_s) > 1.0) { float carrier_doppler_error_hz = static_cast(d_signal_carrier_freq) * avg_code_error_chips_s / static_cast(d_code_chip_rate); LOG(INFO) << "Detected and corrected carrier doppler error: " << carrier_doppler_error_hz << " [Hz] on sat " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN); diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h index 002ad191d..c12618ab8 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H -#define GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H +#ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H_ +#define GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H_ #include "dll_pll_conf_fpga.h" #include "exponential_smoother.h" @@ -251,4 +251,4 @@ private: bool d_stop_tracking; }; -#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H +#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc index 54a96b3fd..4fc9b15d2 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc @@ -104,11 +104,11 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc( d_dump_filename = dump_filename; // Initialize tracking ========================================== - //--- DLL variables -------------------------------------------------------- + // -- DLL variables -------------------------------------------------------- d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) d_very_early_late_spc_chips = very_early_late_space_chips; // Define very-early-late offset (in chips) - //--- TCP CONNECTOR variables -------------------------------------------------------- + // -- TCP CONNECTOR variables -------------------------------------------------------- d_port_ch0 = port_ch0; d_port = 0; d_listen_connection = true; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h index 61862d18d..80f093a9e 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h @@ -36,8 +36,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H -#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H +#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H_ +#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H_ #include "cpu_multicorrelator.h" #include "gnss_synchro.h" @@ -185,4 +185,4 @@ private: std::string sys; }; -#endif // GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H +#endif // GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc index 1adce77af..f9bf06568 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -74,7 +74,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_cc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_cc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -94,7 +94,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(const p DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) // avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(std::move(msg)); + d_preamble_timestamp_s = pmt::to_double(msg); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -126,7 +126,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h index 1bf79e13d..4c9473a50 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.h @@ -36,8 +36,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H -#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H +#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H_ +#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H_ #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" @@ -201,4 +201,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H +#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc index c34d85d25..6c3dc8cc6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -72,7 +72,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_sc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_sc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -92,7 +92,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(const p DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) // avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(std::move(msg)); + d_preamble_timestamp_s = pmt::to_double(msg); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -122,7 +122,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== @@ -159,7 +159,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc multicorrelator_cpu_16sc.init(2 * d_correlation_length_samples, d_n_correlator_taps); - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ // define initial code frequency basis of NCO d_code_freq_chips = GLONASS_L1_CA_CODE_RATE_CPS; // define residual code phase (in chips) diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h index f7e439319..085f7b01e 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.h @@ -36,8 +36,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H -#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H +#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H_ +#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H_ #include "cpu_multicorrelator_16sc.h" #include "glonass_l1_signal_processing.h" @@ -203,4 +203,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H +#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc index f161ffbd4..f7f6a6012 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc @@ -68,7 +68,7 @@ glonass_l1_ca_dll_pll_make_tracking_cc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_tracking_cc_sptr(new Glonass_L1_Ca_Dll_Pll_Tracking_cc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips)); } @@ -98,7 +98,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_current_prn_length_samples = static_cast(d_vector_length); diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h index ccecbde5b..fd6e3cd16 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h @@ -36,8 +36,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H -#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H +#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H_ +#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H_ #include "cpu_multicorrelator.h" #include "gnss_synchro.h" @@ -168,4 +168,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H +#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc index 871f0c56e..d5eaf07a1 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc @@ -71,7 +71,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_cc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_cc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -91,7 +91,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(const p DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) // avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(std::move(msg)); + d_preamble_timestamp_s = pmt::to_double(msg); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -123,7 +123,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.h index b1e3fc7bc..81156f64f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.h @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_CC_H -#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_CC_H +#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_CC_H_ +#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_CC_H_ #include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" @@ -199,4 +199,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H +#endif // GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc index 38c46e6e5..7f357d5f6 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc @@ -70,7 +70,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_sc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_sc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -90,7 +90,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(const p DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) // avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(std::move(msg)); + d_preamble_timestamp_s = pmt::to_double(msg); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -120,7 +120,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== @@ -157,7 +157,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc multicorrelator_cpu_16sc.init(2 * d_correlation_length_samples, d_n_correlator_taps); - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ // define initial code frequency basis of NCO d_code_freq_chips = GLONASS_L2_CA_CODE_RATE_CPS; // define residual code phase (in chips) diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.h index 171059689..04cc89f9d 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.h @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H -#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H +#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H_ +#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H_ #include "cpu_multicorrelator_16sc.h" #include "glonass_l2_signal_processing.h" @@ -201,4 +201,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H +#endif // GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc index e260de31f..732b51b5b 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc @@ -68,7 +68,7 @@ glonass_l2_ca_dll_pll_make_tracking_cc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_tracking_cc_sptr(new Glonass_L2_Ca_Dll_Pll_Tracking_cc( - fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips)); + fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips)); } @@ -98,7 +98,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_current_prn_length_samples = static_cast(d_vector_length); diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.h index a9b0f499d..95bd10dfb 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.h @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H -#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H +#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H_ +#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H_ #include "cpu_multicorrelator.h" #include "gnss_synchro.h" @@ -166,4 +166,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H +#endif // GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.h index be3f1e1e1..1b12b0570 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.h @@ -33,8 +33,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H -#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H +#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H_ +#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H_ #include "cuda_multicorrelator.h" #include "gnss_synchro.h" @@ -175,4 +175,4 @@ private: std::string sys; }; -#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H +#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc index 9ed166924..d8e75cb64 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc @@ -74,7 +74,7 @@ gps_l1_ca_kf_make_tracking_cc( int32_t bce_kappa) { return gps_l1_ca_kf_tracking_cc_sptr(new Gps_L1_Ca_Kf_Tracking_cc(order, if_freq, - fs_in, vector_length, dump, std::move(dump_filename), dll_bw_hz, early_late_space_chips, + fs_in, vector_length, dump, dump_filename, dll_bw_hz, early_late_space_chips, bce_run, bce_ptrans, bce_strans, bce_nu, bce_kappa)); } @@ -115,7 +115,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc( d_if_freq = if_freq; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = std::move(dump_filename); + d_dump_filename = dump_filename; d_current_prn_length_samples = static_cast(d_vector_length); diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.h index 5317e3b91..5ee81500e 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.h @@ -37,8 +37,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H -#define GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H +#ifndef GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H_ +#define GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H_ #if ARMA_NO_BOUND_CHECKING #define ARMA_NO_DEBUG 1 @@ -223,4 +223,4 @@ private: int32_t save_matfile(); }; -#endif // GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H +#endif // GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc index a61130d40..03076a35b 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc @@ -94,10 +94,10 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc( d_vector_length = vector_length; d_dump_filename = dump_filename; - //--- DLL variables -------------------------------------------------------- + // -- DLL variables -------------------------------------------------------- d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) - //--- TCP CONNECTOR variables -------------------------------------------------------- + // -- TCP CONNECTOR variables -------------------------------------------------------- d_port_ch0 = port_ch0; d_port = 0; d_listen_connection = true; diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h index 665953cd1..482fc6d95 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H -#define GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H +#ifndef GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H_ +#define GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H_ #include "cpu_multicorrelator.h" #include "gnss_synchro.h" @@ -171,4 +171,4 @@ private: std::string sys; }; -#endif // GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H +#endif // GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_CC_H_ diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator.cc b/src/algorithms/tracking/libs/fpga_multicorrelator.cc index d878025b1..a8da466de 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator.cc +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.cc @@ -61,12 +61,12 @@ const float PHASE_CARR_MAX_DIV_PI = 683565275.5764316; // 2^(31)/pi const float TWO_PI = 6.283185307179586; Fpga_Multicorrelator_8sc::Fpga_Multicorrelator_8sc(int32_t n_correlators, - std::string device_name, int32_t device_base, int32_t *ca_codes, int32_t *data_codes, uint32_t code_length_chips, bool track_pilot, + const std::string &device_name, int32_t device_base, int32_t *ca_codes, int32_t *data_codes, uint32_t code_length_chips, bool track_pilot, uint32_t code_samples_per_chip) { d_n_correlators = n_correlators; - d_device_name = std::move(device_name); + d_device_name = device_name; d_device_base = device_base; d_track_pilot = track_pilot; d_device_descriptor = 0; @@ -329,7 +329,7 @@ void Fpga_Multicorrelator_8sc::fpga_compute_code_shift_parameters() for (uint32_t i = 0; i < d_n_correlators; i++) { - dec_part = floor(d_shifts_chips[i] - d_rem_code_phase_chips); + dec_part = std::floor(d_shifts_chips[i] - d_rem_code_phase_chips); if (dec_part < 0) { @@ -344,11 +344,11 @@ void Fpga_Multicorrelator_8sc::fpga_compute_code_shift_parameters() frac_part = frac_part + 1.0; // fmod operator does not work as in Matlab with negative numbers } - d_initial_interp_counter[i] = static_cast(floor(max_code_resampler_counter * frac_part)); + d_initial_interp_counter[i] = static_cast(std::floor(max_code_resampler_counter * frac_part)); } if (d_track_pilot) { - dec_part = floor(d_prompt_data_shift[0] - d_rem_code_phase_chips); + dec_part = std::floor(d_prompt_data_shift[0] - d_rem_code_phase_chips); if (dec_part < 0) { @@ -361,7 +361,7 @@ void Fpga_Multicorrelator_8sc::fpga_compute_code_shift_parameters() { frac_part = frac_part + 1.0; // fmod operator does not work as in Matlab with negative numbers } - d_initial_interp_counter[d_n_correlators] = static_cast(floor(max_code_resampler_counter * frac_part)); + d_initial_interp_counter[d_n_correlators] = static_cast(std::floor(max_code_resampler_counter * frac_part)); } } @@ -522,7 +522,7 @@ void Fpga_Multicorrelator_8sc::initialize_secondary_code(uint32_t secondary_code void Fpga_Multicorrelator_8sc::write_secondary_code(uint32_t secondary_code_length, std::string *secondary_code_string, uint32_t reg_addr) { - uint32_t num_words = ceil(static_cast(secondary_code_length) / secondary_code_word_size); + uint32_t num_words = std::ceil(static_cast(secondary_code_length) / secondary_code_word_size); uint32_t last_word_size = secondary_code_length % secondary_code_word_size; if (last_word_size == 0) diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator.h b/src/algorithms/tracking/libs/fpga_multicorrelator.h index a7e10fe64..a16eb8612 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator.h +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.h @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_FPGA_MULTICORRELATOR_8SC_H_ -#define GNSS_SDR_FPGA_MULTICORRELATOR_8SC_H_ +#ifndef GNSS_SDR_FPGA_MULTICORRELATOR_H_ +#define GNSS_SDR_FPGA_MULTICORRELATOR_H_ #include #include @@ -52,7 +52,7 @@ public: * \brief Constructor */ Fpga_Multicorrelator_8sc(int32_t n_correlators, - std::string device_name, + const std::string &device_name, int32_t device_base, int32_t *ca_codes, int32_t *data_codes, diff --git a/src/algorithms/tracking/libs/tracking_discriminators.h b/src/algorithms/tracking/libs/tracking_discriminators.h index 0e56869f7..350d31fd6 100644 --- a/src/algorithms/tracking/libs/tracking_discriminators.h +++ b/src/algorithms/tracking/libs/tracking_discriminators.h @@ -52,6 +52,7 @@ */ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double t1, double t2); + /* * FLL differential arctan discriminator: * \f{equation} @@ -61,11 +62,12 @@ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double */ double fll_diff_atan(gr_complex prompt_s1, gr_complex prompt_s2, double t1, double t2); + /*! \brief Phase unwrapping function, input is [rad] - * */ double phase_unwrap(double phase_rad); + /*! \brief PLL four quadrant arctan discriminator * * PLL four quadrant arctan discriminator: diff --git a/src/core/libs/INIReader.h b/src/core/libs/INIReader.h index 64b47a59e..4df9f9794 100644 --- a/src/core/libs/INIReader.h +++ b/src/core/libs/INIReader.h @@ -45,8 +45,8 @@ * ------------------------------------------------------------------------- */ -#ifndef __INIREADER_H__ -#define __INIREADER_H__ +#ifndef GNSS_SDR_INIREADER_H_ +#define GNSS_SDR_INIREADER_H_ #include #include @@ -80,4 +80,4 @@ private: const char* value); }; -#endif // __INIREADER_H__ +#endif // GNSS_SDR_INIREADER_H_ diff --git a/src/core/libs/channel_event.h b/src/core/libs/channel_event.h index 1382c5b40..d00129eb4 100644 --- a/src/core/libs/channel_event.h +++ b/src/core/libs/channel_event.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CHANNEL_EVENT_H -#define GNSS_SDR_CHANNEL_EVENT_H +#ifndef GNSS_SDR_CHANNEL_EVENT_H_ +#define GNSS_SDR_CHANNEL_EVENT_H_ #include @@ -50,4 +50,4 @@ private: Channel_Event(int channel_id_, int event_type_); }; -#endif +#endif // GNSS_SDR_CHANNEL_EVENT_H_ diff --git a/src/core/libs/channel_status_msg_receiver.h b/src/core/libs/channel_status_msg_receiver.h index 24649f61e..24381ef95 100644 --- a/src/core/libs/channel_status_msg_receiver.h +++ b/src/core/libs/channel_status_msg_receiver.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H -#define GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H +#ifndef GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H_ +#define GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H_ #include "gnss_synchro.h" #include "monitor_pvt.h" @@ -70,4 +70,4 @@ private: void msg_handler_events(const pmt::pmt_t& msg); }; -#endif +#endif // GNSS_SDR_CHANNEL_STATUS_MSG_RECEIVER_CC_H_ diff --git a/src/core/libs/command_event.h b/src/core/libs/command_event.h index 674e0ad57..333e78a4d 100644 --- a/src/core/libs/command_event.h +++ b/src/core/libs/command_event.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_COMMAND_EVENT_H -#define GNSS_SDR_COMMAND_EVENT_H +#ifndef GNSS_SDR_COMMAND_EVENT_H_ +#define GNSS_SDR_COMMAND_EVENT_H_ #include @@ -50,4 +50,4 @@ private: Command_Event(int command_id_, int event_type_); }; -#endif +#endif // GNSS_SDR_COMMAND_EVENT_H_ diff --git a/src/core/libs/gnss_sdr_sample_counter.h b/src/core/libs/gnss_sdr_sample_counter.h index 3af32d55c..572bcd552 100644 --- a/src/core/libs/gnss_sdr_sample_counter.h +++ b/src/core/libs/gnss_sdr_sample_counter.h @@ -82,4 +82,4 @@ private: bool flag_enable_send_msg; }; -#endif /*GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_*/ +#endif // GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_ diff --git a/src/core/libs/gnss_sdr_supl_client.h b/src/core/libs/gnss_sdr_supl_client.h index adf4b08e8..3f73d07e3 100644 --- a/src/core/libs/gnss_sdr_supl_client.h +++ b/src/core/libs/gnss_sdr_supl_client.h @@ -275,4 +275,4 @@ private: bool read_gal_almanac_from_gsa(const std::string& file_name); }; -#endif +#endif // GNSS_SDR_SUPL_CLIENT_H_ diff --git a/src/core/libs/gnss_sdr_time_counter.h b/src/core/libs/gnss_sdr_time_counter.h index 6f4919af6..619511e3a 100644 --- a/src/core/libs/gnss_sdr_time_counter.h +++ b/src/core/libs/gnss_sdr_time_counter.h @@ -66,4 +66,4 @@ private: friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter(); }; -#endif /*GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_*/ +#endif // GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_ diff --git a/src/core/libs/string_converter.h b/src/core/libs/string_converter.h index 2d4a63461..c478c62bf 100644 --- a/src/core/libs/string_converter.h +++ b/src/core/libs/string_converter.h @@ -57,4 +57,4 @@ public: double convert(const std::string& value, double default_value); }; -#endif /*GNSS_SDR_STRING_CONVERTER_H_*/ +#endif // GNSS_SDR_STRING_CONVERTER_H_ diff --git a/src/core/receiver/concurrent_map.h b/src/core/receiver/concurrent_map.h index 3264fd512..fc65625e7 100644 --- a/src/core/receiver/concurrent_map.h +++ b/src/core/receiver/concurrent_map.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CONCURRENT_MAP_H -#define GNSS_SDR_CONCURRENT_MAP_H +#ifndef GNSS_SDR_CONCURRENT_MAP_H_ +#define GNSS_SDR_CONCURRENT_MAP_H_ #include #include @@ -99,4 +99,4 @@ private: mutable std::mutex the_mutex; }; -#endif +#endif // GNSS_SDR_CONCURRENT_MAP_H_ diff --git a/src/core/receiver/concurrent_queue.h b/src/core/receiver/concurrent_queue.h index 04a0f1709..26ef15c3a 100644 --- a/src/core/receiver/concurrent_queue.h +++ b/src/core/receiver/concurrent_queue.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_CONCURRENT_QUEUE_H -#define GNSS_SDR_CONCURRENT_QUEUE_H +#ifndef GNSS_SDR_CONCURRENT_QUEUE_H_ +#define GNSS_SDR_CONCURRENT_QUEUE_H_ #include #include @@ -107,4 +107,5 @@ private: mutable std::mutex the_mutex; std::condition_variable the_condition_variable; }; -#endif + +#endif // GNSS_SDR_CONCURRENT_QUEUE_H_ diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 113eb8183..9cb34f999 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -107,7 +107,7 @@ ControlThread::ControlThread() ControlThread::ControlThread(const std::shared_ptr &configuration) { - configuration_ = std::move(configuration); + configuration_ = configuration; delete_configuration_ = false; restart_ = false; init(); diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h index 27cb8cef6..6e1f2ab2f 100644 --- a/src/core/receiver/control_thread.h +++ b/src/core/receiver/control_thread.h @@ -209,4 +209,4 @@ private: #endif }; -#endif /* GNSS_SDR_CONTROL_THREAD_H_ */ +#endif // GNSS_SDR_CONTROL_THREAD_H_ diff --git a/src/core/receiver/file_configuration.h b/src/core/receiver/file_configuration.h index 80fbf2303..04a647d30 100644 --- a/src/core/receiver/file_configuration.h +++ b/src/core/receiver/file_configuration.h @@ -82,4 +82,4 @@ private: int error_{}; }; -#endif /*GNSS_SDR_FILE_CONFIGURATION_H_*/ +#endif // GNSS_SDR_FILE_CONFIGURATION_H_ diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index b8ecf429f..1e91a8395 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -155,17 +155,17 @@ void GNSSFlowgraph::connect() } // Signal Source > Signal conditioner > - for (size_t i = 0; i < sig_conditioner_.size(); i++) + for (auto& sig : sig_conditioner_) { - if (configuration_->property(sig_conditioner_.at(i)->role() + ".enable_FPGA", false) == false) + if (configuration_->property(sig->role() + ".enable_FPGA", false) == false) { try { - sig_conditioner_.at(i)->connect(top_block_); + sig->connect(top_block_); } catch (const std::exception& e) { - LOG(INFO) << "Can't connect signal conditioner block " << i << " internally"; + LOG(INFO) << "Can't connect signal conditioner block internally"; LOG(ERROR) << e.what(); top_block_->disconnect_all(); return; @@ -984,15 +984,15 @@ void GNSSFlowgraph::disconnect() } // Signal Source > Signal conditioner > - for (size_t i = 0; i < sig_conditioner_.size(); i++) + for (auto& sig : sig_conditioner_) { try { - sig_conditioner_.at(i)->disconnect(top_block_); + sig->disconnect(top_block_); } catch (const std::exception& e) { - LOG(INFO) << "Can't disconnect signal conditioner block " << i << " internally: " << e.what(); + LOG(INFO) << "Can't disconnect signal conditioner block internally: " << e.what(); top_block_->disconnect_all(); return; } @@ -1451,7 +1451,7 @@ void GNSSFlowgraph::set_configuration(const std::shared_ptr split_string(const std::string& s, char delim); }; -#endif /* GNSS_SDR_GNSS_FLOWGRAPH_H_ */ +#endif // GNSS_SDR_GNSS_FLOWGRAPH_H_ diff --git a/src/core/receiver/in_memory_configuration.h b/src/core/receiver/in_memory_configuration.h index 9f883ff90..74ef2ecd2 100644 --- a/src/core/receiver/in_memory_configuration.h +++ b/src/core/receiver/in_memory_configuration.h @@ -74,4 +74,4 @@ private: std::unique_ptr converter_; }; -#endif /*GNSS_SDR_IN_MEMORY_CONFIGURATION_H_*/ +#endif // GNSS_SDR_IN_MEMORY_CONFIGURATION_H_ diff --git a/src/core/receiver/tcp_cmd_interface.h b/src/core/receiver/tcp_cmd_interface.h index dc1ff458b..a52557cfe 100644 --- a/src/core/receiver/tcp_cmd_interface.h +++ b/src/core/receiver/tcp_cmd_interface.h @@ -90,4 +90,4 @@ private: std::shared_ptr PVT_sptr_; }; -#endif /* GNSS_SDR_TCP_CMD_INTERFACE_H_ */ +#endif // GNSS_SDR_TCP_CMD_INTERFACE_H_ diff --git a/src/core/system_parameters/beidou_dnav_navigation_message.cc b/src/core/system_parameters/beidou_dnav_navigation_message.cc index b365119e1..0f0689d6e 100644 --- a/src/core/system_parameters/beidou_dnav_navigation_message.cc +++ b/src/core/system_parameters/beidou_dnav_navigation_message.cc @@ -731,7 +731,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s // Decode all 5 sub-frames switch (subframe_ID) { - //--- Decode the sub-frame id ------------------------------------------ + // -- Decode the sub-frame id ------------------------------------------ case 1: switch (page_ID) @@ -881,7 +881,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s break; - case 2: //--- It is subframe 2 ------------------- + case 2: // -- It is subframe 2 ------------------- break; @@ -893,7 +893,7 @@ int32_t Beidou_Dnav_Navigation_Message::d2_subframe_decoder(std::string const& s break; - case 5: //--- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time. + case 5: // -- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time. break; diff --git a/src/core/system_parameters/gps_navigation_message.cc b/src/core/system_parameters/gps_navigation_message.cc index d1ccc02d5..d46f175cb 100644 --- a/src/core/system_parameters/gps_navigation_message.cc +++ b/src/core/system_parameters/gps_navigation_message.cc @@ -417,7 +417,7 @@ int32_t Gps_Navigation_Message::subframe_decoder(char* subframe) } break; - case 5: //--- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time. + case 5: // -- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time. int32_t SV_data_ID_5; int32_t SV_page_5; d_TOW_SF5 = static_cast(read_navigation_unsigned(subframe_bits, TOW)); diff --git a/src/tests/system-tests/libs/rtklib_solver_dump_reader.h b/src/tests/system-tests/libs/rtklib_solver_dump_reader.h index 1c5cf18e4..118e41ce4 100644 --- a/src/tests/system-tests/libs/rtklib_solver_dump_reader.h +++ b/src/tests/system-tests/libs/rtklib_solver_dump_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H -#define GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H +#ifndef GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H_ +#define GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H_ #include #include @@ -85,4 +85,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H +#endif // GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H_ diff --git a/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.h b/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.h index b12caa50f..8c3aef71b 100644 --- a/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.h +++ b/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H -#define GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H +#ifndef GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H_ +#define GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H_ #include #include @@ -94,4 +94,4 @@ private: bool parse_vector(std::vector &vec); }; -#endif // GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H +#endif // GNSS_SDR_SPIRENT_MOTION_CSV_DUMP_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index 63d884a2c..7400e2b84 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -102,7 +102,7 @@ void GpsL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(const pmt::pmt_t &msg { try { - int64_t message = pmt::to_long(std::move(msg)); + int64_t message = pmt::to_long(msg); rx_message = message; } catch (boost::bad_any_cast &e) @@ -249,14 +249,14 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid() } -TEST_F(GpsL1CaPcpsAcquisitionTest, Instantiate) +TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, Instantiate /*unused*/) { init(); boost::shared_ptr acquisition = boost::make_shared(config.get(), "Acquisition_1C", 1, 0); } -TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun) +TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, ConnectAndRun /*unused*/) { int fs_in = 4000000; int nsamples = 4000; @@ -290,7 +290,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun) } -TEST_F(GpsL1CaPcpsAcquisitionTest, ValidationOfResults) +TEST_F(GpsL1CaPcpsAcquisitionTest /*unused*/, ValidationOfResults /*unused*/) { std::chrono::time_point start; std::chrono::time_point end; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h index babefaf8a..247aa8462 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.h @@ -29,8 +29,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_ACQUISITION_DUMP_READER_H -#define GNSS_SDR_ACQUISITION_DUMP_READER_H +#ifndef GNSS_SDR_ACQUISITION_DUMP_READER_H_ +#define GNSS_SDR_ACQUISITION_DUMP_READER_H_ #include #include @@ -83,4 +83,4 @@ private: std::string d_dump_filename; }; -#endif // GNSS_SDR_ACQUISITION_DUMP_READER_H +#endif // GNSS_SDR_ACQUISITION_DUMP_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc index d4b21d34c..411688905 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc @@ -48,7 +48,7 @@ void Acquisition_msg_rx::msg_handler_events(const pmt::pmt_t& msg) { try { - int64_t message = pmt::to_long(std::move(msg)); + int64_t message = pmt::to_long(msg); rx_message = message; top_block->stop(); // stop the flowgraph } diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.h b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.h index cb1d1a9be..ef9c13f49 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.h @@ -30,8 +30,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_ACQUISITION_MSG_RX_H -#define GNSS_SDR_ACQUISITION_MSG_RX_H +#ifndef GNSS_SDR_ACQUISITION_MSG_RX_H_ +#define GNSS_SDR_ACQUISITION_MSG_RX_H_ #include #include @@ -59,4 +59,4 @@ public: }; -#endif +#endif // GNSS_SDR_ACQUISITION_MSG_RX_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h index 33e6ca2a9..c202c9581 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H -#define GNSS_SDR_OBSERVABLES_DUMP_READER_H +#ifndef GNSS_SDR_OBSERVABLES_DUMP_READER_H_ +#define GNSS_SDR_OBSERVABLES_DUMP_READER_H_ #include #include @@ -62,4 +62,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_OBSERVABLES_DUMP_READER_H +#endif // GNSS_SDR_OBSERVABLES_DUMP_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h index 5a5969fa2..2a615ecec 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_TLM_DUMP_READER_H -#define GNSS_SDR_TLM_DUMP_READER_H +#ifndef GNSS_SDR_TLM_DUMP_READER_H_ +#define GNSS_SDR_TLM_DUMP_READER_H_ #include #include @@ -55,4 +55,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_TLM_DUMP_READER_H +#endif // GNSS_SDR_TLM_DUMP_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h index bcde9c5d5..2e8ce7818 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_TRACKING_DUMP_READER_H -#define GNSS_SDR_TRACKING_DUMP_READER_H +#ifndef GNSS_SDR_TRACKING_DUMP_READER_H_ +#define GNSS_SDR_TRACKING_DUMP_READER_H_ #include #include @@ -90,4 +90,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_TRACKING_DUMP_READER_H +#endif // GNSS_SDR_TRACKING_DUMP_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h index 91c571071..546835889 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H -#define GNSS_SDR_TRACKING_TRUE_OBS_READER_H +#ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H_ +#define GNSS_SDR_TRACKING_TRUE_OBS_READER_H_ #include #include @@ -58,4 +58,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_RACKING_TRUE_OBS_READER_H +#endif // GNSS_SDR_RACKING_TRUE_OBS_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h index e3c8aef12..85a8fd0d0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_TRUE_OBSERVABLES_READER_H -#define GNSS_SDR_TRUE_OBSERVABLES_READER_H +#ifndef GNSS_SDR_TRUE_OBSERVABLES_READER_H_ +#define GNSS_SDR_TRUE_OBSERVABLES_READER_H_ #include #include @@ -58,4 +58,4 @@ private: std::ifstream d_dump_file; }; -#endif // GNSS_SDR_TRUE_OBSERVABLES_READER_H +#endif // GNSS_SDR_TRUE_OBSERVABLES_READER_H_ diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc index b5fd7d288..ccf469a0a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc @@ -46,7 +46,7 @@ TEST(BayesianEstimationPositivityTest, BayesianPositivityTest) arma::mat bayes_Psi = arma::ones(1, 1); arma::vec input = arma::zeros(1, 1); - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ std::random_device r; std::default_random_engine e1(r()); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc index ce1901ec9..0726fc32f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc @@ -100,7 +100,7 @@ TEST(CpuMulticorrelatorTest, MeasureExecutionTime) d_local_code_shift_chips[1] = 0.0; d_local_code_shift_chips[2] = d_early_late_spc_chips; - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ // local code resampler on GPU // generate local reference (1 sample per chip) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc index a0d42aeb2..158c27b33 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc @@ -91,7 +91,7 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest) ModelFunction* transition_function; ModelFunction* measurement_function; - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ std::random_device r; std::default_random_engine e1(r()); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc index 00b4e1fe6..1d9e854f4 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc @@ -133,7 +133,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file, // thread that sends the samples to the FPGA -void sending_thread(gr::top_block_sptr top_block, const char *file_name) +void sending_thread(const gr::top_block_sptr& top_block, const char *file_name) { // file descriptor FILE *rx_signal_file; // file descriptor @@ -171,7 +171,7 @@ class GpsL1CADllPllTrackingTestFpga_msg_rx : public gr::block { private: friend GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_make(); - void msg_handler_events(pmt::pmt_t msg); + void msg_handler_events(const pmt::pmt_t& msg); GpsL1CADllPllTrackingTestFpga_msg_rx(); public: @@ -187,7 +187,7 @@ GpsL1CADllPllTrackingTestFpga_msg_rx_sptr GpsL1CADllPllTrackingTestFpga_msg_rx_m } -void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg) +void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(const pmt::pmt_t& msg) { try { diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc index 61ae638d0..2c5ac2dc1 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc @@ -91,7 +91,7 @@ TEST(UnscentedFilterComputationTest, UnscentedFilterTest) ModelFunction* transition_function; ModelFunction* measurement_function; - //--- Perform initializations ------------------------------ + // -- Perform initializations ------------------------------ std::random_device r; std::default_random_engine e1(r()); diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 889d6b849..0b5e35cec 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -134,7 +134,7 @@ void FrontEndCal_msg_rx::msg_handler_events(const pmt::pmt_t& msg) { try { - int64_t message = pmt::to_long(std::move(msg)); + int64_t message = pmt::to_long(msg); rx_message = message; channel_internal_queue.push(rx_message); } @@ -213,7 +213,7 @@ bool front_end_capture(const std::shared_ptr& configurat gr::block_sptr sink; sink = gr::blocks::file_sink::make(sizeof(gr_complex), "tmp_capture.dat"); - //--- Find number of samples per spreading code --- + // -- Find number of samples per spreading code --- int64_t fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", 2048000); int samples_per_code = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)); int nsamples = samples_per_code * 50;