GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
cpu_multicorrelator_real_codes.h
Go to the documentation of this file.
1 /*!
2  * \file cpu_multicorrelator_real_codes.h
3  * \brief Highly optimized CPU vector multiTAP correlator class using real-valued local codes
4  * \authors <ul>
5  * <li> Javier Arribas, 2015. jarribas(at)cttc.es
6  * <li> Cillian O'Driscoll, 2017, cillian.odriscoll(at)gmail.com
7  * </ul>
8  *
9  * Class that implements a highly optimized vector multiTAP correlator class for CPUs
10  *
11  * -----------------------------------------------------------------------------
12  *
13  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
14  *
15  * GNSS-SDR is a software defined Global Navigation
16  * Satellite Systems receiver
17  *
18  * This file is part of GNSS-SDR.
19  *
20  * SPDX-License-Identifier: GPL-3.0-or-later
21  *
22  * -----------------------------------------------------------------------------
23  */
24 
25 #ifndef GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
26 #define GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
27 
28 
29 #include <complex>
30 
31 /*!
32  * \brief Class that implements carrier wipe-off and correlators.
33  */
35 {
36 public:
38  void set_high_dynamics_resampler(bool use_high_dynamics_resampler);
40  bool init(int max_signal_length_samples, int n_correlators);
41  bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
42  bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);
43  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);
44  bool Carrier_wipeoff_multicorrelator_resampler(float rem_carrier_phase_in_rad, float phase_step_rad, float phase_rate_step_rad, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips, int signal_length_samples);
45  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);
46  bool free();
47 
48 private:
49  // Allocate the device input vectors
50  const std::complex<float> *d_sig_in;
51  const float *d_local_code_in;
52  std::complex<float> *d_corr_out;
53  float **d_local_codes_resampled;
54  float *d_shifts_chips;
55  int d_code_length_chips;
56  int d_n_correlators;
57  bool d_use_high_dynamics_resampler;
58 };
59 
60 
61 #endif // GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
Class that implements carrier wipe-off and correlators.