mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
Baseband downconverting PulseBlanking
Added an IF to baseband downconverting stage previous to the pulse blanking filter
This commit is contained in:
parent
afb3aa14f6
commit
dceb15acdc
@ -32,6 +32,7 @@
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include "configuration_interface.h"
|
||||
#include <vector>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -71,7 +72,13 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
|
||||
item_size = sizeof(gr_complex); //avoids uninitialization
|
||||
input_size_ = sizeof(gr_complex); //avoids uninitialization
|
||||
}
|
||||
|
||||
float default_if = 0.0;
|
||||
float if_ = config_->property(role_ + ".if", default_if);
|
||||
if (if_ > 0.0)
|
||||
{
|
||||
const std::vector<float> taps = { 1.0 }; //All-pass filter
|
||||
freq_xlating_ = gr::filter::freq_xlating_fir_filter_ccf::make(1, taps, if_, config_->property("SignalSource.sampling_frequency", 2000000));
|
||||
}
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
@ -95,6 +102,10 @@ void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
top_block->connect(pulse_blanking_cc_, 0, file_sink_, 0);
|
||||
}
|
||||
if (config_->property(role_ + ".if", 0.0) > 0.0)
|
||||
{
|
||||
top_block->connect(freq_xlating_, 0, pulse_blanking_cc_, 0);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
@ -113,6 +124,10 @@ void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
top_block->disconnect(pulse_blanking_cc_, 0, file_sink_, 0);
|
||||
}
|
||||
if (config_->property(role_ + ".if", 0.0) > 0.0)
|
||||
{
|
||||
top_block->disconnect(freq_xlating_, 0, pulse_blanking_cc_, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -124,9 +139,16 @@ void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
|
||||
gr::basic_block_sptr PulseBlankingFilter::get_left_block()
|
||||
{
|
||||
if (input_item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
if (config_->property(role_ + ".if", 0.0) > 0.0)
|
||||
{
|
||||
return freq_xlating_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return pulse_blanking_cc_;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/filter/freq_xlating_fir_filter_ccf.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "pulse_blanking_cc.h"
|
||||
|
||||
@ -82,6 +83,7 @@ private:
|
||||
unsigned int out_streams_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
pulse_blanking_cc_sptr pulse_blanking_cc_;
|
||||
gr::filter::freq_xlating_fir_filter_ccf::sptr freq_xlating_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PULSE_BLANKING_FILTER_H_
|
||||
|
Loading…
Reference in New Issue
Block a user