GNSS-SDR  0.0.19
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  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
14  * This file is part of GNSS-SDR.
15  *
16  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
17  * SPDX-License-Identifier: GPL-3.0-or-later
18  *
19  * -----------------------------------------------------------------------------
20  */
21 
22 #ifndef GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
23 #define GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
24 
25 
26 #include <complex>
27 
28 /** \addtogroup Tracking
29  * \{ */
30 /** \addtogroup Tracking_libs
31  * \{ */
32 
33 
34 /*!
35  * \brief Class that implements carrier wipe-off and correlators.
36  */
38 {
39 public:
41  void set_high_dynamics_resampler(bool use_high_dynamics_resampler);
43  bool init(int max_signal_length_samples, int n_correlators);
44  bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
45  bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);
46  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);
47  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);
48  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);
49  bool free();
50 
51 private:
52  // Allocate the device input vectors
53  const std::complex<float> *d_sig_in{nullptr};
54  const float *d_local_code_in{nullptr};
55  std::complex<float> *d_corr_out{nullptr};
56  float **d_local_codes_resampled{nullptr};
57  float *d_shifts_chips{nullptr};
58  int d_code_length_chips{0};
59  int d_n_correlators{0};
60  bool d_use_high_dynamics_resampler{true};
61 };
62 
63 
64 /** \} */
65 /** \} */
66 #endif // GNSS_SDR_CPU_MULTICORRELATOR_REAL_CODES_H
Class that implements carrier wipe-off and correlators.