1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Relaxing resampler low pass filter for automatic acquisition resampler

This commit is contained in:
Javier Arribas 2019-04-09 12:01:01 +02:00
parent d6871bd820
commit 2290a75eeb

View File

@ -91,6 +91,13 @@ GNSSFlowgraph::~GNSSFlowgraph()
{ {
GNSSFlowgraph::disconnect(); GNSSFlowgraph::disconnect();
} }
//debug
std::cout << "Called flowgraph destructor\n";
// Activate acquisition in enabled channels
for (unsigned int i = 0; i < channels_count_; i++)
{
std::cout << " ch " << i << " trk sptr use count: " << channels_.at(i)->get_left_block_trk().use_count() << "\n";
}
} }
@ -246,8 +253,8 @@ void GNSSFlowgraph::connect()
{ {
// Connect the multichannel signal source to multiple signal conditioners // Connect the multichannel signal source to multiple signal conditioners
// GNURADIO max_streams=-1 means infinite ports! // GNURADIO max_streams=-1 means infinite ports!
LOG(INFO) << "sig_source_.at(i)->get_right_block()->output_signature()->max_streams()=" << sig_source_.at(i)->get_right_block()->output_signature()->max_streams(); DLOG(INFO) << "sig_source_.at(i)->get_right_block()->output_signature()->max_streams()=" << sig_source_.at(i)->get_right_block()->output_signature()->max_streams();
LOG(INFO) << "sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()=" << sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()->max_streams(); DLOG(INFO) << "sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()=" << sig_conditioner_.at(signal_conditioner_ID)->get_left_block()->input_signature()->max_streams();
if (sig_source_.at(i)->get_right_block()->output_signature()->max_streams() > 1) if (sig_source_.at(i)->get_right_block()->output_signature()->max_streams() > 1)
{ {
@ -443,10 +450,26 @@ void GNSSFlowgraph::connect()
{ {
// create a FIR low pass filter // create a FIR low pass filter
std::vector<float> taps; std::vector<float> taps;
// float beta = 7.0;
// float halfband = 0.5;
// float fractional_bw = 0.4;
// float rate = 1.0 / static_cast<float>(decimation);
//
// float trans_width = rate * (halfband - fractional_bw);
// float mid_transition_band = rate * halfband - trans_width / 2.0;
//
// taps = gr::filter::firdes::low_pass(1.0,
// 1.0,
// mid_transition_band,
// trans_width,
// gr::filter::firdes::win_type::WIN_KAISER,
// beta);
taps = gr::filter::firdes::low_pass(1.0, taps = gr::filter::firdes::low_pass(1.0,
fs, fs,
acq_fs / 2.1, acq_fs / 2.1,
acq_fs / 10, acq_fs / 2,
gr::filter::firdes::win_type::WIN_HAMMING); gr::filter::firdes::win_type::WIN_HAMMING);
gr::basic_block_sptr fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(decimation, taps); gr::basic_block_sptr fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(decimation, taps);