mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 11:19:18 +00:00
Make the address sanitizer happy
This commit is contained in:
parent
bbf50076a0
commit
2c9358b9b4
@ -41,10 +41,10 @@ Viterbi_Decoder_Sbas::Viterbi_Decoder_Sbas(const int g_encoder[], const int KK,
|
|||||||
d_number_symbols = static_cast<int>(1U << d_nn); /* 2^nn */
|
d_number_symbols = static_cast<int>(1U << d_nn); /* 2^nn */
|
||||||
|
|
||||||
/* create appropriate transition matrices (trellis) */
|
/* create appropriate transition matrices (trellis) */
|
||||||
d_out0.reserve(d_states);
|
d_out0 = std::vector<int>(d_states);
|
||||||
d_out1.reserve(d_states);
|
d_out1 = std::vector<int>(d_states);
|
||||||
d_state0.reserve(d_states);
|
d_state0 = std::vector<int>(d_states);
|
||||||
d_state1.reserve(d_states);
|
d_state1 = std::vector<int>(d_states);
|
||||||
|
|
||||||
nsc_transit(d_out0.data(), d_state0.data(), 0, g_encoder, d_KK, d_nn);
|
nsc_transit(d_out0.data(), d_state0.data(), 0, g_encoder, d_KK, d_nn);
|
||||||
nsc_transit(d_out1.data(), d_state1.data(), 1, g_encoder, d_KK, d_nn);
|
nsc_transit(d_out1.data(), d_state1.data(), 1, g_encoder, d_KK, d_nn);
|
||||||
@ -124,10 +124,10 @@ void Viterbi_Decoder_Sbas::init_trellis_state()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reserve new trellis state memory
|
// reserve new trellis state memory
|
||||||
d_pm_t.reserve(d_states);
|
d_pm_t = std::vector<float>(d_states);
|
||||||
d_trellis_paths = std::deque<Prev>();
|
d_trellis_paths = std::deque<Prev>();
|
||||||
d_rec_array.reserve(d_nn);
|
d_rec_array = std::vector<float>(d_nn);
|
||||||
d_metric_c.reserve(d_number_symbols);
|
d_metric_c = std::vector<float>(d_number_symbols);
|
||||||
d_trellis_state_is_initialised = true;
|
d_trellis_state_is_initialised = true;
|
||||||
|
|
||||||
/* initialize trellis */
|
/* initialize trellis */
|
||||||
@ -429,13 +429,10 @@ Viterbi_Decoder_Sbas::Prev::Prev(int states, int t)
|
|||||||
{
|
{
|
||||||
this->t = t;
|
this->t = t;
|
||||||
num_states = states;
|
num_states = states;
|
||||||
state.reserve(num_states);
|
state = std::vector<int>(num_states);
|
||||||
v_bit.reserve(num_states);
|
v_bit = std::vector<int>(num_states);
|
||||||
v_metric.reserve(num_states);
|
v_metric = std::vector<float>(num_states);
|
||||||
refcount = 1;
|
refcount = 1;
|
||||||
std::fill_n(state.begin(), num_states, 0);
|
|
||||||
std::fill_n(v_bit.begin(), num_states, 0);
|
|
||||||
std::fill_n(v_metric.begin(), num_states, 0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -142,13 +143,13 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
d_correlator_outs.resize(d_n_correlator_taps, gr_complex(0.0, 0.0));
|
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||||
|
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -172,7 +173,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <pmt/pmt.h>
|
#include <pmt/pmt.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -139,15 +140,14 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
d_ca_code_16sc.reserve(static_cast<int32_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
d_ca_code_16sc = volk_gnsssdr::vector<lv_16sc_t>(static_cast<size_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
|
|
||||||
d_correlator_outs_16sc.resize(d_n_correlator_taps, lv_cmake(0, 0));
|
d_correlator_outs_16sc = volk_gnsssdr::vector<lv_16sc_t>(d_n_correlator_taps);
|
||||||
|
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -171,7 +171,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -98,13 +99,13 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
d_correlator_outs.resize(d_n_correlator_taps, gr_complex(0.0, 0.0));
|
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||||
|
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -130,7 +131,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -139,13 +140,13 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
d_correlator_outs.resize(d_n_correlator_taps, gr_complex(0.0, 0.0));
|
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||||
|
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -169,7 +170,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <pmt/pmt.h>
|
#include <pmt/pmt.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -137,15 +138,14 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||||
d_ca_code_16sc.reserve(static_cast<int32_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
d_ca_code_16sc = volk_gnsssdr::vector<lv_16sc_t>(static_cast<size_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
|
|
||||||
d_correlator_outs_16sc.resize(d_n_correlator_taps, lv_cmake(0, 0));
|
d_correlator_outs_16sc = volk_gnsssdr::vector<lv_16sc_t>(d_n_correlator_taps);
|
||||||
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -169,7 +169,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstddef>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -99,13 +100,13 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
|||||||
|
|
||||||
// Initialization of local code replica
|
// Initialization of local code replica
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
d_ca_code.resize(static_cast<int32_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS), gr_complex(0.0, 0.0));
|
d_ca_code = volk_gnsssdr::vector<gr_complex>(static_cast<size_t>(GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||||
|
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
d_correlator_outs.resize(d_n_correlator_taps, gr_complex(0.0, 0.0));
|
d_correlator_outs = volk_gnsssdr::vector<gr_complex>(d_n_correlator_taps);
|
||||||
|
|
||||||
d_local_code_shift_chips.reserve(d_n_correlator_taps);
|
d_local_code_shift_chips = volk_gnsssdr::vector<float>(d_n_correlator_taps);
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
d_local_code_shift_chips[1] = 0.0;
|
d_local_code_shift_chips[1] = 0.0;
|
||||||
@ -131,7 +132,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
|||||||
|
|
||||||
// CN0 estimation and lock detector buffers
|
// CN0 estimation and lock detector buffers
|
||||||
d_cn0_estimation_counter = 0;
|
d_cn0_estimation_counter = 0;
|
||||||
d_Prompt_buffer.reserve(FLAGS_cn0_samples);
|
d_Prompt_buffer = volk_gnsssdr::vector<gr_complex>(FLAGS_cn0_samples);
|
||||||
d_carrier_lock_test = 1;
|
d_carrier_lock_test = 1;
|
||||||
d_CN0_SNV_dB_Hz = 0;
|
d_CN0_SNV_dB_Hz = 0;
|
||||||
d_carrier_lock_fail_counter = 0;
|
d_carrier_lock_fail_counter = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user