mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Uniformize interface of Galileo E5a functions
This commit is contained in:
parent
9b071575c0
commit
2b11bd6ba9
@ -218,18 +218,18 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
||||
if (gnss_synchro_->Signal[0] == '5' && gnss_synchro_->Signal[1] == 'X')
|
||||
{
|
||||
std::array<char, 3> a = {{'5', 'I', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, a,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI,
|
||||
gnss_synchro_->PRN, a, fs_in_, 0);
|
||||
|
||||
std::array<char, 3> b = {{'5', 'Q', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(codeQ, b,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(codeQ,
|
||||
gnss_synchro_->PRN, b, fs_in_, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::array<char, 3> signal_type_ = {{'5', 'X', '\0'}};
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI, signal_type_,
|
||||
gnss_synchro_->PRN, fs_in_, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(codeI,
|
||||
gnss_synchro_->PRN, signal_type_, fs_in_, 0);
|
||||
}
|
||||
// WARNING: 3ms are coherently integrated. Secondary sequence (1,1,1)
|
||||
// is generated, and modulated in the 'block'.
|
||||
|
@ -167,11 +167,11 @@ void GalileoE5aPcpsAcquisition::set_local_code()
|
||||
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, gnss_synchro_->PRN, signal_, acq_parameters_.resampled_fs, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, gnss_synchro_->PRN, signal_, fs_in_, 0);
|
||||
}
|
||||
own::span<gr_complex> code_span(code_.data(), vector_length_);
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
|
@ -118,7 +118,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
signal_[1] = 'I';
|
||||
}
|
||||
|
||||
galileo_e5_a_code_gen_complex_sampled(code, signal_, PRN, fs_in, 0);
|
||||
galileo_e5_a_code_gen_complex_sampled(code, PRN, signal_, fs_in, 0);
|
||||
|
||||
for (uint32_t s = code_length; s < 2 * code_length; s++)
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
* as replica code generation
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
*
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
@ -27,7 +28,9 @@
|
||||
#include <vector>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal)
|
||||
void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest,
|
||||
int32_t _prn,
|
||||
const std::array<char, 3>& _Signal)
|
||||
{
|
||||
uint32_t prn = _prn - 1;
|
||||
uint32_t index = 0;
|
||||
@ -90,8 +93,11 @@ void galileo_e5_a_code_gen_complex_primary(own::span<std::complex<float>> _dest,
|
||||
}
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_sampled(own::span<std::complex<float>> _dest, const std::array<char, 3>& _Signal,
|
||||
uint32_t _prn, int32_t _fs, uint32_t _chip_shift)
|
||||
void galileo_e5_a_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
|
||||
uint32_t _prn,
|
||||
const std::array<char, 3>& _Signal,
|
||||
int32_t _fs,
|
||||
uint32_t _chip_shift)
|
||||
{
|
||||
uint32_t _samplesPerCode;
|
||||
uint32_t delay;
|
||||
|
@ -4,7 +4,6 @@
|
||||
* as replica code generation
|
||||
* \author Marc Sales, 2014. marcsales92(at)gmail.com
|
||||
*
|
||||
* Detailed description of the file here if needed.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
@ -23,6 +22,7 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H
|
||||
#define GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H
|
||||
|
||||
#include <array>
|
||||
#include <complex>
|
||||
#include <cstdint>
|
||||
#if HAS_STD_SPAN
|
||||
@ -35,16 +35,21 @@ namespace own = gsl;
|
||||
|
||||
/*!
|
||||
* \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(own::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal);
|
||||
void galileo_e5_a_code_gen_complex_primary(own::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.
|
||||
* \brief Generates Galileo E5a complex code, shifted to the desired chip and
|
||||
* sampled at a frequency fs
|
||||
*/
|
||||
void galileo_e5_a_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
|
||||
const std::array<char, 3>& _Signal, uint32_t _prn, int32_t _fs, uint32_t _chip_shift);
|
||||
uint32_t _prn,
|
||||
const std::array<char, 3>& _Signal,
|
||||
int32_t _fs,
|
||||
uint32_t _chip_shift);
|
||||
|
||||
|
||||
#endif // GNSS_SDR_GALILEO_E5_SIGNAL_PROCESSING_H
|
||||
|
@ -195,7 +195,7 @@ void signal_generator_c::generate_codes()
|
||||
{
|
||||
std::array<char, 3> signal = {{'5', 'X', '\0'}};
|
||||
|
||||
galileo_e5_a_code_gen_complex_sampled(sampled_code_data_[sat], signal, PRN_[sat], fs_in_,
|
||||
galileo_e5_a_code_gen_complex_sampled(sampled_code_data_[sat], PRN_[sat], signal, fs_in_,
|
||||
static_cast<int>(GALILEO_E5A_CODE_LENGTH_CHIPS) - delay_chips_[sat]);
|
||||
// noise
|
||||
if (noise_flag_)
|
||||
|
Loading…
Reference in New Issue
Block a user