GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
cpu_multicorrelator_16sc.h
Go to the documentation of this file.
1 /*!
2  * \file cpu_multicorrelator_16sc.h
3  * \brief Highly optimized CPU vector multiTAP correlator class for lv_16sc_t (short int complex)
4  * \authors <ul>
5  * <li> Javier Arribas, 2016. jarribas(at)cttc.es
6  * </ul>
7  *
8  * Class that implements a highly optimized vector multiTAP correlator class for CPUs
9  *
10  * -----------------------------------------------------------------------------
11  *
12  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
13  * This file is part of GNSS-SDR.
14  *
15  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 #ifndef GNSS_SDR_CPU_MULTICORRELATOR_16SC_H
22 #define GNSS_SDR_CPU_MULTICORRELATOR_16SC_H
23 
24 #include <volk_gnsssdr/volk_gnsssdr.h>
25 
26 /** \addtogroup Tracking
27  * \{ */
28 /** \addtogroup Tracking_libs
29  * \{ */
30 
31 
32 /*!
33  * \brief Class that implements carrier wipe-off and correlators.
34  */
36 {
37 public:
38  Cpu_Multicorrelator_16sc() = default;
40  bool init(int max_signal_length_samples, int n_correlators);
41  bool set_local_code_and_taps(int code_length_chips, const lv_16sc_t *local_code_in, float *shifts_chips);
42  bool set_input_output_vectors(lv_16sc_t *corr_out, const lv_16sc_t *sig_in);
43  void update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips);
44  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);
45  bool free();
46 
47 private:
48  // Allocate the device input vectors
49  const lv_16sc_t *d_sig_in{nullptr};
50  const lv_16sc_t *d_local_code_in{nullptr};
51  lv_16sc_t **d_local_codes_resampled{nullptr};
52  lv_16sc_t *d_corr_out{nullptr};
53  float *d_shifts_chips{nullptr};
54  int d_code_length_chips{0};
55  int d_n_correlators{0};
56 };
57 
58 
59 /** \} */
60 /** \} */
61 #endif // GNSS_SDR_CPU_MULTICORRELATOR_H
Class that implements carrier wipe-off and correlators.