mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-05 01:33:03 +00:00
Give to global parameters more meaningful name
This commit is contained in:
@@ -162,7 +162,7 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
// This function is based on the GNU software GPS for MATLAB in Kay Borre's book
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
uint32_t _samplesPerCode;
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_CPS; // Hz
|
||||
std::vector<int32_t> primary_code_E1_chips(static_cast<int32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2;
|
||||
@@ -237,7 +237,7 @@ void galileo_e1_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, c
|
||||
bool _secondary_flag)
|
||||
{
|
||||
std::string _galileo_signal = _Signal.data();
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_CPS; // Hz
|
||||
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
(static_cast<double>(_codeFreqBasis) / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
uint32_t _samplesPerCode;
|
||||
uint32_t delay;
|
||||
const uint32_t _codeLength = GALILEO_E5A_CODE_LENGTH_CHIPS;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_HZ;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
|
||||
std::unique_ptr<std::complex<float>> _code{new std::complex<float>[_codeLength]};
|
||||
gsl::span<std::complex<float>> _code_span(_code, _codeLength);
|
||||
|
||||
@@ -103,11 +103,11 @@ void gps_l2c_m_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, ui
|
||||
const int32_t _codeLength = GPS_L2_M_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L2_M_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_HZ); // L2C chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L2_M_CODE_RATE_CPS); // L2C chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
|
||||
@@ -220,11 +220,11 @@ void gps_l5i_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
const int32_t _codeLength = GPS_L5I_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_HZ); // L5I primary chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_CPS); // L5I primary chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
@@ -295,11 +295,11 @@ void gps_l5q_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest, uint
|
||||
const int32_t _codeLength = GPS_L5Q_CODE_LENGTH_CHIPS;
|
||||
|
||||
// --- Find number of samples per spreading code ---------------------------
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
|
||||
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_CPS) / static_cast<double>(_codeLength)));
|
||||
|
||||
// --- Find time constants -------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_HZ); // L5Q chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_CPS); // L5Q chip period in sec
|
||||
|
||||
for (int32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user