1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Merge remote-tracking branch 'gnss-sdr/next' into system_test_space

This commit is contained in:
Unknown 2017-11-07 12:07:29 +01:00
commit ab6415d843
3 changed files with 8 additions and 5 deletions

View File

@ -412,8 +412,8 @@ void FreqXlatingFirFilter::init()
{ {
double default_bw = 2000000.0; double default_bw = 2000000.0;
double bw_ = config_->property(role_ + ".bw", default_bw); double bw_ = config_->property(role_ + ".bw", default_bw);
double default_tw = bw_ / 20.0; double default_tw = bw_ / 10.0;
double tw_ = config_->property(role_ + ".tw", default_tw); double tw_ = config_->property(role_ + ".tw", default_tw);
taps_ = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_ / 2.0, tw_); taps_ = gr::filter::firdes::low_pass(1.0, sampling_freq_, bw_, tw_);
} }
} }

View File

@ -44,6 +44,7 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
out_streams_(out_streams) out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
xlat_ = false;
std::string default_input_item_type = "gr_complex"; std::string default_input_item_type = "gr_complex";
std::string default_output_item_type = "gr_complex"; std::string default_output_item_type = "gr_complex";
std::string default_dump_filename = "../data/input_filter.dat"; std::string default_dump_filename = "../data/input_filter.dat";
@ -79,6 +80,7 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
double if_ = config_->property(role_ + ".IF", if_aux); double if_ = config_->property(role_ + ".IF", if_aux);
if (std::abs(if_) > 1.0) if (std::abs(if_) > 1.0)
{ {
xlat_ = true;
double default_sampling_freq = 4000000.0; double default_sampling_freq = 4000000.0;
double sampling_freq_ = config_->property(role_ + ".sampling_frequency", default_sampling_freq); double sampling_freq_ = config_->property(role_ + ".sampling_frequency", default_sampling_freq);
double default_bw = 2000000.0; double default_bw = 2000000.0;
@ -111,7 +113,7 @@ void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
{ {
top_block->connect(pulse_blanking_cc_, 0, file_sink_, 0); top_block->connect(pulse_blanking_cc_, 0, file_sink_, 0);
} }
if (std::abs(config_->property(role_ + ".if", 0.0)) > 1.0) if (xlat_)
{ {
top_block->connect(freq_xlating_, 0, pulse_blanking_cc_, 0); top_block->connect(freq_xlating_, 0, pulse_blanking_cc_, 0);
} }
@ -133,7 +135,7 @@ void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
{ {
top_block->disconnect(pulse_blanking_cc_, 0, file_sink_, 0); top_block->disconnect(pulse_blanking_cc_, 0, file_sink_, 0);
} }
if (std::abs(config_->property(role_ + ".if", 0.0)) > 1.0) if (xlat_)
{ {
top_block->disconnect(freq_xlating_, 0, pulse_blanking_cc_, 0); top_block->disconnect(freq_xlating_, 0, pulse_blanking_cc_, 0);
} }
@ -149,7 +151,7 @@ gr::basic_block_sptr PulseBlankingFilter::get_left_block()
{ {
if (input_item_type_.compare("gr_complex") == 0) if (input_item_type_.compare("gr_complex") == 0)
{ {
if (std::abs(config_->property(role_ + ".if", 0.0)) > 1.0) if (xlat_)
{ {
return freq_xlating_; return freq_xlating_;
} }

View File

@ -73,6 +73,7 @@ public:
private: private:
ConfigurationInterface* config_; ConfigurationInterface* config_;
bool dump_; bool dump_;
bool xlat_;
std::string dump_filename_; std::string dump_filename_;
std::string input_item_type_; std::string input_item_type_;
size_t input_size_; size_t input_size_;