mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-20 22:17:03 +00:00
Initializing non-static data members
This commit is contained in:
parent
70c97178fa
commit
23fb47b1d0
@ -103,10 +103,14 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << item_type_
|
item_size_ = sizeof(gr_complex);
|
||||||
<< " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << item_type_
|
item_size_ = sizeof(gr_complex);
|
||||||
<< " unknown acquisition item type";
|
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);
|
default_dump_filename);
|
||||||
|
|
||||||
code_ = new gr_complex[code_length_];
|
code_ = new gr_complex[code_length_];
|
||||||
LOG(INFO) <<"Vector Length: "<<vector_length_
|
LOG(INFO) << "Vector Length: " << vector_length_
|
||||||
<<", Samples per ms: "<<samples_per_ms
|
<< ", Samples per ms: " << samples_per_ms
|
||||||
<<", Folding factor: "<<folding_factor_
|
<< ", Folding factor: " << folding_factor_
|
||||||
<<", Sampled ms: "<<sampled_ms_
|
<< ", Sampled ms: " << sampled_ms_
|
||||||
<<", Code Length: "<<code_length_;
|
<< ", Code Length: " << code_length_;
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(gr_complex);
|
item_size_ = sizeof(gr_complex);
|
||||||
@ -137,10 +137,15 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << item_type_
|
item_size_ = sizeof(gr_complex);
|
||||||
<< " unknown acquisition item type";
|
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++;
|
frequency_bins++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLOG(INFO) <<"Channel "<<channel_<<" Pfa = "<< pfa;
|
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
||||||
|
|
||||||
unsigned int ncells = code_length_/folding_factor_ * frequency_bins;
|
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 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);
|
boost::math::exponential_distribution<double> mydist (lambda);
|
||||||
float threshold = (float)quantile(mydist,val);
|
float threshold = static_cast<float>(quantile(mydist,val));
|
||||||
|
|
||||||
return threshold;
|
return threshold;
|
||||||
}
|
}
|
||||||
|
@ -104,10 +104,15 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << item_type_
|
item_size_ = sizeof(gr_complex);
|
||||||
<< " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << item_type_
|
item_size_ = sizeof(gr_complex);
|
||||||
<< " unknown acquisition item type";
|
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;
|
threshold_ = 0.0;
|
||||||
doppler_max_ = 0;
|
doppler_max_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
gnss_synchro_ = new Gnss_Synchro();
|
gnss_synchro_ = 0;
|
||||||
|
channel_internal_queue_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,9 +84,14 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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_;
|
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)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
@ -98,9 +98,15 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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;
|
DLOG(INFO) << "Channel " << channel_<< " Pfa = " << pfa;
|
||||||
unsigned int ncells = (code_length_ / folding_factor_) * frequency_bins;
|
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 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);
|
boost::math::exponential_distribution<double> mydist (lambda);
|
||||||
float threshold = (float)quantile(mydist,val);
|
float threshold = static_cast<float>(quantile(mydist,val));
|
||||||
|
|
||||||
return threshold;
|
return threshold;
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,16 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
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_
|
// LOG(WARNING) << item_type_
|
||||||
// << " unknown acquisition 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:
|
protected:
|
||||||
GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
||||||
{
|
{
|
||||||
item_size = sizeof(gr_complex);
|
item_size = sizeof(gr_complex);
|
||||||
stop = false;
|
stop = false;
|
||||||
message = 0;
|
message = 0;
|
||||||
gnss_synchro = Gnss_Synchro();
|
gnss_synchro = Gnss_Synchro();
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void config_1();
|
void config_1();
|
||||||
|
@ -63,6 +63,7 @@ protected:
|
|||||||
stop = false;
|
stop = false;
|
||||||
message = 0;
|
message = 0;
|
||||||
gnss_synchro = Gnss_Synchro();
|
gnss_synchro = Gnss_Synchro();
|
||||||
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
~GpsL1CaPcpsAcquisitionGSoC2013Test()
|
~GpsL1CaPcpsAcquisitionGSoC2013Test()
|
||||||
@ -88,15 +89,15 @@ protected:
|
|||||||
int message;
|
int message;
|
||||||
boost::thread ch_thread;
|
boost::thread ch_thread;
|
||||||
|
|
||||||
unsigned int integration_time_ms;
|
unsigned int integration_time_ms = 0;
|
||||||
unsigned int fs_in;
|
unsigned int fs_in = 0;
|
||||||
|
|
||||||
double expected_delay_chips;
|
double expected_delay_chips = 0.0;
|
||||||
double expected_doppler_hz;
|
double expected_doppler_hz = 0.0;
|
||||||
float max_doppler_error_hz;
|
float max_doppler_error_hz = 0.0;
|
||||||
float max_delay_error_chips;
|
float max_delay_error_chips = 0.0;
|
||||||
|
|
||||||
unsigned int num_of_realizations;
|
unsigned int num_of_realizations = 0;
|
||||||
unsigned int realization_counter;
|
unsigned int realization_counter;
|
||||||
unsigned int detection_counter;
|
unsigned int detection_counter;
|
||||||
unsigned int correct_estimation_counter;
|
unsigned int correct_estimation_counter;
|
||||||
|
Loading…
Reference in New Issue
Block a user