2017-09-11 14:21:05 +00:00
|
|
|
/*!
|
|
|
|
* \file cpu_multicorrelator_real_codes.h
|
|
|
|
* \brief High optimized CPU vector multiTAP correlator class using real-valued local codes
|
|
|
|
* \authors <ul>
|
|
|
|
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
|
|
|
* <li> Cillian O'Driscoll, 2017, cillian.odriscoll(at)gmail.com
|
|
|
|
* </ul>
|
|
|
|
*
|
|
|
|
* Class that implements a high optimized vector multiTAP correlator class for CPUs
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2018-05-13 20:49:11 +00:00
|
|
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2017-09-11 14:21:05 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2017-09-11 14:21:05 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H_
|
|
|
|
#define GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <complex>
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Class that implements carrier wipe-off and correlators.
|
|
|
|
*/
|
|
|
|
class cpu_multicorrelator_real_codes
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cpu_multicorrelator_real_codes();
|
2018-08-03 09:40:11 +00:00
|
|
|
void set_fast_resampler(bool use_fast_resampler);
|
2017-09-11 14:21:05 +00:00
|
|
|
~cpu_multicorrelator_real_codes();
|
|
|
|
bool init(int max_signal_length_samples, int n_correlators);
|
2018-03-03 01:03:39 +00:00
|
|
|
bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
|
|
|
|
bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);
|
2018-08-08 10:03:58 +00:00
|
|
|
void update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips = 0.0);
|
2018-08-15 11:38:49 +00:00
|
|
|
bool Carrier_wipeoff_multicorrelator_resampler(float rem_carrier_phase_in_rad, float phase_step_rad, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips, int signal_length_samples);
|
2017-09-11 14:21:05 +00:00
|
|
|
bool free();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Allocate the device input vectors
|
|
|
|
const std::complex<float> *d_sig_in;
|
|
|
|
float **d_local_codes_resampled;
|
|
|
|
const float *d_local_code_in;
|
|
|
|
std::complex<float> *d_corr_out;
|
|
|
|
float *d_shifts_chips;
|
2018-08-03 09:40:11 +00:00
|
|
|
bool d_use_fast_resampler;
|
2017-09-11 14:21:05 +00:00
|
|
|
int d_code_length_chips;
|
|
|
|
int d_n_correlators;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* CPU_MULTICORRELATOR_REAL_CODES_H_ */
|