mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-05-05 17:04:11 +00:00
minor cleaning
This commit is contained in:
parent
4d072833c5
commit
fbaa3276ce
@ -51,8 +51,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
|||||||
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
|
|
||||||
item_type_ = configuration_->property(role + ".item_type",
|
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||||
default_item_type);
|
|
||||||
|
|
||||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
||||||
if_ = configuration_->property(role + ".ifreq", 0);
|
if_ = configuration_->property(role + ".ifreq", 0);
|
||||||
@ -66,7 +65,6 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
|||||||
LOG(WARNING) << "coherent_integration_time should be multiple of "
|
LOG(WARNING) << "coherent_integration_time should be multiple of "
|
||||||
<< "Galileo code length (4 ms). coherent_integration_time = "
|
<< "Galileo code length (4 ms). coherent_integration_time = "
|
||||||
<< sampled_ms_ << " ms will be used.";
|
<< sampled_ms_ << " ms will be used.";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||||
@ -81,23 +79,15 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
|||||||
max_dwells_ = 2;
|
max_dwells_ = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_filename_ = configuration_->property(role + ".dump_filename",
|
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||||
default_dump_filename);
|
|
||||||
|
|
||||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||||
|
code_length_ = round(fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||||
code_length_ = round(
|
|
||||||
fs_in_
|
|
||||||
/ (Galileo_E1_CODE_CHIP_RATE_HZ
|
|
||||||
/ Galileo_E1_B_CODE_LENGTH_CHIPS));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int samples_per_ms = round(code_length_ / 4.0);
|
int samples_per_ms = round(code_length_ / 4.0);
|
||||||
|
|
||||||
vector_length_ = sampled_ms_ * samples_per_ms;
|
vector_length_ = sampled_ms_ * samples_per_ms;
|
||||||
|
|
||||||
if( bit_transition_flag_ ){
|
if( bit_transition_flag_ )
|
||||||
|
{
|
||||||
vector_length_ *= 2;
|
vector_length_ *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,8 +123,7 @@ GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
|
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
@ -144,10 +133,8 @@ GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
float pfa = configuration_->property(role_+ boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
|
float pfa = configuration_->property(role_+ boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
|
||||||
|
|
||||||
if(pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
if(pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||||
@ -170,11 +157,9 @@ GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
|
|
||||||
{
|
{
|
||||||
doppler_max_ = doppler_max;
|
doppler_max_ = doppler_max;
|
||||||
|
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
acquisition_cc_->set_doppler_max(doppler_max_);
|
acquisition_cc_->set_doppler_max(doppler_max_);
|
||||||
@ -182,8 +167,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
|
|
||||||
{
|
{
|
||||||
doppler_step_ = doppler_step;
|
doppler_step_ = doppler_step;
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
@ -193,9 +177,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_channel_queue(concurrent_queue<int> *channel_internal_queue)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_channel_queue(
|
|
||||||
concurrent_queue<int> *channel_internal_queue)
|
|
||||||
{
|
{
|
||||||
channel_internal_queue_ = channel_internal_queue;
|
channel_internal_queue_ = channel_internal_queue;
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
@ -205,9 +187,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_channel_queue(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(
|
|
||||||
Gnss_Synchro* gnss_synchro)
|
|
||||||
{
|
{
|
||||||
gnss_synchro_ = gnss_synchro;
|
gnss_synchro_ = gnss_synchro;
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
@ -217,8 +197,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_gnss_synchro(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
signed int
|
signed int GalileoE1PcpsAmbiguousAcquisition::mag()
|
||||||
GalileoE1PcpsAmbiguousAcquisition::mag()
|
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
@ -231,16 +210,14 @@ GalileoE1PcpsAmbiguousAcquisition::mag()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::init()
|
||||||
GalileoE1PcpsAmbiguousAcquisition::init()
|
|
||||||
{
|
{
|
||||||
acquisition_cc_->init();
|
acquisition_cc_->init();
|
||||||
set_local_code();
|
set_local_code();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
@ -255,8 +232,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
|
for (unsigned int i = 0; i < sampled_ms_ / 4; i++)
|
||||||
{
|
{
|
||||||
memcpy(&(code_[i*code_length_]), code,
|
memcpy(&(code_[i*code_length_]), code, sizeof(gr_complex)*code_length_);
|
||||||
sizeof(gr_complex)*code_length_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
acquisition_cc_->set_local_code(code_);
|
acquisition_cc_->set_local_code(code_);
|
||||||
@ -266,8 +242,7 @@ GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::reset()
|
||||||
GalileoE1PcpsAmbiguousAcquisition::reset()
|
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
@ -275,12 +250,13 @@ GalileoE1PcpsAmbiguousAcquisition::reset()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
|
void GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
|
||||||
{
|
{
|
||||||
acquisition_cc_->set_state(state);
|
acquisition_cc_->set_state(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
|
float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||||
{
|
{
|
||||||
unsigned int frequency_bins = 0;
|
unsigned int frequency_bins = 0;
|
||||||
@ -302,8 +278,7 @@ float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
@ -312,8 +287,7 @@ GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||||
GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
|
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
|
@ -57,8 +57,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
|||||||
|
|
||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
|
|
||||||
item_type_ = configuration_->property(role + ".item_type",
|
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||||
default_item_type);
|
|
||||||
|
|
||||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
||||||
if_ = configuration_->property(role + ".ifreq", 0);
|
if_ = configuration_->property(role + ".ifreq", 0);
|
||||||
@ -82,8 +81,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
|||||||
|
|
||||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||||
|
|
||||||
dump_filename_ = configuration_->property(role + ".dump_filename",
|
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||||
default_dump_filename);
|
|
||||||
|
|
||||||
//--- Find number of samples per spreading code (1ms)-------------------------
|
//--- Find number of samples per spreading code (1ms)-------------------------
|
||||||
code_length_ = round(fs_in_ / Galileo_E5a_CODE_CHIP_RATE_HZ * Galileo_E5a_CODE_LENGTH_CHIPS);
|
code_length_ = round(fs_in_ / Galileo_E5a_CODE_CHIP_RATE_HZ * Galileo_E5a_CODE_LENGTH_CHIPS);
|
||||||
@ -137,6 +135,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -172,6 +171,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_max(unsigned int doppler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int doppler_step)
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int doppler_step)
|
||||||
{
|
{
|
||||||
doppler_step_ = doppler_step;
|
doppler_step_ = doppler_step;
|
||||||
@ -181,6 +181,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int dopple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel_queue(
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel_queue(
|
||||||
concurrent_queue<int> *channel_internal_queue)
|
concurrent_queue<int> *channel_internal_queue)
|
||||||
{
|
{
|
||||||
@ -222,11 +223,11 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::init()
|
|||||||
set_local_code();
|
set_local_code();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::complex<float>* codeI = new std::complex<float>[code_length_];
|
std::complex<float>* codeI = new std::complex<float>[code_length_];
|
||||||
std::complex<float>* codeQ = new std::complex<float>[code_length_];
|
std::complex<float>* codeQ = new std::complex<float>[code_length_];
|
||||||
|
|
||||||
@ -281,6 +282,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::reset()
|
void GalileoE5aNoncoherentIQAcquisitionCaf::reset()
|
||||||
{
|
{
|
||||||
if (item_type_.compare("gr_complex") == 0)
|
if (item_type_.compare("gr_complex") == 0)
|
||||||
@ -309,6 +311,7 @@ float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
|||||||
return threshold;
|
return threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_state(int state)
|
void GalileoE5aNoncoherentIQAcquisitionCaf::set_state(int state)
|
||||||
{
|
{
|
||||||
acquisition_cc_->set_state(state);
|
acquisition_cc_->set_state(state);
|
||||||
@ -328,6 +331,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::disconnect(gr::top_block_sptr top_bl
|
|||||||
// Nothing to disconnect internally
|
// Nothing to disconnect internally
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr GalileoE5aNoncoherentIQAcquisitionCaf::get_left_block()
|
gr::basic_block_sptr GalileoE5aNoncoherentIQAcquisitionCaf::get_left_block()
|
||||||
{
|
{
|
||||||
return acquisition_cc_;
|
return acquisition_cc_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user