GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
galileo_e1_tcp_connector_tracking_cc.h
Go to the documentation of this file.
1/*!
2 * \file galileo_e1_tcp_connector_tracking_cc.h
3 * \brief Interface of a TCP connector block based on code DLL + carrier PLL VEML (Very Early
4 * Minus Late) tracking block for Galileo E1 signals
5 * \author David Pubill, 2012. dpubill(at)cttc.es
6 * Luis Esteve, 2012. luis(at)epsilon-formacion.com
7 * Javier Arribas, 2011. jarribas(at)cttc.es
8 *
9 * Code DLL + carrier PLL according to the algorithms described in:
10 * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
11 * A Software-Defined GPS and Galileo Receiver. A Single-Frequency Approach,
12 * Birkhauser, 2007
13 *
14 * -----------------------------------------------------------------------------
15 *
16 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
17 * This file is part of GNSS-SDR.
18 *
19 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
20 * SPDX-License-Identifier: GPL-3.0-or-later
21 *
22 * -----------------------------------------------------------------------------
23 */
24
25#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
26#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
27
28#include "cpu_multicorrelator.h"
30#include "gnss_synchro.h"
31#include "tcp_communication.h"
32#include <gnuradio/block.h>
33#include <volk_gnsssdr/volk_gnsssdr_alloc.h> // for volk_gnsssdr::vector
34#include <fstream>
35#include <map>
36#include <string>
37
38/** \addtogroup Tracking
39 * \{ */
40/** \addtogroup Tracking_gnuradio_blocks
41 * \{ */
42
43
45
46using galileo_e1_tcp_connector_tracking_cc_sptr = gnss_shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc>;
47
48galileo_e1_tcp_connector_tracking_cc_sptr
49galileo_e1_tcp_connector_make_tracking_cc(
50 int64_t fs_in, uint32_t vector_length,
51 bool dump,
52 const std::string &dump_filename,
53 float pll_bw_hz,
54 float dll_bw_hz,
55 float early_late_space_chips,
56 float very_early_late_space_chips,
57 size_t port_ch0);
58
59/*!
60 * \brief This class implements a code DLL + carrier PLL VEML (Very Early
61 * Minus Late) tracking block for Galileo E1 signals
62 */
63class Galileo_E1_Tcp_Connector_Tracking_cc : public gr::block
64{
65public:
66 ~Galileo_E1_Tcp_Connector_Tracking_cc();
67
68 void set_channel(uint32_t channel);
69 void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro);
70 void start_tracking();
71
72 int general_work(int noutput_items, gr_vector_int &ninput_items,
73 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
74
75 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
76
77private:
78 friend galileo_e1_tcp_connector_tracking_cc_sptr
79 galileo_e1_tcp_connector_make_tracking_cc(
80 int64_t fs_in, uint32_t vector_length,
81 bool dump,
82 const std::string &dump_filename,
83 float pll_bw_hz,
84 float dll_bw_hz,
85 float early_late_space_chips,
86 float very_early_late_space_chips,
87 size_t port_ch0);
88
89 Galileo_E1_Tcp_Connector_Tracking_cc(
90 int64_t fs_in, uint32_t vector_length,
91 bool dump,
92 const std::string &dump_filename,
93 float pll_bw_hz,
94 float dll_bw_hz,
95 float early_late_space_chips,
96 float very_early_late_space_chips,
97 size_t port_ch0);
98
99 void update_local_code();
100
101 void update_local_carrier();
102
103 // tracking configuration vars
104 uint32_t d_vector_length;
105 bool d_dump;
106
107 Gnss_Synchro *d_acquisition_gnss_synchro;
108 uint32_t d_channel;
109
110 int64_t d_fs_in;
111
112 int32_t d_correlation_length_samples;
113 int32_t d_n_correlator_taps;
114 float d_early_late_spc_chips;
115 float d_very_early_late_spc_chips;
116
117 volk_gnsssdr::vector<gr_complex> d_ca_code;
118
119 gr_complex *d_Very_Early;
120 gr_complex *d_Early;
121 gr_complex *d_Prompt;
122 gr_complex *d_Late;
123 gr_complex *d_Very_Late;
124
125 // remaining code phase and carrier phase between tracking loops
126 double d_rem_code_phase_samples;
127 float d_next_rem_code_phase_samples;
128 float d_rem_carr_phase_rad;
129
130 // acquisition
131 float d_acq_code_phase_samples;
132 float d_acq_carrier_doppler_hz;
133
134 // correlator
135 volk_gnsssdr::vector<float> d_local_code_shift_chips;
136 volk_gnsssdr::vector<gr_complex> d_correlator_outs;
137 Cpu_Multicorrelator multicorrelator_cpu;
138
139 // tracking vars
140 double d_code_freq_chips;
141 float d_carrier_doppler_hz;
142 float d_acc_carrier_phase_rad;
143 float d_acc_code_phase_secs;
144 float d_code_phase_samples;
145 size_t d_port_ch0;
146 size_t d_port;
147 int32_t d_listen_connection;
148 float d_control_id;
149 Tcp_Communication d_tcp_com;
150
151 // PRN period in samples
152 int32_t d_current_prn_length_samples;
153 int32_t d_next_prn_length_samples;
154
155 // processing samples counters
156 uint64_t d_sample_counter;
157 uint64_t d_acq_sample_stamp;
158
159 // CN0 estimation and lock detector
160 int32_t d_cn0_estimation_counter;
161 volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
162 float d_carrier_lock_test;
163 float d_CN0_SNV_dB_Hz;
164 float d_carrier_lock_threshold;
165 int32_t d_carrier_lock_fail_counter;
166
167 // control vars
168 bool d_enable_tracking;
169 bool d_pull_in;
170
171 // file dump
172 std::string d_dump_filename;
173 std::ofstream d_dump_file;
174
175 std::map<std::string, std::string> systemName;
176 std::string sys;
177};
178
179
180/** \} */
181/** \} */
182#endif // GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
Class that implements carrier wipe-off and correlators.
This class implements a code DLL + carrier PLL VEML (Very Early Minus Late) tracking block for Galile...
This is the class that contains the information that is shared by the processing blocks.
TCP communication class.
High optimized CPU vector multiTAP correlator class.
This interface represents a GNSS block.
Interface of the Gnss_Synchro class.
Interface of the TCP communication class.