mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-06 22:04:07 +00:00
Initializing non-static data members
This commit is contained in:
parent
70c97178fa
commit
23fb47b1d0
@ -103,10 +103,14 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,9 +111,14 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,10 +103,14 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,11 +116,11 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
default_dump_filename);
|
||||
|
||||
code_ = new gr_complex[code_length_];
|
||||
LOG(INFO) <<"Vector Length: "<<vector_length_
|
||||
<<", Samples per ms: "<<samples_per_ms
|
||||
<<", Folding factor: "<<folding_factor_
|
||||
<<", Sampled ms: "<<sampled_ms_
|
||||
<<", Code Length: "<<code_length_;
|
||||
LOG(INFO) << "Vector Length: " << vector_length_
|
||||
<< ", Samples per ms: " << samples_per_ms
|
||||
<< ", Folding factor: " << folding_factor_
|
||||
<< ", Sampled ms: " << sampled_ms_
|
||||
<< ", Code Length: " << code_length_;
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
@ -137,10 +137,15 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -313,14 +318,14 @@ float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
frequency_bins++;
|
||||
}
|
||||
|
||||
DLOG(INFO) <<"Channel "<<channel_<<" Pfa = "<< pfa;
|
||||
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
||||
|
||||
unsigned int ncells = code_length_/folding_factor_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
unsigned int ncells = code_length_ / folding_factor_ * frequency_bins;
|
||||
double exponent = 1.0 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(code_length_/folding_factor_);
|
||||
double lambda = static_cast<double>(code_length_) / static_cast<double>(folding_factor_);
|
||||
boost::math::exponential_distribution<double> mydist (lambda);
|
||||
float threshold = (float)quantile(mydist,val);
|
||||
float threshold = static_cast<float>(quantile(mydist,val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -104,10 +104,15 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,10 +111,16 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_
|
||||
<< " unknown acquisition item type";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
bit_transition_flag_ = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,7 +121,8 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
channel_internal_queue_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,9 +84,14 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = 0;
|
||||
channel_internal_queue_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,9 +83,15 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,9 +101,15 @@ GpsL1CaPcpsMultithreadAcquisition::GpsL1CaPcpsMultithreadAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
code_= new gr_complex[vector_length_];
|
||||
code_ = new gr_complex[vector_length_];
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
@ -98,9 +98,15 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,10 +132,16 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -295,11 +301,11 @@ float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa)
|
||||
}
|
||||
DLOG(INFO) << "Channel " << channel_<< " Pfa = " << pfa;
|
||||
unsigned int ncells = (code_length_ / folding_factor_) * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double exponent = 1.0 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double((code_length_ / folding_factor_));
|
||||
double lambda = static_cast<double>(code_length_) / static_cast<double>folding_factor_);
|
||||
boost::math::exponential_distribution<double> mydist (lambda);
|
||||
float threshold = (float)quantile(mydist,val);
|
||||
float threshold = static_cast<float>(quantile(mydist,val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -93,9 +93,16 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
}
|
||||
else
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,13 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
// LOG(WARNING) << item_type_
|
||||
// << " unknown acquisition item type";
|
||||
// }
|
||||
gnss_synchro_ = new Gnss_Synchro();
|
||||
|
||||
gnss_synchro_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_max_ = 5000;
|
||||
doppler_step_ = 250;
|
||||
channel_internal_queue_ = 0;
|
||||
channel_ = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,17 +58,16 @@ class GalileoE5aPcpsAcquisitionGSoC2014GensourceTest: public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
||||
{
|
||||
{
|
||||
item_size = sizeof(gr_complex);
|
||||
stop = false;
|
||||
message = 0;
|
||||
gnss_synchro = Gnss_Synchro();
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -63,6 +63,7 @@ protected:
|
||||
stop = false;
|
||||
message = 0;
|
||||
gnss_synchro = Gnss_Synchro();
|
||||
init();
|
||||
}
|
||||
|
||||
~GpsL1CaPcpsAcquisitionGSoC2013Test()
|
||||
@ -88,15 +89,15 @@ protected:
|
||||
int message;
|
||||
boost::thread ch_thread;
|
||||
|
||||
unsigned int integration_time_ms;
|
||||
unsigned int fs_in;
|
||||
unsigned int integration_time_ms = 0;
|
||||
unsigned int fs_in = 0;
|
||||
|
||||
double expected_delay_chips;
|
||||
double expected_doppler_hz;
|
||||
float max_doppler_error_hz;
|
||||
float max_delay_error_chips;
|
||||
double expected_delay_chips = 0.0;
|
||||
double expected_doppler_hz = 0.0;
|
||||
float max_doppler_error_hz = 0.0;
|
||||
float max_delay_error_chips = 0.0;
|
||||
|
||||
unsigned int num_of_realizations;
|
||||
unsigned int num_of_realizations = 0;
|
||||
unsigned int realization_counter;
|
||||
unsigned int detection_counter;
|
||||
unsigned int correct_estimation_counter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user