mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Correct minor bug in pcps acquisition blocks
Change the initialization of max_dwells in pcps acquisition adpaters due its value is forced to be 1 in gr_block constructor if boolean "bit_transition_flag" is set to TRUE Resolves: #24
This commit is contained in:
parent
94855ffa06
commit
fd5cd42b9a
@ -69,14 +69,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
|
||||
|
||||
if (!bit_transition_flag_)
|
||||
{
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
max_dwells_ = 2;
|
||||
}
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
|
@ -66,14 +66,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
|
||||
|
||||
if (!bit_transition_flag_)
|
||||
{
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
max_dwells_ = 2;
|
||||
}
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
@ -82,6 +75,11 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
if( bit_transition_flag_ )
|
||||
{
|
||||
vector_length_ *= 2;
|
||||
}
|
||||
|
||||
code_ = new gr_complex[vector_length_];
|
||||
|
||||
if (item_type_.compare("cshort") == 0 )
|
||||
@ -102,13 +100,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
|
||||
stream_to_vector_ = gr::blocks::stream_to_vector::make(item_size_, vector_length_);
|
||||
DLOG(INFO) << "stream_to_vector(" << stream_to_vector_->unique_id() << ")";
|
||||
//now is supported natively by the acquisition (_sc variant)
|
||||
// if (item_type_.compare("cshort") == 0)
|
||||
// {
|
||||
// cshort_to_float_x2_ = make_cshort_to_float_x2();
|
||||
// float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||
// }
|
||||
|
||||
|
||||
if (item_type_.compare("cbyte") == 0)
|
||||
{
|
||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||
|
@ -63,14 +63,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
use_CFAR_algorithm_flag_=configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions
|
||||
|
||||
if (!bit_transition_flag_)
|
||||
{
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
max_dwells_ = 2;
|
||||
}
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
@ -80,6 +73,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
|
||||
vector_length_ = code_length_;
|
||||
|
||||
if( bit_transition_flag_ )
|
||||
{
|
||||
vector_length_ *= 2;
|
||||
}
|
||||
|
||||
code_ = new gr_complex[vector_length_];
|
||||
|
||||
// if (item_type_.compare("gr_complex") == 0 )
|
||||
|
@ -90,7 +90,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
|
||||
d_bit_transition_flag = bit_transition_flag;
|
||||
d_use_CFAR_algorithm_flag = use_CFAR_algorithm_flag;
|
||||
d_threshold = 0.0;
|
||||
d_doppler_step = 250;
|
||||
d_doppler_step = 0;
|
||||
d_code_phase = 0;
|
||||
d_test_statistics = 0.0;
|
||||
d_channel = 0;
|
||||
@ -111,7 +111,7 @@ pcps_acquisition_cc::pcps_acquisition_cc(
|
||||
if( d_bit_transition_flag )
|
||||
{
|
||||
d_fft_size *= 2;
|
||||
d_max_dwells = 1;
|
||||
d_max_dwells = 1; //Activation of d_bit_transition_flag invalidates the value of d_max_dwells
|
||||
}
|
||||
|
||||
d_fft_codes = static_cast<gr_complex*>(volk_malloc(d_fft_size * sizeof(gr_complex), volk_get_alignment()));
|
||||
|
Loading…
Reference in New Issue
Block a user