mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
228645586e
@ -57,6 +57,7 @@ Pvt_Solution::Pvt_Solution()
|
||||
b_valid_position = false;
|
||||
d_averaging_depth = 0;
|
||||
d_valid_observations = 0;
|
||||
d_rx_dt_m = 0.0;
|
||||
}
|
||||
|
||||
arma::vec Pvt_Solution::rotateSatellite(double const traveltime, const arma::vec & X_sat)
|
||||
|
@ -210,6 +210,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
d_carrier_phase_step_rad = 0.0;
|
||||
d_enable_extended_integration = false;
|
||||
d_preamble_synchronized = false;
|
||||
d_correlation_symbol_counter = 0;
|
||||
//set_min_output_buffer((long int)300);
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,11 @@
|
||||
|
||||
cpu_multicorrelator::cpu_multicorrelator()
|
||||
{
|
||||
d_sig_in = NULL;
|
||||
d_local_code_in = NULL;
|
||||
d_shifts_chips = NULL;
|
||||
d_corr_out = NULL;
|
||||
d_local_codes_resampled = NULL;
|
||||
d_sig_in = nullptr;
|
||||
d_local_code_in = nullptr;
|
||||
d_shifts_chips = nullptr;
|
||||
d_corr_out = nullptr;
|
||||
d_local_codes_resampled = nullptr;
|
||||
d_code_length_chips = 0;
|
||||
d_n_correlators = 0;
|
||||
}
|
||||
@ -52,7 +52,7 @@ cpu_multicorrelator::cpu_multicorrelator()
|
||||
|
||||
cpu_multicorrelator::~cpu_multicorrelator()
|
||||
{
|
||||
if(d_local_codes_resampled != NULL)
|
||||
if(d_local_codes_resampled != nullptr)
|
||||
{
|
||||
cpu_multicorrelator::free();
|
||||
}
|
||||
@ -67,7 +67,7 @@ bool cpu_multicorrelator::init(
|
||||
// ALLOCATE MEMORY FOR INTERNAL vectors
|
||||
size_t size = max_signal_length_samples * sizeof(std::complex<float>);
|
||||
|
||||
d_local_codes_resampled = static_cast<std::complex<float>**>(volk_gnsssdr_malloc(n_correlators * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
d_local_codes_resampled = static_cast<std::complex<float>**>(volk_gnsssdr_malloc(n_correlators * sizeof(std::complex<float>*), volk_gnsssdr_get_alignment()));
|
||||
for (int n = 0; n < n_correlators; n++)
|
||||
{
|
||||
d_local_codes_resampled[n] = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(size, volk_gnsssdr_get_alignment()));
|
||||
@ -133,11 +133,15 @@ bool cpu_multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
|
||||
bool cpu_multicorrelator::free()
|
||||
{
|
||||
// Free memory
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
{
|
||||
for (int n = 0; n < d_n_correlators; n++)
|
||||
{
|
||||
volk_gnsssdr_free(d_local_codes_resampled[n]);
|
||||
}
|
||||
volk_gnsssdr_free(d_local_codes_resampled);
|
||||
d_local_codes_resampled = nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ bool cpu_multicorrelator_16sc::init(
|
||||
d_n_correlators = n_correlators;
|
||||
d_tmp_code_phases_chips = static_cast<float*>(volk_gnsssdr_malloc(n_correlators * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
d_local_codes_resampled = static_cast<lv_16sc_t**>(volk_gnsssdr_malloc(n_correlators * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment()));
|
||||
d_local_codes_resampled = static_cast<lv_16sc_t**>(volk_gnsssdr_malloc(n_correlators * sizeof(lv_16sc_t*), volk_gnsssdr_get_alignment()));
|
||||
for (int n = 0; n < n_correlators; n++)
|
||||
{
|
||||
d_local_codes_resampled[n] = static_cast<lv_16sc_t*>(volk_gnsssdr_malloc(size, volk_gnsssdr_get_alignment()));
|
||||
@ -114,11 +114,12 @@ bool cpu_multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
|
||||
|
||||
cpu_multicorrelator_16sc::cpu_multicorrelator_16sc()
|
||||
{
|
||||
d_sig_in = NULL;
|
||||
d_local_code_in = NULL;
|
||||
d_shifts_chips = NULL;
|
||||
d_corr_out = NULL;
|
||||
d_local_codes_resampled = NULL;
|
||||
d_sig_in = nullptr;
|
||||
d_local_code_in = nullptr;
|
||||
d_shifts_chips = nullptr;
|
||||
d_corr_out = nullptr;
|
||||
d_local_codes_resampled = nullptr;
|
||||
d_tmp_code_phases_chips = nullptr;
|
||||
d_code_length_chips = 0;
|
||||
d_n_correlators = 0;
|
||||
}
|
||||
@ -126,7 +127,7 @@ cpu_multicorrelator_16sc::cpu_multicorrelator_16sc()
|
||||
|
||||
cpu_multicorrelator_16sc::~cpu_multicorrelator_16sc()
|
||||
{
|
||||
if(d_local_codes_resampled != NULL)
|
||||
if(d_local_codes_resampled != nullptr)
|
||||
{
|
||||
cpu_multicorrelator_16sc::free();
|
||||
}
|
||||
@ -136,12 +137,20 @@ cpu_multicorrelator_16sc::~cpu_multicorrelator_16sc()
|
||||
bool cpu_multicorrelator_16sc::free()
|
||||
{
|
||||
// Free memory
|
||||
if (d_tmp_code_phases_chips != NULL) volk_gnsssdr_free(d_tmp_code_phases_chips);
|
||||
if (d_tmp_code_phases_chips != nullptr)
|
||||
{
|
||||
volk_gnsssdr_free(d_tmp_code_phases_chips);
|
||||
d_tmp_code_phases_chips = nullptr;
|
||||
}
|
||||
if (d_local_codes_resampled != nullptr)
|
||||
{
|
||||
for (int n = 0; n < d_n_correlators; n++)
|
||||
{
|
||||
volk_gnsssdr_free(d_local_codes_resampled[n]);
|
||||
}
|
||||
volk_gnsssdr_free(d_local_codes_resampled);
|
||||
d_local_codes_resampled = nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user