From e31b31952b7cdf97115ef2c19bf47e6a2d4a3aa8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 26 Jul 2019 01:38:53 +0200 Subject: [PATCH] Sort includes, minor cleaning --- src/algorithms/libs/beidou_b3i_signal_processing.cc | 3 +-- src/algorithms/libs/beidou_b3i_signal_processing.h | 3 --- src/algorithms/libs/galileo_e1_signal_processing.cc | 1 - src/algorithms/libs/galileo_e5_signal_processing.cc | 1 - src/algorithms/libs/galileo_e5_signal_processing.h | 1 + src/algorithms/libs/glonass_l1_signal_processing.cc | 4 ++-- src/algorithms/libs/glonass_l1_signal_processing.h | 8 ++++---- src/algorithms/libs/glonass_l2_signal_processing.cc | 4 ++-- src/algorithms/libs/glonass_l2_signal_processing.h | 8 ++++---- src/algorithms/libs/gps_l2c_signal.cc | 4 ++-- src/algorithms/libs/gps_l5_signal.cc | 2 +- 11 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/algorithms/libs/beidou_b3i_signal_processing.cc b/src/algorithms/libs/beidou_b3i_signal_processing.cc index 56a04d123..ef031e945 100644 --- a/src/algorithms/libs/beidou_b3i_signal_processing.cc +++ b/src/algorithms/libs/beidou_b3i_signal_processing.cc @@ -231,7 +231,6 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span> _dest, u // number of samples per millisecond (because one C/A code period is one // millisecond). - // _codeValueIndex = ceil((_ts * ((float)i + 1)) / _tc) - 1; aux = (_ts * (i + 1)) / _tc; _codeValueIndex = auxCeil(aux) - 1; @@ -245,7 +244,7 @@ void beidou_b3i_code_gen_complex_sampled(gsl::span> _dest, u } else { - _dest[i] = _code[_codeValueIndex]; //repeat the chip -> upsample + _dest[i] = _code[_codeValueIndex]; // repeat the chip -> upsample } } } diff --git a/src/algorithms/libs/beidou_b3i_signal_processing.h b/src/algorithms/libs/beidou_b3i_signal_processing.h index 58509e64b..dc91c30c9 100644 --- a/src/algorithms/libs/beidou_b3i_signal_processing.h +++ b/src/algorithms/libs/beidou_b3i_signal_processing.h @@ -34,10 +34,7 @@ #define GNSS_SDR_BEIDOU_B3I_SIGNAL_PROCESSING_H_ #include -#include #include -#include -#include #if HAS_SPAN #include diff --git a/src/algorithms/libs/galileo_e1_signal_processing.cc b/src/algorithms/libs/galileo_e1_signal_processing.cc index 59f0cfb1c..57576b2a8 100644 --- a/src/algorithms/libs/galileo_e1_signal_processing.cc +++ b/src/algorithms/libs/galileo_e1_signal_processing.cc @@ -33,7 +33,6 @@ #include "galileo_e1_signal_processing.h" #include "Galileo_E1.h" #include "gnss_signal_processing.h" -#include #include #include #include diff --git a/src/algorithms/libs/galileo_e5_signal_processing.cc b/src/algorithms/libs/galileo_e5_signal_processing.cc index dced04321..fe765b030 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.cc +++ b/src/algorithms/libs/galileo_e5_signal_processing.cc @@ -35,7 +35,6 @@ #include "Galileo_E5a.h" #include "gnss_signal_processing.h" #include -#include #include diff --git a/src/algorithms/libs/galileo_e5_signal_processing.h b/src/algorithms/libs/galileo_e5_signal_processing.h index 90d6abc5e..7806b2916 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.h +++ b/src/algorithms/libs/galileo_e5_signal_processing.h @@ -34,6 +34,7 @@ #ifndef GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H_ #define GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H_ +#include #include #include #if HAS_SPAN diff --git a/src/algorithms/libs/glonass_l1_signal_processing.cc b/src/algorithms/libs/glonass_l1_signal_processing.cc index ee07164bf..a6f48494b 100644 --- a/src/algorithms/libs/glonass_l1_signal_processing.cc +++ b/src/algorithms/libs/glonass_l1_signal_processing.cc @@ -36,7 +36,7 @@ auto auxCeil = [](float x) { return static_cast(static_cast((x) + 1)); }; -void glonass_l1_ca_code_gen_complex(gsl::span> _dest, /* int32_t _prn,*/ uint32_t _chip_shift) +void glonass_l1_ca_code_gen_complex(gsl::span> _dest, uint32_t _chip_shift) { const uint32_t _code_length = 511; std::bitset<_code_length> G1{}; @@ -101,7 +101,7 @@ void glonass_l1_ca_code_gen_complex(gsl::span> _dest, /* int /* * Generates complex GLONASS L1 C/A code for the desired SV ID and sampled to specific sampling frequency */ -void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift) +void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift) { // This function is based on the GNU software GPS for MATLAB in the Kay Borre book std::array, 511> _code{}; diff --git a/src/algorithms/libs/glonass_l1_signal_processing.h b/src/algorithms/libs/glonass_l1_signal_processing.h index 854befe82..6cc9f5033 100644 --- a/src/algorithms/libs/glonass_l1_signal_processing.h +++ b/src/algorithms/libs/glonass_l1_signal_processing.h @@ -43,13 +43,13 @@ namespace gsl = std; #include #endif -//!Generates complex GLONASS L1 C/A code for the desired SV ID and code shift, and sampled to specific sampling frequency -void glonass_l1_ca_code_gen_complex(gsl::span> _dest, /*int32_t _prn,*/ uint32_t _chip_shift); +//! Generates complex GLONASS L1 C/A code for the desired SV ID and code shift, and sampled to specific sampling frequency +void glonass_l1_ca_code_gen_complex(gsl::span> _dest, uint32_t _chip_shift); //! Generates N complex GLONASS L1 C/A codes for the desired SV ID and code shift -void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift, uint32_t _ncodes); +void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift, uint32_t _ncodes); //! Generates complex GLONASS L1 C/A code for the desired SV ID and code shift -void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift); +void glonass_l1_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift); #endif /* GNSS_SDR_GLONASS_SDR_SIGNAL_PROCESSING_H_ */ diff --git a/src/algorithms/libs/glonass_l2_signal_processing.cc b/src/algorithms/libs/glonass_l2_signal_processing.cc index f2223fa94..1e0c197f7 100644 --- a/src/algorithms/libs/glonass_l2_signal_processing.cc +++ b/src/algorithms/libs/glonass_l2_signal_processing.cc @@ -36,7 +36,7 @@ auto auxCeil = [](float x) { return static_cast(static_cast((x) + 1)); }; -void glonass_l2_ca_code_gen_complex(gsl::span> _dest, /* int32_t _prn,*/ uint32_t _chip_shift) +void glonass_l2_ca_code_gen_complex(gsl::span> _dest, uint32_t _chip_shift) { const uint32_t _code_length = 511; std::bitset<_code_length> G1{}; @@ -101,7 +101,7 @@ void glonass_l2_ca_code_gen_complex(gsl::span> _dest, /* int /* * Generates complex GLONASS L2 C/A code for the desired SV ID and sampled to specific sampling frequency */ -void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift) +void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift) { // This function is based on the GNU software GPS for MATLAB in the Kay Borre book std::array, 511> _code{}; diff --git a/src/algorithms/libs/glonass_l2_signal_processing.h b/src/algorithms/libs/glonass_l2_signal_processing.h index 0f46d3e9d..6bbffefff 100644 --- a/src/algorithms/libs/glonass_l2_signal_processing.h +++ b/src/algorithms/libs/glonass_l2_signal_processing.h @@ -43,13 +43,13 @@ namespace gsl = std; #include #endif -//!Generates complex GLONASS L2 C/A code for the desired SV ID and code shift, and sampled to specific sampling frequency -void glonass_l2_ca_code_gen_complex(gsl::span> _dest, /*int32_t _prn,*/ uint32_t _chip_shift); +//! Generates complex GLONASS L2 C/A code for the desired SV ID and code shift, and sampled to specific sampling frequency +void glonass_l2_ca_code_gen_complex(gsl::span> _dest, uint32_t _chip_shift); //! Generates N complex GLONASS L2 C/A codes for the desired SV ID and code shift -void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift, uint32_t _ncodes); +void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift, uint32_t _ncodes); //! Generates complex GLONASS L2 C/A code for the desired SV ID and code shift -void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, /* uint32_t _prn,*/ int32_t _fs, uint32_t _chip_shift); +void glonass_l2_ca_code_gen_complex_sampled(gsl::span> _dest, int32_t _fs, uint32_t _chip_shift); #endif /* GNSS_SDR_GLONASS_L2_SIGNAL_PROCESSING_H_ */ diff --git a/src/algorithms/libs/gps_l2c_signal.cc b/src/algorithms/libs/gps_l2c_signal.cc index 73d9e5b7a..422d965b2 100644 --- a/src/algorithms/libs/gps_l2c_signal.cc +++ b/src/algorithms/libs/gps_l2c_signal.cc @@ -106,7 +106,7 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span> _dest, ui //--- Find time constants -------------------------------------------------- _ts = 1.0 / static_cast(_fs); // Sampling period in sec - _tc = 1.0 / static_cast(GPS_L2_M_CODE_RATE_HZ); // C/A chip period in sec + _tc = 1.0 / static_cast(GPS_L2_M_CODE_RATE_HZ); // L2C chip period in sec for (int32_t i = 0; i < _samplesPerCode; i++) { @@ -123,7 +123,7 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span> _dest, ui } else { - _dest[i] = std::complex(1.0 - 2.0 * _code[_codeValueIndex], 0); //repeat the chip -> upsample + _dest[i] = std::complex(1.0 - 2.0 * _code[_codeValueIndex], 0); // repeat the chip -> upsample } } } diff --git a/src/algorithms/libs/gps_l5_signal.cc b/src/algorithms/libs/gps_l5_signal.cc index 8c301ee6e..231afc490 100644 --- a/src/algorithms/libs/gps_l5_signal.cc +++ b/src/algorithms/libs/gps_l5_signal.cc @@ -33,6 +33,7 @@ #include "gps_l5_signal.h" #include "GPS_L5.h" #include +#include #include std::deque l5i_xa_shift(std::deque xa) // GPS-IS-705E Figure 3-4 pp. 15 @@ -298,7 +299,6 @@ void gps_l5q_code_gen_complex_sampled(gsl::span> _dest, uint _ts = 1.0 / static_cast(_fs); // Sampling period in sec _tc = 1.0 / static_cast(GPS_L5Q_CODE_RATE_HZ); // L5Q chip period in sec - //float aux; for (int32_t i = 0; i < _samplesPerCode; i++) { //=== Digitizing =======================================================