mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Fix defects detected by Coverity Scan and fix building in MacOs
This commit is contained in:
parent
f577bf3cea
commit
bd0222f4b7
@ -91,10 +91,10 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
|||||||
//################# MAKE TRACKING GNURadio object ###################
|
//################# MAKE TRACKING GNURadio object ###################
|
||||||
if (item_type.compare("gr_complex") == 0)
|
if (item_type.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
if (unified_)
|
if (unified_)
|
||||||
{
|
{
|
||||||
char sig_[3] = "1B";
|
char sig_[3] = "1B";
|
||||||
item_size_ = sizeof(gr_complex);
|
|
||||||
tracking_unified_ = dll_pll_veml_make_tracking(
|
tracking_unified_ = dll_pll_veml_make_tracking(
|
||||||
fs_in,
|
fs_in,
|
||||||
vector_length,
|
vector_length,
|
||||||
|
@ -77,10 +77,10 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
|||||||
//################# MAKE TRACKING GNURadio object ###################
|
//################# MAKE TRACKING GNURadio object ###################
|
||||||
if (item_type.compare("gr_complex") == 0)
|
if (item_type.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
if (unified_)
|
if (unified_)
|
||||||
{
|
{
|
||||||
char sig_[3] = "1C";
|
char sig_[3] = "1C";
|
||||||
item_size_ = sizeof(gr_complex);
|
|
||||||
tracking_unified_ = dll_pll_veml_make_tracking(
|
tracking_unified_ = dll_pll_veml_make_tracking(
|
||||||
fs_in,
|
fs_in,
|
||||||
vector_length,
|
vector_length,
|
||||||
|
@ -254,6 +254,14 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(
|
|||||||
{
|
{
|
||||||
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
|
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
|
||||||
std::cout << "Invalid System argument when instantiating tracking blocks" << std::endl;
|
std::cout << "Invalid System argument when instantiating tracking blocks" << std::endl;
|
||||||
|
d_correlation_length_ms = 1;
|
||||||
|
d_secondary = false;
|
||||||
|
interchange_iq = false;
|
||||||
|
d_signal_carrier_freq = 0.0;
|
||||||
|
d_code_period = 0.0;
|
||||||
|
d_code_length_chips = 0;
|
||||||
|
d_code_samples_per_chip = 0;
|
||||||
|
d_symbols_per_bit = 0;
|
||||||
}
|
}
|
||||||
T_chip_seconds = 0.0;
|
T_chip_seconds = 0.0;
|
||||||
T_prn_seconds = 0.0;
|
T_prn_seconds = 0.0;
|
||||||
@ -348,6 +356,11 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(
|
|||||||
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
|
||||||
d_data_code = static_cast<float *>(volk_gnsssdr_malloc(2 * d_code_length_chips * sizeof(float), volk_gnsssdr_get_alignment()));
|
d_data_code = static_cast<float *>(volk_gnsssdr_malloc(2 * d_code_length_chips * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_Prompt_Data = nullptr;
|
||||||
|
d_data_code = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//--- Initializations ---//
|
//--- Initializations ---//
|
||||||
// Initial code frequency basis of NCO
|
// Initial code frequency basis of NCO
|
||||||
@ -476,7 +489,7 @@ void dll_pll_veml_tracking::start_tracking()
|
|||||||
}
|
}
|
||||||
else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0)
|
else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0)
|
||||||
{
|
{
|
||||||
gr_complex aux_code[d_code_length_chips];
|
gr_complex *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * d_code_length_chips, volk_gnsssdr_get_alignment()));
|
||||||
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
|
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
|
||||||
if (d_track_pilot)
|
if (d_track_pilot)
|
||||||
{
|
{
|
||||||
@ -496,6 +509,7 @@ void dll_pll_veml_tracking::start_tracking()
|
|||||||
d_tracking_code[i] = aux_code[i].real();
|
d_tracking_code[i] = aux_code[i].real();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
volk_gnsssdr_free(aux_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
multicorrelator_cpu.set_local_code_and_taps(d_code_samples_per_chip * d_code_length_chips, d_tracking_code, d_local_code_shift_chips);
|
multicorrelator_cpu.set_local_code_and_taps(d_code_samples_per_chip * d_code_length_chips, d_tracking_code, d_local_code_shift_chips);
|
||||||
@ -761,7 +775,7 @@ void dll_pll_veml_tracking::update_tracking_vars()
|
|||||||
T_prn_seconds = T_chip_seconds * static_cast<double>(d_code_length_chips);
|
T_prn_seconds = T_chip_seconds * static_cast<double>(d_code_length_chips);
|
||||||
double code_error_filt_secs = T_prn_seconds * d_code_error_filt_chips * T_chip_seconds; //[seconds]
|
double code_error_filt_secs = T_prn_seconds * d_code_error_filt_chips * T_chip_seconds; //[seconds]
|
||||||
|
|
||||||
// ################## CARRIER AND CODE NCO BUFFER ALIGNEMENT #######################
|
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
|
||||||
// keep alignment parameters for the next input buffer
|
// keep alignment parameters for the next input buffer
|
||||||
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
|
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
|
||||||
T_prn_samples = T_prn_seconds * d_fs_in;
|
T_prn_samples = T_prn_seconds * d_fs_in;
|
||||||
|
Loading…
Reference in New Issue
Block a user