2015-11-17 18:14:55 +00:00
|
|
|
/*!
|
|
|
|
* \file cpu_multicorrelator.h
|
|
|
|
* \brief High optimized CPU vector multiTAP correlator class
|
|
|
|
* \authors <ul>
|
|
|
|
* <li> Javier Arribas, 2015. jarribas(at)cttc.es
|
|
|
|
* </ul>
|
|
|
|
*
|
|
|
|
* Class that implements a high optimized vector multiTAP correlator class for CPUs
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2015-11-27 12:32:21 +00:00
|
|
|
#ifndef GNSS_SDR_CPU_MULTICORRELATOR_H_
|
|
|
|
#define GNSS_SDR_CPU_MULTICORRELATOR_H_
|
2015-11-17 18:14:55 +00:00
|
|
|
|
|
|
|
#include <complex>
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Class that implements carrier wipe-off and correlators.
|
|
|
|
*/
|
|
|
|
class cpu_multicorrelator
|
|
|
|
{
|
|
|
|
public:
|
2015-11-27 12:32:21 +00:00
|
|
|
cpu_multicorrelator();
|
2015-11-17 18:14:55 +00:00
|
|
|
bool init(
|
|
|
|
int max_signal_length_samples,
|
|
|
|
int n_correlators
|
|
|
|
);
|
|
|
|
bool set_local_code_and_taps(
|
|
|
|
int code_length_chips,
|
|
|
|
const std::complex<float>* local_code_in,
|
|
|
|
float *shifts_chips
|
|
|
|
);
|
|
|
|
bool set_input_output_vectors(
|
|
|
|
std::complex<float>* corr_out,
|
|
|
|
const std::complex<float>* sig_in
|
|
|
|
);
|
|
|
|
void update_local_code(
|
|
|
|
int correlator_length_samples,
|
|
|
|
float rem_code_phase_chips,
|
|
|
|
float code_phase_step_chips
|
|
|
|
);
|
|
|
|
|
|
|
|
void update_local_carrier(
|
|
|
|
int correlator_length_samples,
|
|
|
|
float rem_carr_phase_rad,
|
|
|
|
float phase_step_rad
|
|
|
|
);
|
|
|
|
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,
|
|
|
|
int signal_length_samples);
|
|
|
|
bool free();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Allocate the device input vectors
|
|
|
|
const std::complex<float> *d_sig_in;
|
|
|
|
std::complex<float> *d_nco_in;
|
|
|
|
std::complex<float> **d_local_codes_resampled;
|
|
|
|
std::complex<float> *d_sig_doppler_wiped;
|
|
|
|
const std::complex<float> *d_local_code_in;
|
|
|
|
std::complex<float> *d_corr_out;
|
|
|
|
|
|
|
|
float *d_shifts_chips;
|
|
|
|
int d_code_length_chips;
|
|
|
|
int d_n_correlators;
|
|
|
|
|
|
|
|
bool update_local_code();
|
|
|
|
bool update_local_carrier();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* CPU_MULTICORRELATOR_H_ */
|