GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
gps_l1_ca_dll_pll_tracking_gpu_cc.h
Go to the documentation of this file.
1/*!
2 * \file gps_l1_ca_dll_pll_tracking_gpu_cc.h
3 * \brief Implementation of a code DLL + carrier PLL tracking block, GPU ACCELERATED
4 * \author Javier Arribas, 2015. jarribas(at)cttc.es
5 *
6 * Code DLL + carrier PLL according to the algorithms described in:
7 * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
8 * A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
9 * Birkhauser, 2007
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_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
23#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
24
27#include "gnss_synchro.h"
30#include <gnuradio/block.h>
31#include <fstream>
32#include <map>
33#include <string>
34#include <vector>
35
36/** \addtogroup Tracking
37 * \{ */
38/** \addtogroup Tracking_gnuradio_blocks
39 * \{ */
40
41
43
44using gps_l1_ca_dll_pll_tracking_gpu_cc_sptr = gnss_shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc>;
45
46gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
47gps_l1_ca_dll_pll_make_tracking_gpu_cc(
48 int64_t fs_in,
49 uint32_t vector_length,
50 bool dump,
51 std::string dump_filename,
52 float pll_bw_hz,
53 float dll_bw_hz,
54 float early_late_space_chips);
55
56
57/*!
58 * \brief This class implements a DLL + PLL tracking loop block
59 */
60class Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc : public gr::block
61{
62public:
63 ~Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc();
64
65 void set_channel(uint32_t channel);
66 void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro);
67 void start_tracking();
68
69 int general_work(int noutput_items, gr_vector_int &ninput_items,
70 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
71
72 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
73
74private:
75 friend gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
76 gps_l1_ca_dll_pll_make_tracking_gpu_cc(
77 int64_t fs_in,
78 uint32_t vector_length,
79 bool dump,
80 std::string dump_filename,
81 float pll_bw_hz,
82 float dll_bw_hz,
83 float early_late_space_chips);
84
85 Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
86 int64_t fs_in,
87 uint32_t vector_length,
88 bool dump,
89 std::string dump_filename,
90 float pll_bw_hz,
91 float dll_bw_hz,
92 float early_late_space_chips);
93 void update_local_code();
94 void update_local_carrier();
95 void check_carrier_phase_coherent_initialization();
96
97 // PLL and DLL filter library
98 Tracking_2nd_DLL_filter d_code_loop_filter;
99 Tracking_FLL_PLL_filter d_carrier_loop_filter;
100
101 Gnss_Synchro *d_acquisition_gnss_synchro;
102
103 std::vector<gr_complex> d_Prompt_buffer;
104
105 // file dump
106 std::string d_dump_filename;
107 std::ofstream d_dump_file;
108
109 std::map<std::string, std::string> systemName;
110 std::string sys;
111
112 // tracking configuration vars
113 int64_t d_if_freq;
114 int64_t d_fs_in;
115 double d_early_late_spc_chips;
116 uint32_t d_vector_length;
117 uint32_t d_channel;
118 int32_t d_n_correlator_taps;
119
120 // GPU HOST PINNED MEMORY IN/OUT VECTORS
121 cuda_multicorrelator *multicorrelator_gpu;
122 gr_complex *in_gpu;
123 gr_complex *d_correlator_outs;
124 gr_complex *d_ca_code;
125 float *d_local_code_shift_chips;
126
127 gr_complex *d_Early;
128 gr_complex *d_Prompt;
129 gr_complex *d_Late;
130
131 // remaining code phase and carrier phase between tracking loops
132 double d_rem_code_phase_samples;
133 double d_rem_code_phase_chips;
134 double d_rem_carrier_phase_rad;
135
136 // acquisition
137 double d_acq_code_phase_samples;
138 double d_acq_carrier_doppler_hz;
139
140 // tracking vars
141 double d_code_freq_chips;
142 double d_code_phase_step_chips;
143 double d_carrier_doppler_hz;
144 double d_carrier_phase_step_rad;
145 double d_acc_carrier_phase_cycles;
146 double d_code_phase_samples;
147 double d_pll_to_dll_assist_secs_Ti;
148
149 // Integration period in samples
150 int32_t d_correlation_length_samples;
151
152 // processing samples counters
153 uint64_t d_sample_counter;
154 uint64_t d_acq_sample_stamp;
155
156 // CN0 estimation and lock detector
157 double d_carrier_lock_test;
158 double d_CN0_SNV_dB_Hz;
159 double d_carrier_lock_threshold;
160 int32_t d_carrier_lock_fail_counter;
161 int32_t d_cn0_estimation_counter;
162
163 // control vars
164 bool d_acc_carrier_phase_initialized;
165 bool d_enable_tracking;
166 bool d_pull_in;
167 bool d_dump;
168};
169
170
171/** \} */
172/** \} */
173#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_CC_H
This is the class that contains the information that is shared by the processing blocks.
This class implements a DLL + PLL tracking loop block.
This class implements a 2nd order DLL filter for code tracking loop.
This class implements a hybrid FLL and PLL filter for tracking carrier loop.
Class that implements carrier wipe-off and correlators using NVIDIA CUDA GPU accelerators.
Highly optimized CUDA GPU vector multiTAP correlator class.
This interface represents a GNSS block.
Interface of the Gnss_Synchro class.
Interface of a 2nd order DLL filter for code tracking loop.
Interface of a hybrid FLL and PLL filter for tracking carrier loop.