diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h index 8ff450f1a..45a90c111 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.h @@ -206,52 +206,60 @@ private: float estimate_input_power(gr_complex* in); std::weak_ptr d_channel_fsm; - int64_t d_fs_in; - int d_samples_per_ms; - int d_sampled_ms; - int d_samples_per_code; - unsigned int d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; - unsigned int d_doppler_max; - unsigned int d_doppler_step; - unsigned int d_max_dwells; - unsigned int d_well_count; - unsigned int d_fft_size; - uint64_t d_sample_counter; + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + std::vector> d_grid_doppler_wipeoffs; - unsigned int d_num_doppler_bins; std::vector d_fft_code_I_A; std::vector d_fft_code_I_B; std::vector d_fft_code_Q_A; std::vector d_fft_code_Q_B; std::vector d_inbuffer; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; - unsigned int d_code_phase; - float d_doppler_freq; - float d_mag; std::vector d_magnitudeIA; std::vector d_magnitudeIB; std::vector d_magnitudeQA; std::vector d_magnitudeQB; - float d_input_power; - float d_test_statistics; - bool d_bit_transition_flag; - std::ofstream d_dump_file; - bool d_active; - int d_state; - bool d_dump; - bool d_both_signal_components; - int d_CAF_window_hz; std::vector d_CAF_vector; std::vector d_CAF_vector_I; std::vector d_CAF_vector_Q; - unsigned int d_channel; + + std::string d_satellite_str; std::string d_dump_filename; + + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; + + int d_state; + int d_samples_per_ms; + int d_sampled_ms; + int d_samples_per_code; + int d_CAF_window_hz; + unsigned int d_channel; unsigned int d_buffer_count; unsigned int d_gr_stream_buffer; + unsigned int d_doppler_resolution; + unsigned int d_doppler_max; + unsigned int d_doppler_step; + unsigned int d_max_dwells; + unsigned int d_well_count; + unsigned int d_fft_size; + unsigned int d_num_doppler_bins; + unsigned int d_code_phase; + + bool d_bit_transition_flag; + bool d_active; + bool d_dump; + bool d_both_signal_components; }; #endif // GNSS_SDR_GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h index f9c998b7d..f8a9bb204 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.h @@ -191,39 +191,45 @@ private: int32_t doppler_shift, int32_t doppler_offset); + std::weak_ptr d_channel_fsm; + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector> d_grid_doppler_wipeoffs; + std::vector d_fft_code_A; + std::vector d_fft_code_B; + std::vector d_magnitude; + + std::string d_satellite_str; + std::string d_dump_filename; + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; + int32_t d_state; int32_t d_samples_per_ms; int32_t d_samples_per_code; + uint32_t d_channel; uint32_t d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; uint32_t d_doppler_max; uint32_t d_doppler_step; uint32_t d_sampled_ms; uint32_t d_max_dwells; uint32_t d_well_count; uint32_t d_fft_size; - uint64_t d_sample_counter; - std::vector> d_grid_doppler_wipeoffs; uint32_t d_num_doppler_bins; - std::vector d_fft_code_A; - std::vector d_fft_code_B; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; uint32_t d_code_phase; - float d_doppler_freq; - float d_mag; - std::vector d_magnitude; - float d_input_power; - float d_test_statistics; - std::ofstream d_dump_file; + bool d_active; - int32_t d_state; bool d_dump; - uint32_t d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; }; #endif // GNSS_SDR_PCPS_8MS_ACQUISITION_CC_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index 3fa50b088..fc01a8d09 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -199,41 +199,51 @@ private: void reset_grid(); void update_carrier_wipeoff(); bool start(); - Acq_Conf acq_parameters; - int64_t d_fs_in; - int d_samples_per_ms; - int d_max_dwells; - int d_gnuradio_forecast_samples; - float d_threshold; - std::string d_satellite_str; - int d_config_doppler_max; - int d_num_doppler_points; - int d_doppler_step; - unsigned int d_fft_size; - uint64_t d_sample_counter; + + std::weak_ptr d_channel_fsm; + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + volk_gnsssdr::vector>> d_grid_doppler_wipeoffs; + volk_gnsssdr::vector> d_grid_data; volk_gnsssdr::vector d_fft_codes; volk_gnsssdr::vector d_10_ms_buffer; volk_gnsssdr::vector d_magnitude; - volk_gnsssdr::vector> d_grid_data; - volk_gnsssdr::vector>> d_grid_doppler_wipeoffs; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; + + arma::fmat grid_; + + std::string d_satellite_str; + std::string d_dump_filename; + Gnss_Synchro* d_gnss_synchro; - unsigned int d_code_phase; + + Acq_Conf acq_parameters; + + int64_t d_fs_in; + int64_t d_dump_number; + uint64_t d_sample_counter; + float d_doppler_freq; + float d_threshold; float d_test_statistics; + int d_positive_acq; int d_state; - bool d_active; + int d_samples_per_ms; + int d_max_dwells; + int d_gnuradio_forecast_samples; + int d_config_doppler_max; + int d_num_doppler_points; + int d_doppler_step; int d_well_count; int d_n_samples_in_buffer; - bool d_dump; unsigned int d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; - arma::fmat grid_; - int64_t d_dump_number; + unsigned int d_fft_size; + unsigned int d_code_phase; unsigned int d_dump_channel; + + bool d_active; + bool d_dump; }; #endif /* pcps_acquisition_fine_doppler_cc*/ diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h index c725a99b5..132c7a963 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.h @@ -149,6 +149,11 @@ public: d_threshold = threshold; } + inline void set_state(int32_t state) + { + d_state = state; + } + /*! * \brief Set maximum Doppler grid search * \param doppler_max - Maximum Doppler shift considered in the grid search [Hz]. @@ -195,44 +200,48 @@ private: void reset_grid(); void redefine_grid(); + std::weak_ptr d_channel_fsm; + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector>> d_grid_doppler_wipeoffs; + std::vector> d_grid_data; + std::vector d_fft_codes; + + std::string d_satellite_str; + std::string d_dump_filename; + + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_threshold; + float d_doppler_freq; + float d_input_power; + float d_test_statistics; int32_t d_samples_per_ms; int32_t d_max_dwells; - uint32_t d_doppler_resolution; int32_t d_gnuradio_forecast_samples; - float d_threshold; - std::string d_satellite_str; int32_t d_doppler_max; int32_t d_doppler_min; int32_t d_config_doppler_max; int32_t d_config_doppler_min; - int32_t d_num_doppler_points; int32_t d_doppler_step; + int32_t d_state; + int32_t d_well_count; + uint32_t d_doppler_resolution; + uint32_t d_channel; uint32_t d_sampled_ms; uint32_t d_fft_size; - uint64_t d_sample_counter; - std::vector d_fft_codes; - - std::vector> d_grid_data; - std::vector>> d_grid_doppler_wipeoffs; - - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; uint32_t d_code_phase; - float d_doppler_freq; - float d_input_power; - float d_test_statistics; - std::ofstream d_dump_file; - int32_t d_state; + bool d_active; bool d_disable_assist; - int32_t d_well_count; bool d_dump; - uint32_t d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; }; #endif // GNSS_SDR_PCPS_ASSISTED_ACQUISITION_CC_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h index 567bc16a0..8775c8476 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.h @@ -186,43 +186,51 @@ private: void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); + std::weak_ptr d_channel_fsm; + + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector> d_grid_doppler_wipeoffs; + std::vector d_fft_code_data; + std::vector d_fft_code_pilot; + std::vector d_data_correlation; + std::vector d_pilot_correlation; + std::vector d_correlation_plus; + std::vector d_correlation_minus; + std::vector d_magnitude; + + std::ofstream d_dump_file; + std::string d_satellite_str; + std::string d_dump_filename; + + Gnss_Synchro* d_gnss_synchro; + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; + + int32_t d_state; int32_t d_samples_per_ms; int32_t d_samples_per_code; uint32_t d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; uint32_t d_doppler_max; uint32_t d_doppler_step; uint32_t d_sampled_ms; uint32_t d_max_dwells; uint32_t d_well_count; uint32_t d_fft_size; - uint64_t d_sample_counter; - std::vector> d_grid_doppler_wipeoffs; uint32_t d_num_doppler_bins; - std::vector d_fft_code_data; - std::vector d_fft_code_pilot; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; uint32_t d_code_phase; - float d_doppler_freq; - float d_mag; - std::vector d_magnitude; - std::vector d_data_correlation; - std::vector d_pilot_correlation; - std::vector d_correlation_plus; - std::vector d_correlation_minus; - float d_input_power; - float d_test_statistics; - std::ofstream d_dump_file; - bool d_active; - int32_t d_state; - bool d_dump; uint32_t d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; + + bool d_active; + bool d_dump; }; #endif // GNSS_SDR_PCPS_CCCWSR_ACQUISITION_CC_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h index d9d9ce8e5..f940d3618 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h @@ -224,48 +224,6 @@ private: int init_opencl_environment(const std::string& kernel_filename); - int64_t d_fs_in; - int d_samples_per_ms; - int d_samples_per_code; - uint32_t d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; - uint32_t d_doppler_max; - uint32_t d_doppler_step; - uint32_t d_sampled_ms; - uint32_t d_max_dwells; - uint32_t d_well_count; - uint32_t d_fft_size; - uint32_t d_fft_size_pow2; - int* d_max_doppler_indexs; - uint64_t d_sample_counter; - std::vector> d_grid_doppler_wipeoffs; - uint32_t d_num_doppler_bins; - std::vector d_fft_codes; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; - uint32_t d_code_phase; - float d_doppler_freq; - float d_mag; - std::vector d_magnitude; - float d_input_power; - float d_test_statistics; - bool d_bit_transition_flag; - std::ofstream d_dump_file; - bool d_active; - int d_state; - bool d_core_working; - bool d_dump; - uint32_t d_channel; - std::string d_dump_filename; - std::vector d_zero_vector; - std::vector> d_in_buffer; - std::vector d_sample_counter_buffer; - uint32_t d_in_dwell_count; - std::weak_ptr d_channel_fsm; - int d_opencl; - cl::Platform d_cl_platform; cl::Device d_cl_device; cl::Context d_cl_context; @@ -279,6 +237,59 @@ private: cl::CommandQueue* d_cl_queue; clFFT_Plan d_cl_fft_plan; cl_int d_cl_fft_batch_size; + + std::weak_ptr d_channel_fsm; + + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector> d_grid_doppler_wipeoffs; + std::vector> d_in_buffer; + std::vector d_fft_codes; + std::vector d_zero_vector; + std::vector d_sample_counter_buffer; + std::vector d_magnitude; + + std::string d_dump_filename; + std::string d_satellite_str; + + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + + int64_t d_fs_in; + uint64_t d_sample_counter; + + int* d_max_doppler_indexs; + + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; + + int d_samples_per_ms; + int d_samples_per_code; + int d_state; + int d_opencl; + + uint32_t d_doppler_resolution; + uint32_t d_doppler_max; + uint32_t d_doppler_step; + uint32_t d_sampled_ms; + uint32_t d_max_dwells; + uint32_t d_well_count; + uint32_t d_fft_size; + uint32_t d_fft_size_pow2; + uint32_t d_num_doppler_bins; + uint32_t d_code_phase; + uint32_t d_channel; + uint32_t d_in_dwell_count; + + bool d_bit_transition_flag; + bool d_active; + bool d_core_working; + bool d_dump; }; #endif diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h index a501993b7..9ba97645d 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.h @@ -212,47 +212,55 @@ private: void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); + std::weak_ptr d_channel_fsm; + + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector> d_grid_doppler_wipeoffs; std::vector d_code; - uint32_t d_folding_factor; // also referred in the paper as 'p' - std::vector d_possible_delay; - std::vector d_corr_output_f; - std::vector d_magnitude_folded; + std::vector d_fft_codes; std::vector d_signal_folded; std::vector d_code_folded; - float d_noise_floor_power; + std::vector d_magnitude; + std::vector d_corr_output_f; + std::vector d_magnitude_folded; + std::vector d_possible_delay; + + std::string d_dump_filename; + std::string d_satellite_str; + + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_noise_floor_power; + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; int32_t d_samples_per_ms; int32_t d_samples_per_code; + int32_t d_state; + uint32_t d_channel; + uint32_t d_folding_factor; // also referred in the paper as 'p' uint32_t d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; uint32_t d_doppler_max; uint32_t d_doppler_step; uint32_t d_sampled_ms; uint32_t d_max_dwells; uint32_t d_well_count; uint32_t d_fft_size; - uint64_t d_sample_counter; - std::vector> d_grid_doppler_wipeoffs; uint32_t d_num_doppler_bins; - std::vector d_fft_codes; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; uint32_t d_code_phase; - float d_doppler_freq; - float d_mag; - std::vector d_magnitude; - float d_input_power; - float d_test_statistics; + bool d_bit_transition_flag; - std::ofstream d_dump_file; bool d_active; - int32_t d_state; bool d_dump; - uint32_t d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; }; #endif // GNSS_SDR_PCPS_QUICKSYNC_ACQUISITION_CC_H diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h index 3f267439f..4d8831c7c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.h @@ -202,12 +202,36 @@ private: void calculate_magnitudes(gr_complex* fft_begin, int32_t doppler_shift, int32_t doppler_offset); + std::weak_ptr d_channel_fsm; + + std::unique_ptr d_fft_if; + std::unique_ptr d_ifft; + + std::vector> d_grid_doppler_wipeoffs; + std::vector> d_grid_data; + std::vector d_fft_codes; + std::vector d_magnitude; + + std::string d_satellite_str; + std::string d_dump_filename; + + std::ofstream d_dump_file; + + Gnss_Synchro* d_gnss_synchro; + int64_t d_fs_in; + uint64_t d_sample_counter; + + float d_threshold; + float d_doppler_freq; + float d_mag; + float d_input_power; + float d_test_statistics; + int32_t d_state; int32_t d_samples_per_ms; int32_t d_samples_per_code; + uint32_t d_channel; uint32_t d_doppler_resolution; - float d_threshold; - std::string d_satellite_str; uint32_t d_doppler_max; uint32_t d_doppler_step; uint32_t d_sampled_ms; @@ -217,27 +241,11 @@ private: uint32_t d_tong_max_val; uint32_t d_tong_max_dwells; uint32_t d_fft_size; - uint64_t d_sample_counter; - std::vector> d_grid_doppler_wipeoffs; uint32_t d_num_doppler_bins; - std::vector d_fft_codes; - std::vector> d_grid_data; - std::unique_ptr d_fft_if; - std::unique_ptr d_ifft; - Gnss_Synchro* d_gnss_synchro; uint32_t d_code_phase; - float d_doppler_freq; - float d_mag; - std::vector d_magnitude; - float d_input_power; - float d_test_statistics; - std::ofstream d_dump_file; + bool d_active; - int32_t d_state; bool d_dump; - uint32_t d_channel; - std::weak_ptr d_channel_fsm; - std::string d_dump_filename; }; #endif // GNSS_SDR_PCPS_TONG_ACQUISITION_CC_H