21 #ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_H 22 #define GNSS_SDR_DLL_PLL_VEML_TRACKING_H 29 #include <boost/circular_buffer.hpp> 30 #include <gnuradio/block.h> 31 #include <gnuradio/gr_complex.h> 32 #include <gnuradio/types.h> 34 #include <volk_gnsssdr/volk_gnsssdr_alloc.h> 41 #if GNURADIO_USES_STD_POINTERS 44 #include <boost/shared_ptr.hpp> 50 #if GNURADIO_USES_STD_POINTERS 51 using dll_pll_veml_tracking_sptr = std::shared_ptr<dll_pll_veml_tracking>;
53 using dll_pll_veml_tracking_sptr = boost::shared_ptr<dll_pll_veml_tracking>;
57 dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(
const Dll_Pll_Conf &conf_);
67 void set_channel(uint32_t channel);
69 void start_tracking();
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);
75 void forecast(
int noutput_items, gr_vector_int &ninput_items_required);
78 friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(
const Dll_Pll_Conf &conf_);
81 void msg_handler_telemetry_to_trk(
const pmt::pmt_t &msg);
82 void do_correlation_step(
const gr_complex *input_samples);
84 void check_carrier_phase_coherent_initialization();
85 void update_tracking_vars();
86 void clear_tracking_vars();
87 void save_correlation_results();
89 bool cn0_and_tracking_lock_status(
double coh_integration_time_s);
90 bool acquire_secondary();
91 int32_t save_matfile()
const;
106 volk_gnsssdr::vector<float> d_tracking_code;
107 volk_gnsssdr::vector<float> d_data_code;
108 volk_gnsssdr::vector<float> d_local_code_shift_chips;
109 volk_gnsssdr::vector<gr_complex> d_correlator_outs;
110 volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
111 volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
113 boost::circular_buffer<float> d_dll_filt_history;
114 boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
115 boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
116 boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
118 const size_t int_type_hash_code =
typeid(int).hash_code();
120 double d_signal_carrier_freq;
121 double d_code_period;
122 double d_code_chip_rate;
123 double d_acq_code_phase_samples;
124 double d_acq_carrier_doppler_hz;
125 double d_current_correlation_time_s;
126 double d_carr_phase_error_hz;
127 double d_carr_freq_error_hz;
128 double d_carr_error_filt_hz;
129 double d_code_error_chips;
130 double d_code_error_filt_chips;
131 double d_code_freq_chips;
132 double d_carrier_doppler_hz;
133 double d_acc_carrier_phase_rad;
134 double d_rem_code_phase_chips;
135 double d_T_chip_seconds;
136 double d_T_prn_seconds;
137 double d_T_prn_samples;
138 double d_K_blk_samples;
139 double d_carrier_lock_test;
140 double d_CN0_SNV_dB_Hz;
141 double d_carrier_lock_threshold;
142 double d_carrier_phase_step_rad;
143 double d_carrier_phase_rate_step_rad;
144 double d_code_phase_step_chips;
145 double d_code_phase_rate_step_chips;
146 double d_rem_code_phase_samples;
148 gr_complex *d_Very_Early;
150 gr_complex *d_Prompt;
152 gr_complex *d_Very_Late;
154 gr_complex d_VE_accu;
157 gr_complex d_P_accu_old;
159 gr_complex d_VL_accu;
160 gr_complex d_P_data_accu;
162 std::string d_secondary_code_string;
163 std::string d_data_secondary_code_string;
164 std::string d_systemName;
165 std::string d_signal_type;
166 std::string d_signal_pretty_name;
167 std::string d_dump_filename;
169 std::ofstream d_dump_file;
171 uint64_t d_sample_counter;
172 uint64_t d_acq_sample_stamp;
174 float *d_prompt_data_shift;
175 float d_rem_carr_phase_rad;
177 int32_t d_symbols_per_bit;
178 int32_t d_preamble_length_symbols;
180 int32_t d_correlation_length_ms;
181 int32_t d_n_correlator_taps;
182 int32_t d_current_prn_length_samples;
183 int32_t d_extend_correlation_symbols_count;
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;
208 #endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H
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.
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.