mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Make the address sanitizer happy
This commit is contained in:
parent
e09a37ca61
commit
2287564752
@ -57,7 +57,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
code_.reserve(vector_length_);
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
|
@ -96,25 +96,25 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
d_CAF_window_hz = CAF_window_hz_;
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_inbuffer.reserve(d_fft_size);
|
||||
d_fft_code_I_A.reserve(d_fft_size);
|
||||
d_magnitudeIA.reserve(d_fft_size);
|
||||
d_inbuffer = std::vector<gr_complex>(d_fft_size);
|
||||
d_fft_code_I_A = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitudeIA = std::vector<float>(d_fft_size);
|
||||
|
||||
if (d_both_signal_components == true)
|
||||
{
|
||||
d_fft_code_Q_A.reserve(d_fft_size);
|
||||
d_magnitudeQA.reserve(d_fft_size);
|
||||
d_fft_code_Q_A = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitudeQA = std::vector<float>(d_fft_size);
|
||||
}
|
||||
|
||||
// IF COHERENT INTEGRATION TIME > 1
|
||||
if (d_sampled_ms > 1)
|
||||
{
|
||||
d_fft_code_I_B.reserve(d_fft_size);
|
||||
d_magnitudeIB.reserve(d_fft_size);
|
||||
d_fft_code_I_B = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitudeIB = std::vector<float>(d_fft_size);
|
||||
if (d_both_signal_components == true)
|
||||
{
|
||||
d_fft_code_Q_B.reserve(d_fft_size);
|
||||
d_magnitudeQB.reserve(d_fft_size);
|
||||
d_fft_code_Q_B = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitudeQB = std::vector<float>(d_fft_size);
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,11 +244,11 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
|
||||
* separately before non-coherent integration */
|
||||
if (d_CAF_window_hz > 0)
|
||||
{
|
||||
d_CAF_vector.reserve(d_num_doppler_bins);
|
||||
d_CAF_vector_I.reserve(d_num_doppler_bins);
|
||||
d_CAF_vector = std::vector<float>(d_num_doppler_bins);
|
||||
d_CAF_vector_I = std::vector<float>(d_num_doppler_bins);
|
||||
if (d_both_signal_components == true)
|
||||
{
|
||||
d_CAF_vector_Q.reserve(d_num_doppler_bins);
|
||||
d_CAF_vector_Q = std::vector<float>(d_num_doppler_bins);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
||||
d_max_dwells = conf_.max_dwells;
|
||||
d_gnuradio_forecast_samples = d_fft_size;
|
||||
d_state = 0;
|
||||
d_fft_codes.reserve(d_fft_size);
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
d_10_ms_buffer.reserve(50 * d_samples_per_ms);
|
||||
d_fft_codes = volk_gnsssdr::vector<gr_complex>(d_fft_size);
|
||||
d_magnitude = volk_gnsssdr::vector<float>(d_fft_size);
|
||||
d_10_ms_buffer = volk_gnsssdr::vector<gr_complex>(50 * d_samples_per_ms);
|
||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||
|
||||
|
@ -66,7 +66,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
d_input_power = 0.0;
|
||||
d_state = 0;
|
||||
d_disable_assist = false;
|
||||
d_fft_codes.reserve(d_fft_size);
|
||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||
|
||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||
|
@ -77,13 +77,13 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
d_input_power = 0.0;
|
||||
d_num_doppler_bins = 0;
|
||||
|
||||
d_fft_code_data.reserve(d_fft_size);
|
||||
d_fft_code_pilot.reserve(d_fft_size);
|
||||
d_data_correlation.reserve(d_fft_size);
|
||||
d_pilot_correlation.reserve(d_fft_size);
|
||||
d_correlation_plus.reserve(d_fft_size);
|
||||
d_correlation_minus.reserve(d_fft_size);
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
d_fft_code_data = std::vector<gr_complex>(d_fft_size);
|
||||
d_fft_code_pilot = std::vector<gr_complex>(d_fft_size);
|
||||
d_data_correlation = std::vector<gr_complex>(d_fft_size);
|
||||
d_pilot_correlation = std::vector<gr_complex>(d_fft_size);
|
||||
d_correlation_plus = std::vector<gr_complex>(d_fft_size);
|
||||
d_correlation_minus = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitude = std::vector<float>(d_fft_size);
|
||||
|
||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||
|
@ -102,8 +102,8 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
|
||||
d_cl_fft_batch_size = 1;
|
||||
|
||||
d_in_buffer = std::vector<std::vector<gr_complex>>(d_max_dwells, std::vector<gr_complex>(d_fft_size));
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
d_fft_codes.reserve(d_fft_size_pow2);
|
||||
d_magnitude = std::vector<float>(d_fft_size);
|
||||
d_fft_codes = std::vector<gr_complex>(_fft_size_pow2);
|
||||
d_zero_vector = std::vector<gr_complex>(d_fft_size_pow2 - d_fft_size, 0.0);
|
||||
|
||||
d_opencl = init_opencl_environment("math_kernel.cl");
|
||||
|
@ -83,15 +83,14 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
// fft size is reduced.
|
||||
d_fft_size = (d_samples_per_code) / d_folding_factor;
|
||||
|
||||
d_fft_codes.reserve(d_fft_size);
|
||||
d_magnitude.reserve(d_samples_per_code * d_folding_factor);
|
||||
d_magnitude_folded.reserve(d_fft_size);
|
||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitude = std::vector<float>(d_samples_per_code * d_folding_factor);
|
||||
d_magnitude_folded = std::vector<float>(d_fft_size);
|
||||
d_possible_delay = std::vector<uint32_t>(d_folding_factor);
|
||||
d_corr_output_f = std::vector<float>(d_folding_factor);
|
||||
|
||||
d_possible_delay.reserve(d_folding_factor);
|
||||
d_corr_output_f.reserve(d_folding_factor);
|
||||
|
||||
/*Create the d_code signal , which would store the values of the code in its
|
||||
original form to perform later correlation in time domain*/
|
||||
// Create the d_code vector, which would store the values of the code in its
|
||||
// original form to perform later correlation in time domain
|
||||
d_code = std::vector<gr_complex>(d_samples_per_code, lv_cmake(0.0F, 0.0F));
|
||||
|
||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||
@ -104,7 +103,8 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
d_enable_monitor_output = enable_monitor_output;
|
||||
|
||||
d_code_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||
d_signal_folded.reserve(d_fft_size);
|
||||
|
||||
d_signal_folded = std::vector<gr_complex>(d_fft_size);
|
||||
d_noise_floor_power = 0;
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
|
@ -98,8 +98,8 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
d_input_power = 0.0;
|
||||
d_num_doppler_bins = 0;
|
||||
|
||||
d_fft_codes.reserve(d_fft_size);
|
||||
d_magnitude.reserve(d_fft_size);
|
||||
d_fft_codes = std::vector<gr_complex>(d_fft_size);
|
||||
d_magnitude = std::vector<float>(d_fft_size);
|
||||
|
||||
d_fft_if = gnss_fft_fwd_make_unique(d_fft_size);
|
||||
d_ifft = gnss_fft_rev_make_unique(d_fft_size);
|
||||
|
@ -187,11 +187,7 @@ void FirFilter::init()
|
||||
// impulse response given a set of band edges, the desired response on
|
||||
// those bands, and the weight given to the error in those bands.
|
||||
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (const auto& it : taps_d)
|
||||
{
|
||||
taps_.push_back(static_cast<float>(it));
|
||||
}
|
||||
taps_ = std::vector<float>(taps_d.begin(), taps_d.end());
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,11 +90,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
||||
|
||||
const int grid_density = configuration->property(role_ + ".grid_density", default_grid_density);
|
||||
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (const auto& it : taps_d)
|
||||
{
|
||||
taps_.push_back(static_cast<float>(it));
|
||||
}
|
||||
taps_ = std::vector<float>(taps_d.begin(), taps_d.end());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ void signal_generator_c::init()
|
||||
{
|
||||
work_counter_ = 0;
|
||||
|
||||
complex_phase_.reserve(vector_length_);
|
||||
complex_phase_ = std::vector<gr_complex>(vector_length_);
|
||||
start_phase_rad_.reserve(num_sats_);
|
||||
current_data_bit_int_.reserve(num_sats_);
|
||||
ms_counter_.reserve(num_sats_);
|
||||
|
@ -434,8 +434,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_n_correlator_taps = 3;
|
||||
}
|
||||
|
||||
d_correlator_outs.reserve(d_n_correlator_taps);
|
||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
||||
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||
// map memory pointers of correlator outputs
|
||||
if (d_veml)
|
||||
{
|
||||
@ -504,13 +504,13 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
|
||||
// CN0 estimation and lock detector buffers
|
||||
d_cn0_estimation_counter = 0;
|
||||
d_Prompt_buffer.reserve(d_trk_parameters.cn0_samples);
|
||||
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(d_trk_parameters.cn0_samples);
|
||||
d_carrier_lock_test = 1.0;
|
||||
d_CN0_SNV_dB_Hz = 0.0;
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_code_lock_fail_counter = 0;
|
||||
d_carrier_lock_threshold = d_trk_parameters.carrier_lock_th;
|
||||
d_Prompt_Data.reserve(1);
|
||||
d_Prompt_Data = volk_gnsssdr::vector<gr_complex>(1);
|
||||
d_cn0_smoother = Exponential_Smoother();
|
||||
d_cn0_smoother.set_alpha(d_trk_parameters.cn0_smoother_alpha);
|
||||
|
||||
|
@ -311,8 +311,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
d_n_correlator_taps = 3;
|
||||
}
|
||||
|
||||
d_correlator_outs.reserve(d_n_correlator_taps);
|
||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
||||
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||
// map memory pointers of correlator outputs
|
||||
if (d_veml)
|
||||
{
|
||||
@ -371,13 +371,13 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
|
||||
// CN0 estimation and lock detector buffers
|
||||
d_cn0_estimation_counter = 0;
|
||||
d_Prompt_buffer.reserve(d_trk_parameters.cn0_samples);
|
||||
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(d_trk_parameters.cn0_samples);
|
||||
d_carrier_lock_test = 1.0;
|
||||
d_CN0_SNV_dB_Hz = 0.0;
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
d_code_lock_fail_counter = 0;
|
||||
d_carrier_lock_threshold = d_trk_parameters.carrier_lock_th;
|
||||
d_Prompt_Data.reserve(1);
|
||||
d_Prompt_Data = volk_gnsssdr::vector<gr_complex>(1);
|
||||
d_cn0_smoother = Exponential_Smoother();
|
||||
d_cn0_smoother.set_alpha(d_trk_parameters.cn0_smoother_alpha);
|
||||
if (d_code_period > 0.0)
|
||||
|
@ -61,13 +61,13 @@ Fpga_Multicorrelator_8sc::Fpga_Multicorrelator_8sc(int32_t n_correlators,
|
||||
// instantiate variable length vectors
|
||||
if (d_track_pilot)
|
||||
{
|
||||
d_initial_index.reserve(n_correlators + 1);
|
||||
d_initial_interp_counter.reserve(n_correlators + 1);
|
||||
d_initial_index = volk_gnsssdr::vector<uint32_t>(n_correlators + 1);
|
||||
d_initial_interp_counter = volk_gnsssdr::vector<uint32_t>(n_correlators + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
d_initial_index.reserve(n_correlators);
|
||||
d_initial_interp_counter.reserve(n_correlators);
|
||||
d_initial_index = volk_gnsssdr::vector<uint32_t>(n_correlators);
|
||||
d_initial_interp_counter = volk_gnsssdr::vector<uint32_t>(n_correlators);
|
||||
}
|
||||
d_shifts_chips = nullptr;
|
||||
d_prompt_data_shift = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user