mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-10-03 22:31:49 +00:00
Improve headers, large data members first. Improve nav message interfaces
This commit is contained in:
@@ -88,41 +88,30 @@ private:
|
||||
bool acquire_secondary();
|
||||
int32_t save_matfile();
|
||||
|
||||
bool d_pull_in_transitory;
|
||||
bool d_corrected_doppler;
|
||||
bool d_interchange_iq;
|
||||
bool d_veml;
|
||||
bool d_cloop;
|
||||
bool d_secondary;
|
||||
bool d_dump;
|
||||
bool d_dump_mat;
|
||||
bool d_acc_carrier_phase_initialized;
|
||||
bool d_enable_extended_integration;
|
||||
Cpu_Multicorrelator_Real_Codes d_multicorrelator_cpu;
|
||||
Cpu_Multicorrelator_Real_Codes d_correlator_data_cpu; // for data channel
|
||||
|
||||
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;
|
||||
Dll_Pll_Conf d_trk_parameters;
|
||||
|
||||
uint32_t d_channel;
|
||||
uint32_t d_secondary_code_length;
|
||||
uint32_t d_data_secondary_code_length;
|
||||
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)
|
||||
Exponential_Smoother d_cn0_smoother;
|
||||
Exponential_Smoother d_carrier_lock_test_smoother;
|
||||
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
Tracking_loop_filter d_code_loop_filter;
|
||||
Tracking_FLL_PLL_filter d_carrier_loop_filter;
|
||||
|
||||
float *d_prompt_data_shift;
|
||||
float d_rem_carr_phase_rad;
|
||||
Gnss_Synchro *d_acquisition_gnss_synchro;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
double d_signal_carrier_freq;
|
||||
double d_code_period;
|
||||
@@ -175,30 +164,41 @@ private:
|
||||
|
||||
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;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
|
||||
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;
|
||||
float *d_prompt_data_shift;
|
||||
float d_rem_carr_phase_rad;
|
||||
|
||||
Cpu_Multicorrelator_Real_Codes d_multicorrelator_cpu;
|
||||
Cpu_Multicorrelator_Real_Codes d_correlator_data_cpu; // for data channel
|
||||
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;
|
||||
|
||||
Dll_Pll_Conf d_trk_parameters;
|
||||
uint32_t d_channel;
|
||||
uint32_t d_secondary_code_length;
|
||||
uint32_t d_data_secondary_code_length;
|
||||
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)
|
||||
|
||||
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;
|
||||
bool d_pull_in_transitory;
|
||||
bool d_corrected_doppler;
|
||||
bool d_interchange_iq;
|
||||
bool d_veml;
|
||||
bool d_cloop;
|
||||
bool d_secondary;
|
||||
bool d_dump;
|
||||
bool d_dump_mat;
|
||||
bool d_acc_carrier_phase_initialized;
|
||||
bool d_enable_extended_integration;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_H
|
||||
|
||||
@@ -117,50 +117,41 @@ private:
|
||||
void log_data();
|
||||
int32_t save_matfile();
|
||||
|
||||
bool d_veml;
|
||||
bool d_cloop;
|
||||
bool d_secondary;
|
||||
bool d_enable_extended_integration;
|
||||
bool d_dump;
|
||||
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;
|
||||
Dll_Pll_Conf_Fpga d_trk_parameters;
|
||||
|
||||
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;
|
||||
Exponential_Smoother d_cn0_smoother;
|
||||
Exponential_Smoother d_carrier_lock_test_smoother;
|
||||
|
||||
uint32_t d_channel;
|
||||
uint32_t d_secondary_code_length;
|
||||
uint32_t d_data_secondary_code_length;
|
||||
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_fpga_integration_period;
|
||||
uint32_t d_current_fpga_integration_period;
|
||||
Gnss_Synchro *d_acquisition_gnss_synchro;
|
||||
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter_next;
|
||||
Tracking_loop_filter d_code_loop_filter;
|
||||
|
||||
float *d_prompt_data_shift;
|
||||
float d_rem_carr_phase_rad;
|
||||
Tracking_FLL_PLL_filter d_carrier_loop_filter;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
boost::condition_variable d_m_condition;
|
||||
|
||||
boost::mutex d_mutex;
|
||||
|
||||
double d_signal_carrier_freq;
|
||||
double d_code_period;
|
||||
@@ -205,41 +196,50 @@ private:
|
||||
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;
|
||||
uint64_t d_sample_counter;
|
||||
uint64_t d_acq_sample_stamp;
|
||||
uint64_t d_sample_counter_next;
|
||||
|
||||
std::ofstream d_dump_file;
|
||||
float *d_prompt_data_shift;
|
||||
float d_rem_carr_phase_rad;
|
||||
|
||||
std::shared_ptr<Fpga_Multicorrelator_8sc> d_multicorrelator_fpga;
|
||||
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;
|
||||
|
||||
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;
|
||||
uint32_t d_channel;
|
||||
uint32_t d_secondary_code_length;
|
||||
uint32_t d_data_secondary_code_length;
|
||||
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_fpga_integration_period;
|
||||
uint32_t d_current_fpga_integration_period;
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
bool d_veml;
|
||||
bool d_cloop;
|
||||
bool d_secondary;
|
||||
bool d_enable_extended_integration;
|
||||
bool d_dump;
|
||||
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;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
private:
|
||||
// Allocate the device input vectors
|
||||
const std::complex<float> *d_sig_in;
|
||||
std::complex<float> **d_local_codes_resampled;
|
||||
const std::complex<float> *d_local_code_in;
|
||||
std::complex<float> **d_local_codes_resampled;
|
||||
std::complex<float> *d_corr_out;
|
||||
float *d_shifts_chips;
|
||||
int d_code_length_chips;
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
private:
|
||||
// Allocate the device input vectors
|
||||
const lv_16sc_t *d_sig_in;
|
||||
lv_16sc_t **d_local_codes_resampled;
|
||||
const lv_16sc_t *d_local_code_in;
|
||||
lv_16sc_t **d_local_codes_resampled;
|
||||
lv_16sc_t *d_corr_out;
|
||||
float *d_shifts_chips;
|
||||
int d_code_length_chips;
|
||||
|
||||
@@ -48,13 +48,13 @@ public:
|
||||
private:
|
||||
// Allocate the device input vectors
|
||||
const std::complex<float> *d_sig_in;
|
||||
float **d_local_codes_resampled;
|
||||
const float *d_local_code_in;
|
||||
std::complex<float> *d_corr_out;
|
||||
float **d_local_codes_resampled;
|
||||
float *d_shifts_chips;
|
||||
bool d_use_high_dynamics_resampler;
|
||||
int d_code_length_chips;
|
||||
int d_n_correlators;
|
||||
bool d_use_high_dynamics_resampler;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -33,18 +33,10 @@ public:
|
||||
void SetFromConfiguration(ConfigurationInterface *configuration, const std::string &role);
|
||||
|
||||
/* DLL/PLL tracking configuration */
|
||||
int32_t fll_filter_order;
|
||||
bool enable_fll_pull_in;
|
||||
bool enable_fll_steady_state;
|
||||
uint32_t pull_in_time_s;
|
||||
uint32_t bit_synchronization_time_limit_s;
|
||||
int32_t pll_filter_order;
|
||||
int32_t dll_filter_order;
|
||||
double fs_in;
|
||||
uint32_t vector_length;
|
||||
bool dump;
|
||||
bool dump_mat;
|
||||
std::string item_type;
|
||||
std::string dump_filename;
|
||||
double fs_in;
|
||||
double carrier_lock_th;
|
||||
float pll_pull_in_bw_hz;
|
||||
float dll_pull_in_bw_hz;
|
||||
float fll_bw_hz;
|
||||
@@ -59,24 +51,32 @@ public:
|
||||
float slope;
|
||||
float spc;
|
||||
float y_intercept;
|
||||
float cn0_smoother_alpha;
|
||||
float carrier_lock_test_smoother_alpha;
|
||||
uint32_t pull_in_time_s;
|
||||
uint32_t bit_synchronization_time_limit_s;
|
||||
uint32_t vector_length;
|
||||
uint32_t smoother_length;
|
||||
int32_t fll_filter_order;
|
||||
int32_t pll_filter_order;
|
||||
int32_t dll_filter_order;
|
||||
int32_t extend_correlation_symbols;
|
||||
bool carrier_aiding;
|
||||
bool high_dyn;
|
||||
std::string item_type;
|
||||
int32_t cn0_samples;
|
||||
int32_t cn0_smoother_samples;
|
||||
float cn0_smoother_alpha;
|
||||
int32_t carrier_lock_test_smoother_samples;
|
||||
float carrier_lock_test_smoother_alpha;
|
||||
int32_t cn0_min;
|
||||
int32_t max_code_lock_fail;
|
||||
int32_t max_carrier_lock_fail;
|
||||
uint32_t smoother_length;
|
||||
double carrier_lock_th;
|
||||
char signal[3]{};
|
||||
char system;
|
||||
bool enable_fll_pull_in;
|
||||
bool enable_fll_steady_state;
|
||||
bool track_pilot;
|
||||
bool enable_doppler_correction;
|
||||
char system;
|
||||
char signal[3]{};
|
||||
bool carrier_aiding;
|
||||
bool high_dyn;
|
||||
bool dump;
|
||||
bool dump_mat;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,19 +35,12 @@ public:
|
||||
void SetFromConfiguration(ConfigurationInterface* configuration, const std::string& role);
|
||||
|
||||
/* DLL/PLL tracking configuration */
|
||||
int32_t fll_filter_order;
|
||||
bool enable_fll_pull_in;
|
||||
bool enable_fll_steady_state;
|
||||
uint32_t pull_in_time_s; // signed integer, when pull in time is not yet reached it has to be compared against a negative number
|
||||
uint32_t bit_synchronization_time_limit_s;
|
||||
int32_t pll_filter_order;
|
||||
int32_t dll_filter_order;
|
||||
std::string device_name;
|
||||
std::string dump_filename;
|
||||
|
||||
double fs_in;
|
||||
uint32_t vector_length;
|
||||
bool dump;
|
||||
bool dump_mat;
|
||||
std::string dump_filename;
|
||||
double carrier_lock_th;
|
||||
|
||||
float pll_pull_in_bw_hz;
|
||||
float dll_pull_in_bw_hz;
|
||||
float fll_bw_hz;
|
||||
@@ -62,36 +55,47 @@ public:
|
||||
float slope;
|
||||
float spc;
|
||||
float y_intercept;
|
||||
int32_t extend_correlation_symbols;
|
||||
bool carrier_aiding;
|
||||
bool high_dyn;
|
||||
int32_t cn0_samples;
|
||||
int32_t cn0_min;
|
||||
int32_t max_code_lock_fail;
|
||||
int32_t max_carrier_lock_fail;
|
||||
|
||||
int32_t cn0_smoother_samples;
|
||||
float cn0_smoother_alpha;
|
||||
int32_t carrier_lock_test_smoother_samples;
|
||||
float carrier_lock_test_smoother_alpha;
|
||||
|
||||
// int32_t max_lock_fail;
|
||||
uint32_t pull_in_time_s; // signed integer, when pull in time is not yet reached it has to be compared against a negative number
|
||||
uint32_t bit_synchronization_time_limit_s;
|
||||
uint32_t vector_length;
|
||||
uint32_t smoother_length;
|
||||
double carrier_lock_th;
|
||||
bool track_pilot;
|
||||
bool enable_doppler_correction;
|
||||
char system;
|
||||
char signal[3];
|
||||
std::string device_name;
|
||||
uint32_t dev_file_num;
|
||||
uint32_t num_prev_assigned_ch;
|
||||
uint32_t code_length_chips;
|
||||
uint32_t code_samples_per_chip;
|
||||
int32_t* ca_codes;
|
||||
int32_t* data_codes;
|
||||
bool extended_correlation_in_fpga;
|
||||
uint32_t extend_fpga_integration_periods;
|
||||
uint32_t fpga_integration_period;
|
||||
|
||||
int32_t fll_filter_order;
|
||||
int32_t pll_filter_order;
|
||||
int32_t dll_filter_order;
|
||||
int32_t extend_correlation_symbols;
|
||||
int32_t cn0_samples;
|
||||
int32_t cn0_min;
|
||||
int32_t max_code_lock_fail;
|
||||
int32_t max_carrier_lock_fail;
|
||||
int32_t cn0_smoother_samples;
|
||||
int32_t carrier_lock_test_smoother_samples;
|
||||
// int32_t max_lock_fail;
|
||||
|
||||
int32_t* ca_codes;
|
||||
int32_t* data_codes;
|
||||
|
||||
char signal[3];
|
||||
char system;
|
||||
|
||||
bool extended_correlation_in_fpga;
|
||||
bool track_pilot;
|
||||
bool enable_doppler_correction;
|
||||
bool enable_fll_pull_in;
|
||||
bool enable_fll_steady_state;
|
||||
bool carrier_aiding;
|
||||
bool high_dyn;
|
||||
bool dump;
|
||||
bool dump_mat;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,8 +36,12 @@
|
||||
class Exponential_Smoother
|
||||
{
|
||||
public:
|
||||
Exponential_Smoother(); //!< Constructor
|
||||
~Exponential_Smoother() = default; //!< Destructor
|
||||
Exponential_Smoother(); //!< Constructor
|
||||
~Exponential_Smoother() = default; //!< Destructor
|
||||
|
||||
Exponential_Smoother(Exponential_Smoother&&) = default; //!< Move operator
|
||||
Exponential_Smoother& operator=(Exponential_Smoother&& /*other*/) = default; //!< Move assignment operator
|
||||
|
||||
void set_alpha(float alpha); //!< 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001
|
||||
void set_samples_for_initialization(int num_samples); //!< Number of samples averaged for initialization. Default value: 200
|
||||
void reset();
|
||||
@@ -45,18 +49,17 @@ public:
|
||||
void set_offset(float offset);
|
||||
float smooth(float raw);
|
||||
double smooth(double raw);
|
||||
Exponential_Smoother(Exponential_Smoother&&) = default; //!< Move operator
|
||||
Exponential_Smoother& operator=(Exponential_Smoother&& /*other*/) = default; //!< Move assignment operator
|
||||
|
||||
private:
|
||||
std::vector<float> init_buffer_;
|
||||
float alpha_; // takes value 0.0001 if not set
|
||||
int samples_for_initialization_;
|
||||
float one_minus_alpha_;
|
||||
float old_value_;
|
||||
float min_value_;
|
||||
float offset_;
|
||||
bool initializing_;
|
||||
int samples_for_initialization_;
|
||||
int init_counter_;
|
||||
std::vector<float> init_buffer_;
|
||||
bool initializing_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_EXPONENTIAL_SMOOTHER_H
|
||||
|
||||
@@ -193,10 +193,36 @@ private:
|
||||
static const uint32_t local_code_fpga_clear_address_counter = 0x10000000;
|
||||
static const uint32_t test_register_track_writeval = 0x55AA;
|
||||
|
||||
// private functions
|
||||
uint32_t fpga_acquisition_test_register(uint32_t writeval);
|
||||
void fpga_configure_tracking_gps_local_code(int32_t PRN);
|
||||
void fpga_compute_code_shift_parameters();
|
||||
void fpga_configure_code_parameters_in_fpga();
|
||||
void fpga_compute_signal_parameters_in_fpga();
|
||||
void fpga_configure_signal_parameters_in_fpga();
|
||||
void fpga_launch_multicorrelator_fpga();
|
||||
void read_tracking_gps_results();
|
||||
void close_device(void);
|
||||
void write_secondary_code(uint32_t secondary_code_length, std::string *secondary_code_string, uint32_t reg_addr);
|
||||
|
||||
volk_gnsssdr::vector<uint32_t> d_initial_index;
|
||||
volk_gnsssdr::vector<uint32_t> d_initial_interp_counter;
|
||||
|
||||
uint64_t d_initial_sample_counter;
|
||||
|
||||
gr_complex *d_corr_out;
|
||||
gr_complex *d_Prompt_Data;
|
||||
|
||||
float *d_shifts_chips;
|
||||
float *d_prompt_data_shift;
|
||||
|
||||
float d_rem_code_phase_chips;
|
||||
float d_code_phase_step_chips;
|
||||
float d_code_phase_rate_step_chips;
|
||||
float d_rem_carrier_phase_in_rad;
|
||||
float d_phase_step_rad;
|
||||
float d_carrier_phase_rate_step_rad;
|
||||
|
||||
uint32_t d_code_length_chips;
|
||||
uint32_t d_code_length_samples;
|
||||
uint32_t d_n_correlators; // number of correlators
|
||||
@@ -208,24 +234,13 @@ private:
|
||||
// configuration data received from the interface
|
||||
uint32_t d_channel; // channel number
|
||||
uint32_t d_correlator_length_samples;
|
||||
float d_rem_code_phase_chips;
|
||||
float d_code_phase_step_chips;
|
||||
float d_code_phase_rate_step_chips;
|
||||
float d_rem_carrier_phase_in_rad;
|
||||
float d_phase_step_rad;
|
||||
float d_carrier_phase_rate_step_rad;
|
||||
uint32_t d_code_samples_per_chip;
|
||||
bool d_track_pilot;
|
||||
|
||||
// configuration data computed in the format that the FPGA expects
|
||||
volk_gnsssdr::vector<uint32_t> d_initial_index;
|
||||
volk_gnsssdr::vector<uint32_t> d_initial_interp_counter;
|
||||
uint32_t d_code_phase_step_chips_num;
|
||||
uint32_t d_code_phase_rate_step_chips_num;
|
||||
int32_t d_rem_carr_phase_rad_int;
|
||||
int32_t d_phase_step_rad_int;
|
||||
int32_t d_carrier_phase_rate_step_rad_int;
|
||||
uint64_t d_initial_sample_counter;
|
||||
|
||||
// driver
|
||||
std::string d_device_name;
|
||||
@@ -239,19 +254,9 @@ private:
|
||||
// secondary code configuration
|
||||
uint32_t d_secondary_code_0_length;
|
||||
uint32_t d_secondary_code_1_length;
|
||||
bool d_secondary_code_enabled;
|
||||
|
||||
// private functions
|
||||
uint32_t fpga_acquisition_test_register(uint32_t writeval);
|
||||
void fpga_configure_tracking_gps_local_code(int32_t PRN);
|
||||
void fpga_compute_code_shift_parameters();
|
||||
void fpga_configure_code_parameters_in_fpga();
|
||||
void fpga_compute_signal_parameters_in_fpga();
|
||||
void fpga_configure_signal_parameters_in_fpga();
|
||||
void fpga_launch_multicorrelator_fpga();
|
||||
void read_tracking_gps_results();
|
||||
void close_device(void);
|
||||
void write_secondary_code(uint32_t secondary_code_length, std::string *secondary_code_string, uint32_t reg_addr);
|
||||
bool d_track_pilot;
|
||||
bool d_secondary_code_enabled;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_FPGA_MULTICORRELATOR_H
|
||||
|
||||
@@ -37,15 +37,18 @@
|
||||
class Tracking_2nd_DLL_filter
|
||||
{
|
||||
public:
|
||||
Tracking_2nd_DLL_filter();
|
||||
~Tracking_2nd_DLL_filter() = default;
|
||||
explicit Tracking_2nd_DLL_filter(float pdi_code);
|
||||
|
||||
void set_DLL_BW(float dll_bw_hz); //!< Set DLL filter bandwidth [Hz]
|
||||
void set_pdi(float pdi_code); //!< Set Summation interval for code [s]
|
||||
void initialize(); //!< Start tracking with acquisition information
|
||||
float get_code_nco(float DLL_discriminator); //!< Numerically controlled oscillator
|
||||
explicit Tracking_2nd_DLL_filter(float pdi_code);
|
||||
Tracking_2nd_DLL_filter();
|
||||
~Tracking_2nd_DLL_filter() = default;
|
||||
|
||||
private:
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
|
||||
// PLL filter parameters
|
||||
float d_tau1_code = 0.0;
|
||||
float d_tau2_code = 0.0;
|
||||
@@ -54,7 +57,6 @@ private:
|
||||
float d_dlldampingratio = 0.0;
|
||||
float d_old_code_error = 0.0;
|
||||
float d_old_code_nco = 0.0;
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,15 +36,17 @@
|
||||
class Tracking_2nd_PLL_filter
|
||||
{
|
||||
public:
|
||||
Tracking_2nd_PLL_filter();
|
||||
~Tracking_2nd_PLL_filter() = default;
|
||||
explicit Tracking_2nd_PLL_filter(float pdi_carr);
|
||||
|
||||
void set_PLL_BW(float pll_bw_hz); //!< Set PLL loop bandwidth [Hz]
|
||||
void set_pdi(float pdi_carr); //!< Set Summation interval for code [s]
|
||||
void initialize();
|
||||
float get_carrier_nco(float PLL_discriminator);
|
||||
explicit Tracking_2nd_PLL_filter(float pdi_carr);
|
||||
Tracking_2nd_PLL_filter();
|
||||
~Tracking_2nd_PLL_filter() = default;
|
||||
|
||||
private:
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
// PLL filter parameters
|
||||
float d_tau1_carr = 0.0;
|
||||
float d_tau2_carr = 0.0;
|
||||
@@ -53,7 +55,6 @@ private:
|
||||
float d_plldampingratio = 0.0;
|
||||
float d_old_carr_error = 0.0;
|
||||
float d_old_carr_nco = 0.0;
|
||||
void calculate_lopp_coef(float* tau1, float* tau2, float lbw, float zeta, float k);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,15 +26,14 @@
|
||||
class Tracking_FLL_PLL_filter
|
||||
{
|
||||
public:
|
||||
Tracking_FLL_PLL_filter();
|
||||
~Tracking_FLL_PLL_filter() = default;
|
||||
void set_params(float fll_bw_hz, float pll_bw_hz, int order);
|
||||
void initialize(float d_acq_carrier_doppler_hz);
|
||||
float get_carrier_error(float FLL_discriminator, float PLL_discriminator, float correlation_time_s);
|
||||
Tracking_FLL_PLL_filter();
|
||||
~Tracking_FLL_PLL_filter() = default;
|
||||
|
||||
private:
|
||||
// FLL + PLL filter parameters
|
||||
int d_order;
|
||||
float d_pll_w;
|
||||
float d_pll_w0p3;
|
||||
float d_pll_w0f2;
|
||||
@@ -45,6 +44,7 @@ private:
|
||||
float d_pll_w0p2;
|
||||
float d_pll_b3;
|
||||
float d_pll_w0p;
|
||||
int d_order;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,11 +33,11 @@ Tracking_loop_filter::Tracking_loop_filter(float update_interval,
|
||||
float noise_bandwidth,
|
||||
int loop_order,
|
||||
bool include_last_integrator)
|
||||
: d_loop_order(loop_order),
|
||||
: d_noise_bandwidth(noise_bandwidth),
|
||||
d_update_interval(update_interval),
|
||||
d_loop_order(loop_order),
|
||||
d_current_index(0),
|
||||
d_include_last_integrator(include_last_integrator),
|
||||
d_noise_bandwidth(noise_bandwidth),
|
||||
d_update_interval(update_interval)
|
||||
d_include_last_integrator(include_last_integrator)
|
||||
{
|
||||
d_inputs.resize(MAX_LOOP_HISTORY_LENGTH, 0.0);
|
||||
d_outputs.resize(MAX_LOOP_HISTORY_LENGTH, 0.0);
|
||||
@@ -46,11 +46,11 @@ Tracking_loop_filter::Tracking_loop_filter(float update_interval,
|
||||
|
||||
|
||||
Tracking_loop_filter::Tracking_loop_filter()
|
||||
: d_loop_order(2),
|
||||
: d_noise_bandwidth(15.0),
|
||||
d_update_interval(0.001),
|
||||
d_loop_order(2),
|
||||
d_current_index(0),
|
||||
d_include_last_integrator(false),
|
||||
d_noise_bandwidth(15.0),
|
||||
d_update_interval(0.001)
|
||||
d_include_last_integrator(false)
|
||||
{
|
||||
d_inputs.resize(MAX_LOOP_HISTORY_LENGTH, 0.0);
|
||||
d_outputs.resize(MAX_LOOP_HISTORY_LENGTH, 0.0);
|
||||
|
||||
@@ -57,6 +57,9 @@ public:
|
||||
float apply(float current_input);
|
||||
|
||||
private:
|
||||
// Compute the filter coefficients:
|
||||
void update_coefficients();
|
||||
|
||||
// Store the last inputs and outputs:
|
||||
std::vector<float> d_inputs;
|
||||
std::vector<float> d_outputs;
|
||||
@@ -65,15 +68,6 @@ private:
|
||||
std::vector<float> d_input_coefficients;
|
||||
std::vector<float> d_output_coefficients;
|
||||
|
||||
// The loop order:
|
||||
int d_loop_order;
|
||||
|
||||
// The current index in the i/o arrays:
|
||||
int d_current_index;
|
||||
|
||||
// Should the last integrator be included?
|
||||
bool d_include_last_integrator;
|
||||
|
||||
// The noise bandwidth (in Hz)
|
||||
// Note this is an approximation only valid when the product of this
|
||||
// number and the update interval (T) is small.
|
||||
@@ -82,8 +76,14 @@ private:
|
||||
// Loop update interval
|
||||
float d_update_interval;
|
||||
|
||||
// Compute the filter coefficients:
|
||||
void update_coefficients();
|
||||
// The loop order:
|
||||
int d_loop_order;
|
||||
|
||||
// The current index in the i/o arrays:
|
||||
int d_current_index;
|
||||
|
||||
// Should the last integrator be included?
|
||||
bool d_include_last_integrator;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user