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