mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Improve const correctness
This commit is contained in:
parent
d6714e35a1
commit
f90d52a1e2
@ -37,7 +37,7 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
void galileo_e1_code_gen_int(gsl::span<int> _dest, std::array<char, 3> _Signal, int32_t _prn)
|
||||
void galileo_e1_code_gen_int(gsl::span<int> _dest, const std::array<char, 3>& _Signal, int32_t _prn)
|
||||
{
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
int32_t prn = _prn - 1;
|
||||
@ -105,7 +105,7 @@ void galileo_e1_sinboc_61_gen_int(gsl::span<int> _dest, gsl::span<const int> _pr
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_code_gen_sinboc11_float(gsl::span<float> _dest, std::array<char, 3> _Signal, uint32_t _prn)
|
||||
void galileo_e1_code_gen_sinboc11_float(gsl::span<float> _dest, const std::array<char, 3>& _Signal, uint32_t _prn)
|
||||
{
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
const auto _codeLength = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
@ -119,7 +119,7 @@ void galileo_e1_code_gen_sinboc11_float(gsl::span<float> _dest, std::array<char,
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_gen_float(gsl::span<float> _dest, gsl::span<int> _prn, std::array<char, 3> _Signal)
|
||||
void galileo_e1_gen_float(gsl::span<float> _dest, gsl::span<int> _prn, const std::array<char, 3>& _Signal)
|
||||
{
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
const uint32_t _codeLength = 12 * GALILEO_E1_B_CODE_LENGTH_CHIPS;
|
||||
@ -153,7 +153,7 @@ void galileo_e1_gen_float(gsl::span<float> _dest, gsl::span<int> _prn, std::arra
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift,
|
||||
bool _secondary_flag)
|
||||
{
|
||||
@ -231,7 +231,7 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char,
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift,
|
||||
bool _secondary_flag)
|
||||
{
|
||||
@ -257,14 +257,14 @@ void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, s
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift)
|
||||
{
|
||||
galileo_e1_code_gen_float_sampled(_dest, _Signal, _cboc, _prn, _fs, _chip_shift, false);
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift)
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(_dest, _Signal, _cboc, _prn, _fs, _chip_shift, false);
|
||||
|
@ -47,14 +47,14 @@ namespace gsl = std;
|
||||
* \brief This function generates Galileo E1 code (can select E1B or E1C sinboc).
|
||||
*
|
||||
*/
|
||||
void galileo_e1_code_gen_sinboc11_float(gsl::span<float> _dest, std::array<char, 3> _Signal, uint32_t _prn);
|
||||
void galileo_e1_code_gen_sinboc11_float(gsl::span<float> _dest, const std::array<char, 3>& _Signal, uint32_t _prn);
|
||||
|
||||
/*!
|
||||
* \brief This function generates Galileo E1 code (can select E1B or E1C, cboc or sinboc
|
||||
* and the sample frequency _fs).
|
||||
*
|
||||
*/
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift,
|
||||
bool _secondary_flag);
|
||||
|
||||
@ -63,7 +63,7 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char,
|
||||
* and the sample frequency _fs).
|
||||
*
|
||||
*/
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift);
|
||||
|
||||
/*!
|
||||
@ -71,14 +71,14 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, std::array<char,
|
||||
* and the sample frequency _fs).
|
||||
*
|
||||
*/
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift,
|
||||
bool _secondary_flag);
|
||||
|
||||
/*!
|
||||
* \brief galileo_e1_code_gen_complex_sampled without _secondary_flag for backward compatibility.
|
||||
*/
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
bool _cboc, uint32_t _prn, int32_t _fs, uint32_t _chip_shift);
|
||||
|
||||
#endif /* GNSS_SDR_GALILEO_E1_SIGNAL_PROCESSING_H_ */
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, std::array<char, 3> _Signal)
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal)
|
||||
{
|
||||
uint32_t prn = _prn - 1;
|
||||
uint32_t index = 0;
|
||||
@ -100,7 +100,7 @@ void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest,
|
||||
}
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, std::array<char, 3> _Signal,
|
||||
void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
uint32_t _prn, int32_t _fs, uint32_t _chip_shift)
|
||||
{
|
||||
uint32_t _samplesPerCode;
|
||||
|
@ -49,14 +49,14 @@ namespace gsl = std;
|
||||
* \brief Generates Galileo E5a code at 1 sample/chip
|
||||
* bool _pilot generates E5aQ code if true and E5aI (data signal) if false.
|
||||
*/
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, std::array<char, 3> _Signal);
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal);
|
||||
|
||||
/*!
|
||||
* \brief Generates Galileo E5a complex code, shifted to the desired chip and sampled at a frequency fs
|
||||
* bool _pilot generates E5aQ code if true and E5aI (data signal) if false.
|
||||
*/
|
||||
void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
std::array<char, 3> _Signal, uint32_t _prn, int32_t _fs, uint32_t _chip_shift);
|
||||
const std::array<char, 3>& _Signal, uint32_t _prn, int32_t _fs, uint32_t _chip_shift);
|
||||
|
||||
|
||||
#endif /* GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user