1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Indicate with a prefix the private data members for clarity

This commit is contained in:
Carles Fernandez 2020-06-19 03:22:01 +02:00
parent 7ef64860c4
commit 317d72dd4c
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 628 additions and 654 deletions

View File

@ -74,111 +74,49 @@ public:
private: private:
friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_); friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_);
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
explicit dll_pll_veml_tracking(const Dll_Pll_Conf &conf_); explicit dll_pll_veml_tracking(const Dll_Pll_Conf &conf_);
bool cn0_and_tracking_lock_status(double coh_integration_time_s); bool d_pull_in_transitory;
bool acquire_secondary(); bool d_corrected_doppler;
void do_correlation_step(const gr_complex *input_samples); bool d_interchange_iq;
void run_dll_pll();
void check_carrier_phase_coherent_initialization();
void update_tracking_vars();
void clear_tracking_vars();
void save_correlation_results();
void log_data();
int32_t save_matfile();
// tracking configuration vars
Dll_Pll_Conf trk_parameters;
bool d_veml; bool d_veml;
bool d_cloop; bool d_cloop;
uint32_t d_channel;
Gnss_Synchro *d_acquisition_gnss_synchro;
// Signal parameters
bool d_secondary; bool d_secondary;
double d_signal_carrier_freq; bool d_dump;
double d_code_period; bool d_dump_mat;
double d_code_chip_rate; bool d_acc_carrier_phase_initialized;
bool d_enable_extended_integration;
int32_t d_symbols_per_bit;
int32_t d_preamble_length_symbols;
int32_t d_state;
int32_t d_correlation_length_ms;
int32_t d_n_correlator_taps;
int32_t d_current_prn_length_samples;
int32_t d_extend_correlation_symbols_count;
int32_t d_current_symbol;
int32_t d_current_data_symbol;
int32_t d_cn0_estimation_counter;
int32_t d_carrier_lock_fail_counter;
int32_t d_code_lock_fail_counter;
uint32_t d_channel;
uint32_t d_secondary_code_length; uint32_t d_secondary_code_length;
uint32_t d_data_secondary_code_length; uint32_t d_data_secondary_code_length;
uint32_t d_code_length_chips; uint32_t d_code_length_chips;
uint32_t d_code_samples_per_chip; // All signals have 1 sample per chip code except Gal. E1 which has 2 (CBOC disabled) or 12 (CBOC enabled) uint32_t d_code_samples_per_chip; // All signals have 1 sample per chip code except Gal. E1 which has 2 (CBOC disabled) or 12 (CBOC enabled)
int32_t d_symbols_per_bit;
std::string systemName;
std::string signal_type;
std::string *d_secondary_code_string;
std::string *d_data_secondary_code_string;
std::string signal_pretty_name;
int32_t d_preamble_length_symbols; uint64_t d_sample_counter;
uint64_t d_acq_sample_stamp;
// dll filter buffer
boost::circular_buffer<float> d_dll_filt_history;
// tracking state machine
int32_t d_state;
bool d_acc_carrier_phase_initialized;
// Integration period in samples
int32_t d_correlation_length_ms;
int32_t d_n_correlator_taps;
volk_gnsssdr::vector<float> d_tracking_code;
volk_gnsssdr::vector<float> d_data_code;
volk_gnsssdr::vector<float> d_local_code_shift_chips;
float *d_prompt_data_shift; float *d_prompt_data_shift;
Cpu_Multicorrelator_Real_Codes multicorrelator_cpu;
Cpu_Multicorrelator_Real_Codes correlator_data_cpu; // for data channel
/* TODO: currently the multicorrelator does not support adding extra correlator
with different local code, thus we need extra multicorrelator instance.
Implement this functionality inside multicorrelator class
as an enhancement to increase the performance
*/
volk_gnsssdr::vector<gr_complex> d_correlator_outs;
gr_complex *d_Very_Early;
gr_complex *d_Early;
gr_complex *d_Prompt;
gr_complex *d_Late;
gr_complex *d_Very_Late;
bool d_enable_extended_integration;
int32_t d_extend_correlation_symbols_count;
int32_t d_current_symbol;
int32_t d_current_data_symbol;
gr_complex d_VE_accu;
gr_complex d_E_accu;
gr_complex d_P_accu;
gr_complex d_P_accu_old;
gr_complex d_L_accu;
gr_complex d_VL_accu;
gr_complex d_P_data_accu;
volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
double d_code_phase_step_chips;
double d_code_phase_rate_step_chips;
boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
double d_carrier_phase_step_rad;
double d_carrier_phase_rate_step_rad;
boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
// remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples;
float d_rem_carr_phase_rad; float d_rem_carr_phase_rad;
Tracking_loop_filter d_code_loop_filter; double d_signal_carrier_freq;
Tracking_FLL_PLL_filter d_carrier_loop_filter; double d_code_period;
double d_code_chip_rate;
// acquisition
double d_acq_code_phase_samples; double d_acq_code_phase_samples;
double d_acq_carrier_doppler_hz; double d_acq_carrier_doppler_hz;
// tracking vars
bool d_pull_in_transitory;
bool d_corrected_doppler;
bool interchange_iq;
double d_current_correlation_time_s; double d_current_correlation_time_s;
double d_carr_phase_error_hz; double d_carr_phase_error_hz;
double d_carr_freq_error_hz; double d_carr_freq_error_hz;
@ -189,32 +127,78 @@ private:
double d_carrier_doppler_hz; double d_carrier_doppler_hz;
double d_acc_carrier_phase_rad; double d_acc_carrier_phase_rad;
double d_rem_code_phase_chips; double d_rem_code_phase_chips;
double T_chip_seconds; double d_T_chip_seconds;
double T_prn_seconds; double d_T_prn_seconds;
double T_prn_samples; double d_T_prn_samples;
double K_blk_samples; double d_K_blk_samples;
// PRN period in samples
int32_t d_current_prn_length_samples;
// processing samples counters
uint64_t d_sample_counter;
uint64_t d_acq_sample_stamp;
// CN0 estimation and lock detector
int32_t d_cn0_estimation_counter;
int32_t d_carrier_lock_fail_counter;
int32_t d_code_lock_fail_counter;
double d_carrier_lock_test; double d_carrier_lock_test;
double d_CN0_SNV_dB_Hz; double d_CN0_SNV_dB_Hz;
double d_carrier_lock_threshold; double d_carrier_lock_threshold;
double d_carrier_phase_step_rad;
double d_carrier_phase_rate_step_rad;
double d_code_phase_step_chips;
double d_code_phase_rate_step_chips;
double d_rem_code_phase_samples;
gr_complex *d_Very_Early;
gr_complex *d_Early;
gr_complex *d_Prompt;
gr_complex *d_Late;
gr_complex *d_Very_Late;
gr_complex d_VE_accu;
gr_complex d_E_accu;
gr_complex d_P_accu;
gr_complex d_P_accu_old;
gr_complex d_L_accu;
gr_complex d_VL_accu;
gr_complex d_P_data_accu;
std::string *d_secondary_code_string;
std::string *d_data_secondary_code_string;
std::string d_systemName;
std::string d_signal_type;
std::string d_signal_pretty_name;
std::string d_dump_filename;
std::ofstream d_dump_file;
boost::circular_buffer<float> d_dll_filt_history;
boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
boost::circular_buffer<gr_complex> d_Prompt_circular_buffer; boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
volk_gnsssdr::vector<float> d_tracking_code;
volk_gnsssdr::vector<float> d_data_code;
volk_gnsssdr::vector<float> d_local_code_shift_chips;
volk_gnsssdr::vector<gr_complex> d_correlator_outs;
volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
volk_gnsssdr::vector<gr_complex> d_Prompt_buffer; volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
Cpu_Multicorrelator_Real_Codes d_multicorrelator_cpu;
Cpu_Multicorrelator_Real_Codes d_correlator_data_cpu; // for data channel
Dll_Pll_Conf d_trk_parameters;
Exponential_Smoother d_cn0_smoother; Exponential_Smoother d_cn0_smoother;
Exponential_Smoother d_carrier_lock_test_smoother; Exponential_Smoother d_carrier_lock_test_smoother;
// file dump
std::ofstream d_dump_file; Gnss_Synchro *d_acquisition_gnss_synchro;
std::string d_dump_filename;
bool d_dump; Tracking_loop_filter d_code_loop_filter;
bool d_dump_mat; Tracking_FLL_PLL_filter d_carrier_loop_filter;
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
void do_correlation_step(const gr_complex *input_samples);
void run_dll_pll();
void check_carrier_phase_coherent_initialization();
void update_tracking_vars();
void clear_tracking_vars();
void save_correlation_results();
void log_data();
bool cn0_and_tracking_lock_status(double coh_integration_time_s);
bool acquire_secondary();
int32_t save_matfile();
}; };
#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H #endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H

View File

@ -103,101 +103,64 @@ public:
private: private:
friend dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_); friend dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_);
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
explicit dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_); explicit dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_);
bool cn0_and_tracking_lock_status(double coh_integration_time_s);
bool acquire_secondary();
void do_correlation_step();
void run_dll_pll();
void check_carrier_phase_coherent_initialization();
void update_tracking_vars();
void clear_tracking_vars();
void save_correlation_results();
void log_data();
int32_t save_matfile();
// tracking configuration vars
Dll_Pll_Conf_Fpga trk_parameters;
bool d_veml; bool d_veml;
bool d_cloop; bool d_cloop;
uint32_t d_channel;
Gnss_Synchro *d_acquisition_gnss_synchro;
// Signal parameters
bool d_secondary; bool d_secondary;
double d_signal_carrier_freq; bool d_enable_extended_integration;
double d_code_period; bool d_dump;
double d_code_chip_rate; bool d_dump_mat;
bool d_pull_in_transitory;
bool d_corrected_doppler;
bool d_interchange_iq;
bool d_acc_carrier_phase_initialized;
bool d_worker_is_done;
bool d_extended_correlation_in_fpga;
bool d_current_extended_correlation_in_fpga;
bool d_stop_tracking;
bool d_sc_demodulate_enabled;
int32_t d_symbols_per_bit;
int32_t d_state;
int32_t d_extend_correlation_symbols_count;
int32_t d_current_symbol;
int32_t d_current_data_symbol;
int32_t d_current_integration_length_samples;
int32_t d_cn0_estimation_counter;
int32_t d_carrier_lock_fail_counter;
int32_t d_code_lock_fail_counter;
int32_t d_correlation_length_ms;
int32_t d_n_correlator_taps;
int32_t d_next_integration_length_samples;
int32_t d_extend_fpga_integration_periods;
uint32_t d_channel;
uint32_t d_secondary_code_length; uint32_t d_secondary_code_length;
uint32_t d_data_secondary_code_length; uint32_t d_data_secondary_code_length;
uint32_t d_code_length_chips; uint32_t d_code_length_chips;
uint32_t d_code_samples_per_chip; // All signals have 1 sample per chip code except Gal. E1 which has 2 (CBOC disabled) or 12 (CBOC enabled) uint32_t d_code_samples_per_chip; // All signals have 1 sample per chip code except Gal. E1 which has 2 (CBOC disabled) or 12 (CBOC enabled)
int32_t d_symbols_per_bit; uint32_t d_fpga_integration_period;
std::string systemName; uint32_t d_current_fpga_integration_period;
std::string signal_type;
std::string *d_secondary_code_string;
std::string *d_data_secondary_code_string;
std::string signal_pretty_name;
// dll filter buffer uint64_t d_sample_counter;
boost::circular_buffer<float> d_dll_filt_history; uint64_t d_acq_sample_stamp;
// tracking state machine uint64_t d_sample_counter_next;
int32_t d_state;
// Integration period in samples
int32_t d_correlation_length_ms;
int32_t d_n_correlator_taps;
volk_gnsssdr::vector<float> d_local_code_shift_chips;
float *d_prompt_data_shift; float *d_prompt_data_shift;
std::shared_ptr<Fpga_Multicorrelator_8sc> multicorrelator_fpga;
volk_gnsssdr::vector<gr_complex> d_correlator_outs;
gr_complex *d_Very_Early;
gr_complex *d_Early;
gr_complex *d_Prompt;
gr_complex *d_Late;
gr_complex *d_Very_Late;
bool d_enable_extended_integration;
int32_t d_extend_correlation_symbols_count;
int32_t d_current_symbol;
int32_t d_current_data_symbol;
gr_complex d_VE_accu;
gr_complex d_E_accu;
gr_complex d_P_accu;
gr_complex d_P_accu_old;
gr_complex d_L_accu;
gr_complex d_VL_accu;
gr_complex d_P_data_accu;
volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
double d_code_phase_step_chips;
double d_code_phase_rate_step_chips;
boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
double d_carrier_phase_step_rad;
double d_carrier_phase_rate_step_rad;
boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
// remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples;
double d_rem_code_phase_samples_prev;
float d_rem_carr_phase_rad; float d_rem_carr_phase_rad;
Tracking_loop_filter d_code_loop_filter; double d_signal_carrier_freq;
Tracking_FLL_PLL_filter d_carrier_loop_filter; double d_code_period;
double d_code_chip_rate;
// acquisition double d_code_phase_step_chips;
double d_code_phase_rate_step_chips;
double d_carrier_phase_step_rad;
double d_carrier_phase_rate_step_rad;
double d_acq_code_phase_samples; double d_acq_code_phase_samples;
double d_acq_carrier_doppler_hz; double d_acq_carrier_doppler_hz;
double d_rem_code_phase_samples;
// tracking vars double d_rem_code_phase_samples_prev;
bool d_pull_in_transitory;
bool d_corrected_doppler;
bool interchange_iq;
bool d_acc_carrier_phase_initialized;
double d_current_correlation_time_s; double d_current_correlation_time_s;
double d_carr_phase_error_hz; double d_carr_phase_error_hz;
double d_carr_freq_error_hz; double d_carr_freq_error_hz;
@ -208,46 +171,75 @@ private:
double d_carrier_doppler_hz; double d_carrier_doppler_hz;
double d_acc_carrier_phase_rad; double d_acc_carrier_phase_rad;
double d_rem_code_phase_chips; double d_rem_code_phase_chips;
double T_chip_seconds; double d_T_chip_seconds;
double T_prn_seconds; double d_T_prn_seconds;
double T_prn_samples; double d_T_prn_samples;
double K_blk_samples; double d_K_blk_samples;
// integration period in samples
int32_t d_current_integration_length_samples;
// processing samples counters
uint64_t d_sample_counter;
uint64_t d_acq_sample_stamp;
// CN0 estimation and lock detector
int32_t d_cn0_estimation_counter;
int32_t d_carrier_lock_fail_counter;
int32_t d_code_lock_fail_counter;
double d_carrier_lock_test; double d_carrier_lock_test;
double d_CN0_SNV_dB_Hz; double d_CN0_SNV_dB_Hz;
double d_carrier_lock_threshold; double d_carrier_lock_threshold;
boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
Exponential_Smoother d_cn0_smoother;
Exponential_Smoother d_carrier_lock_test_smoother;
// file dump
std::ofstream d_dump_file;
std::string d_dump_filename;
bool d_dump;
bool d_dump_mat;
bool d_extended_correlation_in_fpga; gr_complex *d_Very_Early;
bool d_current_extended_correlation_in_fpga; gr_complex *d_Early;
int32_t d_next_integration_length_samples; gr_complex *d_Prompt;
uint64_t d_sample_counter_next; gr_complex *d_Late;
bool d_sc_demodulate_enabled; gr_complex *d_Very_Late;
int32_t d_extend_fpga_integration_periods;
uint32_t d_fpga_integration_period; gr_complex d_VE_accu;
uint32_t d_current_fpga_integration_period; gr_complex d_E_accu;
bool d_worker_is_done; gr_complex d_P_accu;
boost::condition_variable m_condition; gr_complex d_P_accu_old;
gr_complex d_L_accu;
gr_complex d_VL_accu;
gr_complex d_P_data_accu;
std::string d_systemName;
std::string d_signal_type;
std::string *d_secondary_code_string;
std::string *d_data_secondary_code_string;
std::string d_signal_pretty_name;
std::string d_dump_filename;
std::ofstream d_dump_file;
std::shared_ptr<Fpga_Multicorrelator_8sc> d_multicorrelator_fpga;
volk_gnsssdr::vector<float> d_local_code_shift_chips;
volk_gnsssdr::vector<gr_complex> d_correlator_outs;
volk_gnsssdr::vector<gr_complex> d_Prompt_Data;
volk_gnsssdr::vector<gr_complex> d_Prompt_buffer;
boost::circular_buffer<float> d_dll_filt_history;
boost::circular_buffer<std::pair<double, double>> d_code_ph_history;
boost::circular_buffer<std::pair<double, double>> d_carr_ph_history;
boost::circular_buffer<gr_complex> d_Prompt_circular_buffer;
boost::condition_variable d_m_condition;
boost::mutex d_mutex; boost::mutex d_mutex;
bool d_stop_tracking; Dll_Pll_Conf_Fpga d_trk_parameters;
Exponential_Smoother d_cn0_smoother;
Exponential_Smoother d_carrier_lock_test_smoother;
Gnss_Synchro *d_acquisition_gnss_synchro;
Tracking_loop_filter d_code_loop_filter;
Tracking_FLL_PLL_filter d_carrier_loop_filter;
void msg_handler_telemetry_to_trk(const pmt::pmt_t &msg);
bool cn0_and_tracking_lock_status(double coh_integration_time_s);
bool acquire_secondary();
void do_correlation_step();
void run_dll_pll();
void check_carrier_phase_coherent_initialization();
void update_tracking_vars();
void clear_tracking_vars();
void save_correlation_results();
void log_data();
int32_t save_matfile();
}; };
#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H #endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H