mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
code cleaning
This commit is contained in:
parent
1f3554384d
commit
d095b581ae
@ -135,7 +135,9 @@ void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel)
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_channel(channel_);
|
acquisition_sc_->set_channel(channel_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +164,9 @@ void GpsL1CaPcpsAcquisition::set_threshold(float threshold)
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_threshold(threshold_);
|
acquisition_sc_->set_threshold(threshold_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_threshold(threshold_);
|
acquisition_cc_->set_threshold(threshold_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,7 +179,9 @@ void GpsL1CaPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_doppler_max(doppler_max_);
|
acquisition_sc_->set_doppler_max(doppler_max_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_doppler_max(doppler_max_);
|
acquisition_cc_->set_doppler_max(doppler_max_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,7 +194,9 @@ void GpsL1CaPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_doppler_step(doppler_step_);
|
acquisition_sc_->set_doppler_step(doppler_step_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_doppler_step(doppler_step_);
|
acquisition_cc_->set_doppler_step(doppler_step_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +211,9 @@ void GpsL1CaPcpsAcquisition::set_channel_queue(
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_channel_queue(channel_internal_queue_);
|
acquisition_sc_->set_channel_queue(channel_internal_queue_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_channel_queue(channel_internal_queue_);
|
acquisition_cc_->set_channel_queue(channel_internal_queue_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +226,9 @@ void GpsL1CaPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_gnss_synchro(gnss_synchro_);
|
acquisition_sc_->set_gnss_synchro(gnss_synchro_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
|
acquisition_cc_->set_gnss_synchro(gnss_synchro_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,7 +239,9 @@ signed int GpsL1CaPcpsAcquisition::mag()
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return acquisition_sc_->mag();
|
return acquisition_sc_->mag();
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return acquisition_cc_->mag();
|
return acquisition_cc_->mag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +252,9 @@ void GpsL1CaPcpsAcquisition::init()
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->init();
|
acquisition_sc_->init();
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->init();
|
acquisition_cc_->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +280,9 @@ void GpsL1CaPcpsAcquisition::set_local_code()
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_local_code(code_);
|
acquisition_sc_->set_local_code(code_);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_local_code(code_);
|
acquisition_cc_->set_local_code(code_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,21 +293,25 @@ void GpsL1CaPcpsAcquisition::set_local_code()
|
|||||||
|
|
||||||
void GpsL1CaPcpsAcquisition::reset()
|
void GpsL1CaPcpsAcquisition::reset()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_active(true);
|
acquisition_sc_->set_active(true);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_active(true);
|
acquisition_cc_->set_active(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GpsL1CaPcpsAcquisition::set_state(int state)
|
void GpsL1CaPcpsAcquisition::set_state(int state)
|
||||||
{
|
{
|
||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
acquisition_sc_->set_state(state);
|
acquisition_sc_->set_state(state);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
acquisition_cc_->set_state(state);
|
acquisition_cc_->set_state(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,12 +346,7 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
//top_block->connect(cshort_to_float_x2_, 0, float_to_complex_, 0);
|
|
||||||
//top_block->connect(cshort_to_float_x2_, 1, float_to_complex_, 1);
|
|
||||||
//top_block->connect(float_to_complex_, 0, stream_to_vector_, 0);
|
|
||||||
//top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
|
|
||||||
top_block->connect(stream_to_vector_, 0, acquisition_sc_, 0);
|
top_block->connect(stream_to_vector_, 0, acquisition_sc_, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
@ -353,12 +370,6 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
// Since a short-based acq implementation is not available,
|
|
||||||
// we just convert cshorts to gr_complex
|
|
||||||
//top_block->disconnect(cshort_to_float_x2_, 0, float_to_complex_, 0);
|
|
||||||
//top_block->disconnect(cshort_to_float_x2_, 1, float_to_complex_, 1);
|
|
||||||
//top_block->disconnect(float_to_complex_, 0, stream_to_vector_, 0);
|
|
||||||
//top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0);
|
|
||||||
top_block->disconnect(stream_to_vector_, 0, acquisition_sc_, 0);
|
top_block->disconnect(stream_to_vector_, 0, acquisition_sc_, 0);
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
@ -385,7 +396,6 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
|
|||||||
}
|
}
|
||||||
else if (item_type_.compare("cshort") == 0)
|
else if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
//return cshort_to_float_x2_;
|
|
||||||
return stream_to_vector_;
|
return stream_to_vector_;
|
||||||
}
|
}
|
||||||
else if (item_type_.compare("cbyte") == 0)
|
else if (item_type_.compare("cbyte") == 0)
|
||||||
@ -405,7 +415,9 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()
|
|||||||
if (item_type_.compare("cshort") == 0)
|
if (item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
return acquisition_sc_;
|
return acquisition_sc_;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return acquisition_cc_;
|
return acquisition_cc_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user