61class dll_pll_veml_tracking :
public gr::block
64 ~dll_pll_veml_tracking()
override;
66 void set_channel(uint32_t channel);
68 void start_tracking();
71 int general_work(
int noutput_items, gr_vector_int &ninput_items,
72 gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
override;
74 void forecast(
int noutput_items, gr_vector_int &ninput_items_required)
override;
77 friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(
const Dll_Pll_Conf &conf_);
78 explicit dll_pll_veml_tracking(
const Dll_Pll_Conf &conf_);
80 void msg_handler_telemetry_to_trk(
const pmt::pmt_t &msg);
81 void do_correlation_step(
const gr_complex *input_samples);
83 void check_carrier_phase_coherent_initialization();
84 void update_tracking_vars();
85 void clear_tracking_vars();
86 void save_correlation_results();
88 void configure_bit_synchronizer();
89 bool cn0_and_tracking_lock_status(
double coh_integration_time_s);
90 bool acquire_secondary();
91 int64_t uint64diff(uint64_t first, uint64_t second);
92 int32_t save_matfile()
const;
109 volk_gnsssdr::vector<float> d_tracking_code;
110 volk_gnsssdr::vector<float> d_data_code;
111 volk_gnsssdr::vector<float> d_local_code_shift_chips;
112 volk_gnsssdr::vector<gr_complex> d_correlator_outs;
113 volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
114 volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
116 boost::circular_buffer<float> d_dll_filt_history;
117 boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
118 boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
119 boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
121 const size_t d_int_type_hash_code =
typeid(int).hash_code();
122 const size_t d_tow_to_trk_type_hash_code =
typeid(std::shared_ptr<TOW_to_trk>).hash_code();
124 double d_signal_carrier_freq;
125 double d_code_period;
126 double d_code_chip_rate;
127 double d_acq_code_phase_samples;
128 double d_acq_carrier_doppler_hz;
129 double d_current_correlation_time_s;
130 double d_carr_phase_error_hz;
131 double d_carr_freq_error_hz;
132 double d_carr_error_filt_hz;
133 double d_code_error_chips;
134 double d_code_error_filt_chips;
135 double d_code_freq_chips;
136 double d_cfo_frequency_hz;
137 double d_carrier_doppler_hz;
138 double d_acc_carrier_phase_rad;
139 double d_rem_code_phase_chips;
140 double d_T_chip_seconds;
141 double d_T_prn_seconds;
142 double d_T_prn_samples;
143 double d_K_blk_samples;
144 double d_carrier_lock_test;
145 double d_CN0_SNV_dB_Hz;
146 double d_carrier_lock_threshold;
147 double d_carrier_phase_step_rad;
148 double d_carrier_phase_rate_step_rad;
149 double d_code_phase_step_chips;
150 double d_code_phase_rate_step_chips;
151 double d_rem_code_phase_samples;
153 gr_complex *d_Very_Early;
155 gr_complex *d_Prompt;
157 gr_complex *d_Very_Late;
159 gr_complex d_VE_accu;
162 gr_complex d_P_accu_old;
164 gr_complex d_VL_accu;
165 gr_complex d_P_data_accu;
167 std::string d_secondary_code_string;
168 std::string d_data_secondary_code_string;
169 std::string d_systemName;
170 std::string d_signal_type;
171 std::string d_signal_pretty_name;
172 std::string d_dump_filename;
174 std::ofstream d_dump_file;
177 uint64_t d_acq_sample_stamp;
179 std::shared_ptr<TOW_to_trk> d_last_tow_received;
180 uint64_t d_last_timetag_samplecounter;
181 bool d_timetag_waiting;
183 float *d_prompt_data_shift;
184 float d_rem_carr_phase_rad;
186 uint64_t d_tow_from_telemetry_ms{};
187 int64_t d_bit_sync_target_epoch{};
188 int32_t d_wn_from_telemetry{};
190 int32_t d_symbols_per_bit;
192 int32_t d_correlation_length_ms;
193 int32_t d_n_correlator_taps;
194 int32_t d_current_prn_length_samples;
195 int32_t d_extend_correlation_symbols_count;
196 int32_t d_extend_correlation_symbols;
197 int32_t d_current_symbol;
198 int32_t d_current_data_symbol;
199 int32_t d_cn0_estimation_counter;
200 int32_t d_carrier_lock_fail_counter;
201 int32_t d_code_lock_fail_counter;
202 int32_t d_code_samples_per_chip;
203 int32_t d_code_length_chips;
206 uint32_t d_secondary_code_length;
207 uint32_t d_data_secondary_code_length;
209 bool d_pull_in_transitory;
210 bool d_corrected_doppler;
211 bool d_interchange_iq;
217 bool d_acc_carrier_phase_initialized;
218 bool d_enable_extended_integration;
219 bool d_Flag_PLL_180_deg_phase_locked;
220 bool d_use_histogram_bit_sync;
221 bool d_wait_for_bit_edge{
false};