mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Apply coding style to new destructors
This commit is contained in:
parent
edd675ade9
commit
8258a343af
@ -251,27 +251,29 @@ void galileo_e1_dll_pll_veml_tracking_cc::start_tracking()
|
||||
|
||||
galileo_e1_dll_pll_veml_tracking_cc::~galileo_e1_dll_pll_veml_tracking_cc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -244,28 +244,30 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
|
||||
Galileo_E1_Tcp_Connector_Tracking_cc::~Galileo_E1_Tcp_Connector_Tracking_cc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
d_tcp_com.close_tcp_connection(d_port);
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
d_tcp_com.close_tcp_connection(d_port);
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -211,33 +211,34 @@ Galileo_E5a_Dll_Pll_Tracking_cc::Galileo_E5a_Dll_Pll_Tracking_cc(
|
||||
}
|
||||
|
||||
|
||||
Galileo_E5a_Dll_Pll_Tracking_cc::~Galileo_E5a_Dll_Pll_Tracking_cc ()
|
||||
Galileo_E5a_Dll_Pll_Tracking_cc::~Galileo_E5a_Dll_Pll_Tracking_cc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
delete[] d_codeI;
|
||||
delete[] d_codeQ;
|
||||
delete[] d_Prompt_buffer;
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_Single_Prompt_data);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu_Q.free();
|
||||
multicorrelator_cpu_I.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
delete[] d_codeI;
|
||||
delete[] d_codeQ;
|
||||
delete[] d_Prompt_buffer;
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_Single_Prompt_data);
|
||||
multicorrelator_cpu_Q.free();
|
||||
multicorrelator_cpu_I.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -300,26 +300,29 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_cc::~gps_l1_ca_dll_pll_c_aid_tracking_cc()
|
||||
{
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -302,27 +302,30 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
|
||||
gps_l1_ca_dll_pll_c_aid_tracking_sc::~gps_l1_ca_dll_pll_c_aid_tracking_sc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
volk_gnsssdr_free(d_ca_code_16sc);
|
||||
volk_gnsssdr_free(d_correlator_outs_16sc);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu_16sc.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
volk_gnsssdr_free(d_ca_code_16sc);
|
||||
volk_gnsssdr_free(d_correlator_outs_16sc);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu_16sc.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -265,28 +265,32 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
<< " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples;
|
||||
}
|
||||
|
||||
|
||||
Gps_L1_Ca_Dll_Pll_Tracking_cc::~Gps_L1_Ca_Dll_Pll_Tracking_cc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,7 +132,6 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
||||
d_local_code_shift_chips[1] = 0.0;
|
||||
d_local_code_shift_chips[2] = d_early_late_spc_chips;
|
||||
|
||||
|
||||
//--- Perform initializations ------------------------------
|
||||
multicorrelator_gpu = new cuda_multicorrelator();
|
||||
//local code resampler on GPU
|
||||
@ -259,47 +258,45 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
|
||||
|
||||
|
||||
// enable tracking
|
||||
d_pull_in = true;
|
||||
d_enable_tracking = true;
|
||||
|
||||
LOG(INFO) << "PULL-IN Doppler [Hz]=" << d_carrier_doppler_hz
|
||||
<< " Code Phase correction [samples]=" << delay_correction_samples
|
||||
<< " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples;
|
||||
<< " Code Phase correction [samples]=" << delay_correction_samples
|
||||
<< " PULL-IN Code Phase [samples]=" << d_acq_code_phase_samples;
|
||||
}
|
||||
|
||||
|
||||
Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::~Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc()
|
||||
{
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
cudaFreeHost(in_gpu);
|
||||
cudaFreeHost(d_correlator_outs);
|
||||
cudaFreeHost(d_local_code_shift_chips);
|
||||
cudaFreeHost(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_gpu->free_cuda();
|
||||
delete(multicorrelator_gpu);
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
cudaFreeHost(in_gpu);
|
||||
cudaFreeHost(d_correlator_outs);
|
||||
cudaFreeHost(d_local_code_shift_chips);
|
||||
cudaFreeHost(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_gpu->free_cuda();
|
||||
delete(multicorrelator_gpu);
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
|
@ -272,33 +272,35 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Gps_L1_Ca_Tcp_Connector_Tracking_cc::~Gps_L1_Ca_Tcp_Connector_Tracking_cc()
|
||||
{
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
d_tcp_com.close_tcp_connection(d_port);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
d_tcp_com.close_tcp_connection(d_port);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
|
@ -271,27 +271,29 @@ void gps_l2_m_dll_pll_tracking_cc::start_tracking()
|
||||
|
||||
gps_l2_m_dll_pll_tracking_cc::~gps_l2_m_dll_pll_tracking_cc()
|
||||
{
|
||||
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
}
|
||||
try{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING)<<"Exception in destructor "<<ex.what();
|
||||
}
|
||||
if (d_dump_file.is_open())
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
volk_gnsssdr_free(d_local_code_shift_chips);
|
||||
volk_gnsssdr_free(d_correlator_outs);
|
||||
volk_gnsssdr_free(d_ca_code);
|
||||
delete[] d_Prompt_buffer;
|
||||
multicorrelator_cpu.free();
|
||||
}
|
||||
catch(const std::exception & ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor " << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user