18 #ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_H 19 #define GNSS_SDR_DLL_PLL_VEML_TRACKING_H 28 #include <boost/circular_buffer.hpp> 29 #include <gnuradio/block.h> 30 #include <gnuradio/gr_complex.h> 31 #include <gnuradio/types.h> 33 #include <volk_gnsssdr/volk_gnsssdr_alloc.h> 51 using dll_pll_veml_tracking_sptr = gnss_shared_ptr<dll_pll_veml_tracking>;
53 dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(
const Dll_Pll_Conf &conf_);
63 void set_channel(uint32_t channel);
65 void start_tracking();
68 int general_work(
int noutput_items, gr_vector_int &ninput_items,
69 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
override;
71 void forecast(
int noutput_items, gr_vector_int &ninput_items_required)
override;
74 friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(
const Dll_Pll_Conf &conf_);
77 void msg_handler_telemetry_to_trk(
const pmt::pmt_t &msg);
78 void do_correlation_step(
const gr_complex *input_samples);
80 void check_carrier_phase_coherent_initialization();
81 void update_tracking_vars();
82 void clear_tracking_vars();
83 void save_correlation_results();
85 bool cn0_and_tracking_lock_status(
double coh_integration_time_s);
86 bool acquire_secondary();
87 int64_t uint64diff(uint64_t first, uint64_t second);
88 int32_t save_matfile()
const;
103 volk_gnsssdr::vector<float> d_tracking_code;
104 volk_gnsssdr::vector<float> d_data_code;
105 volk_gnsssdr::vector<float> d_local_code_shift_chips;
106 volk_gnsssdr::vector<gr_complex> d_correlator_outs;
107 volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
108 volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
110 boost::circular_buffer<float> d_dll_filt_history;
111 boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
112 boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
113 boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
115 const size_t int_type_hash_code =
typeid(int).hash_code();
117 double d_signal_carrier_freq;
118 double d_code_period;
119 double d_code_chip_rate;
120 double d_acq_code_phase_samples;
121 double d_acq_carrier_doppler_hz;
122 double d_current_correlation_time_s;
123 double d_carr_phase_error_hz;
124 double d_carr_freq_error_hz;
125 double d_carr_error_filt_hz;
126 double d_code_error_chips;
127 double d_code_error_filt_chips;
128 double d_code_freq_chips;
129 double d_carrier_doppler_hz;
130 double d_acc_carrier_phase_rad;
131 double d_rem_code_phase_chips;
132 double d_T_chip_seconds;
133 double d_T_prn_seconds;
134 double d_T_prn_samples;
135 double d_K_blk_samples;
136 double d_carrier_lock_test;
137 double d_CN0_SNV_dB_Hz;
138 double d_carrier_lock_threshold;
139 double d_carrier_phase_step_rad;
140 double d_carrier_phase_rate_step_rad;
141 double d_code_phase_step_chips;
142 double d_code_phase_rate_step_chips;
143 double d_rem_code_phase_samples;
145 gr_complex *d_Very_Early;
147 gr_complex *d_Prompt;
149 gr_complex *d_Very_Late;
151 gr_complex d_VE_accu;
154 gr_complex d_P_accu_old;
156 gr_complex d_VL_accu;
157 gr_complex d_P_data_accu;
159 std::string d_secondary_code_string;
160 std::string d_data_secondary_code_string;
161 std::string d_systemName;
162 std::string d_signal_type;
163 std::string d_signal_pretty_name;
164 std::string d_dump_filename;
166 std::ofstream d_dump_file;
169 uint64_t d_acq_sample_stamp;
171 uint64_t d_last_timetag_samplecounter;
172 bool d_timetag_waiting;
174 float *d_prompt_data_shift;
175 float d_rem_carr_phase_rad;
177 int32_t d_symbols_per_bit;
179 int32_t d_correlation_length_ms;
180 int32_t d_n_correlator_taps;
181 int32_t d_current_prn_length_samples;
182 int32_t d_extend_correlation_symbols_count;
183 int32_t d_extend_correlation_symbols;
184 int32_t d_current_symbol;
185 int32_t d_current_data_symbol;
186 int32_t d_cn0_estimation_counter;
187 int32_t d_carrier_lock_fail_counter;
188 int32_t d_code_lock_fail_counter;
189 int32_t d_code_samples_per_chip;
190 int32_t d_code_length_chips;
193 uint32_t d_secondary_code_length;
194 uint32_t d_data_secondary_code_length;
196 bool d_pull_in_transitory;
197 bool d_corrected_doppler;
198 bool d_interchange_iq;
204 bool d_acc_carrier_phase_initialized;
205 bool d_enable_extended_integration;
206 bool d_Flag_PLL_180_deg_phase_locked;
212 #endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H class that stores both the receiver time, relative to the receiver start and the GNSS time (absolute)...
This class implements a hybrid FLL and PLL filter for tracking carrier loop.
This is the class that contains the information that is shared by the processing blocks.
This interface represents a GNSS block.
Highly optimized CPU vector multiTAP correlator class using real-valued local codes.
Class that implements a first-order exponential smoother.
Class that implements carrier wipe-off and correlators.
This class implements a code DLL + carrier PLL tracking block.
Class that contains all the configuration parameters for generic tracking block based on a DLL and a ...
Generic 1st to 3rd order loop filter implementation.
This class implements a generic 1st, 2nd or 3rd order loop filter.
Interface of a hybrid FLL and PLL filter for tracking carrier loop.
Class that implements an exponential smoother.