mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-09 23:50:07 +00:00
merging next Merge branch 'next' of https://git.code.sf.net/p/gnss-sdr/cttc into next
This commit is contained in:
commit
e4bd312731
@ -85,9 +85,6 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
|||||||
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
|
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||||
DLOG(INFO) << "I input_filter(" << fir_filter_fff_1_->unique_id() << ")";
|
DLOG(INFO) << "I input_filter(" << fir_filter_fff_1_->unique_id() << ")";
|
||||||
DLOG(INFO) << "Q input_filter(" << fir_filter_fff_2_->unique_id() << ")";
|
DLOG(INFO) << "Q input_filter(" << fir_filter_fff_2_->unique_id() << ")";
|
||||||
//float_to_short_1_ = gr::blocks::float_to_short::make();
|
|
||||||
//float_to_short_2_ = gr::blocks::float_to_short::make();
|
|
||||||
//short_x2_to_cshort_ = make_short_x2_to_cshort();
|
|
||||||
float_to_complex_ = gr::blocks::float_to_complex::make();
|
float_to_complex_ = gr::blocks::float_to_complex::make();
|
||||||
if (dump_)
|
if (dump_)
|
||||||
{
|
{
|
||||||
|
@ -47,8 +47,18 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
|||||||
out_streams_(out_streams)
|
out_streams_(out_streams)
|
||||||
{
|
{
|
||||||
std::string default_item_type = "gr_complex";
|
std::string default_item_type = "gr_complex";
|
||||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
|
||||||
|
std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
|
||||||
|
if(input_type.compare(output_type) != 0)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
|
||||||
|
<< input_type
|
||||||
|
<< ", but item_size will supersede it.";
|
||||||
|
}
|
||||||
|
|
||||||
|
item_type_ = configuration->property(role + ".item_type", input_type);
|
||||||
vector_size_ = configuration->property(role + ".vector_size", 1);
|
vector_size_ = configuration->property(role + ".vector_size", 1);
|
||||||
|
|
||||||
if(item_type_.compare("float") == 0)
|
if(item_type_.compare("float") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(float);
|
item_size_ = sizeof(float);
|
||||||
@ -61,6 +71,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
|||||||
{
|
{
|
||||||
item_size_ = sizeof(int16_t);
|
item_size_ = sizeof(int16_t);
|
||||||
}
|
}
|
||||||
|
else if(item_type_.compare("ishort") == 0)
|
||||||
|
{
|
||||||
|
item_size_ = sizeof(int16_t);
|
||||||
|
}
|
||||||
else if(item_type_.compare("cshort") == 0)
|
else if(item_type_.compare("cshort") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(lv_16sc_t);
|
item_size_ = sizeof(lv_16sc_t);
|
||||||
@ -69,6 +83,10 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
|
|||||||
{
|
{
|
||||||
item_size_ = sizeof(int8_t);
|
item_size_ = sizeof(int8_t);
|
||||||
}
|
}
|
||||||
|
else if(item_type_.compare("ibyte") == 0)
|
||||||
|
{
|
||||||
|
item_size_ = sizeof(int8_t);
|
||||||
|
}
|
||||||
else if(item_type_.compare("cbyte") == 0)
|
else if(item_type_.compare("cbyte") == 0)
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(lv_8sc_t);
|
item_size_ = sizeof(lv_8sc_t);
|
||||||
|
@ -80,7 +80,9 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
|||||||
|
|
||||||
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz", sample_rate_/2));
|
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz", sample_rate_/2));
|
||||||
|
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// multiple RF channels selected
|
// multiple RF channels selected
|
||||||
for (int i = 0; i < RF_channels_; i++)
|
for (int i = 0; i < RF_channels_; i++)
|
||||||
{
|
{
|
||||||
@ -222,7 +224,6 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
|||||||
DLOG(INFO) << "file_sink(" << file_sink_.at(i)->unique_id() << ")";
|
DLOG(INFO) << "file_sink(" << file_sink_.at(i)->unique_id() << ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -230,12 +231,11 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
|||||||
UhdSignalSource::~UhdSignalSource()
|
UhdSignalSource::~UhdSignalSource()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void UhdSignalSource::connect(gr::top_block_sptr top_block)
|
void UhdSignalSource::connect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = 0; i < RF_channels_; i++)
|
for (int i = 0; i < RF_channels_; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (samples_.at(i) != 0)
|
if (samples_.at(i) != 0)
|
||||||
{
|
{
|
||||||
top_block->connect(uhd_source_, i, valve_.at(i), 0);
|
top_block->connect(uhd_source_, i, valve_.at(i), 0);
|
||||||
@ -297,6 +297,7 @@ gr::basic_block_sptr UhdSignalSource::get_right_block()
|
|||||||
return get_right_block(0);
|
return get_right_block(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gr::basic_block_sptr UhdSignalSource::get_right_block(int RF_channel)
|
gr::basic_block_sptr UhdSignalSource::get_right_block(int RF_channel)
|
||||||
{
|
{
|
||||||
if (samples_.at(RF_channel) != 0)
|
if (samples_.at(RF_channel) != 0)
|
||||||
|
@ -54,16 +54,13 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr<ConfigurationInterface> configurati
|
|||||||
connected_ = false;
|
connected_ = false;
|
||||||
running_ = false;
|
running_ = false;
|
||||||
configuration_ = configuration;
|
configuration_ = configuration;
|
||||||
//std::shared_ptr<std::vector<std::shared_ptr<GNSSBlockInterface>>> blocks_ = std::make_shared<std::vector<std::shared_ptr<GNSSBlockInterface>>>();
|
|
||||||
queue_ = queue;
|
queue_ = queue;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GNSSFlowgraph::~GNSSFlowgraph()
|
GNSSFlowgraph::~GNSSFlowgraph()
|
||||||
{
|
{}
|
||||||
//blocks_->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GNSSFlowgraph::start()
|
void GNSSFlowgraph::start()
|
||||||
{
|
{
|
||||||
@ -87,6 +84,7 @@ void GNSSFlowgraph::start()
|
|||||||
running_ = true;
|
running_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GNSSFlowgraph::stop()
|
void GNSSFlowgraph::stop()
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < channels_count_; i++)
|
for (unsigned int i = 0; i < channels_count_; i++)
|
||||||
@ -129,7 +127,6 @@ void GNSSFlowgraph::connect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Signal Source > Signal conditioner >
|
// Signal Source > Signal conditioner >
|
||||||
|
|
||||||
for (int i = 0; i < sources_count_; i++)
|
for (int i = 0; i < sources_count_; i++)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -149,9 +146,6 @@ void GNSSFlowgraph::connect()
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//auto chan_ = std::move(blocks_->at(i));
|
|
||||||
//std::shared_ptr<ChannelInterface> chan = std::dynamic_pointer_cast<ChannelInterface>(chan_);
|
|
||||||
//channels_.push_back(chan);
|
|
||||||
channels_.at(i)->connect(top_block_);
|
channels_.at(i)->connect(top_block_);
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
@ -165,7 +159,6 @@ void GNSSFlowgraph::connect()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//observables_ = std::move(blocks_->at(2));
|
|
||||||
observables_->connect(top_block_);
|
observables_->connect(top_block_);
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
@ -179,7 +172,6 @@ void GNSSFlowgraph::connect()
|
|||||||
// Signal Source > Signal conditioner >> Channels >> Observables > PVT
|
// Signal Source > Signal conditioner >> Channels >> Observables > PVT
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//pvt_ = std::move(blocks_->at(3));
|
|
||||||
pvt_->connect(top_block_);
|
pvt_->connect(top_block_);
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
@ -193,7 +185,6 @@ void GNSSFlowgraph::connect()
|
|||||||
// Signal Source > Signal conditioner >> Channels >> Observables > PVT > Output Filter
|
// Signal Source > Signal conditioner >> Channels >> Observables > PVT > Output Filter
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//output_filter_ = std::move(blocks_->at(4));
|
|
||||||
output_filter_->connect(top_block_);
|
output_filter_->connect(top_block_);
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
@ -207,10 +198,8 @@ void GNSSFlowgraph::connect()
|
|||||||
DLOG(INFO) << "blocks connected internally";
|
DLOG(INFO) << "blocks connected internally";
|
||||||
|
|
||||||
// Signal Source (i) > Signal conditioner (i) >
|
// Signal Source (i) > Signal conditioner (i) >
|
||||||
|
|
||||||
for (int i = 0; i < sources_count_; i++)
|
for (int i = 0; i < sources_count_; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//TODO: Remove this array implementation and create generic multistream connector
|
//TODO: Remove this array implementation and create generic multistream connector
|
||||||
@ -300,8 +289,8 @@ void GNSSFlowgraph::connect()
|
|||||||
LOG(INFO) << "Channel " << i
|
LOG(INFO) << "Channel " << i
|
||||||
<< " connected to observables in standby mode";
|
<< " connected to observables in standby mode";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Connect the observables output of each channel to the PVT block
|
* Connect the observables output of each channel to the PVT block
|
||||||
*/
|
*/
|
||||||
@ -465,11 +454,13 @@ void GNSSFlowgraph::init()
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < sources_count_; i++)
|
for (int i = 0; i < sources_count_; i++)
|
||||||
{
|
{
|
||||||
std::cout<<"creating source "<<i<<std::endl;
|
std::cout << "Creating signal source " << i << std::endl;
|
||||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, i));
|
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, i));
|
||||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, i));
|
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, i));
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//backwards compatibility for old config files
|
//backwards compatibility for old config files
|
||||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, -1));
|
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, -1));
|
||||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, -1));
|
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, -1));
|
||||||
@ -498,6 +489,7 @@ void GNSSFlowgraph::init()
|
|||||||
DLOG(INFO) << "Blocks instantiated. " << channels_count_ << " channels.";
|
DLOG(INFO) << "Blocks instantiated. " << channels_count_ << " channels.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GNSSFlowgraph::set_signals_list()
|
void GNSSFlowgraph::set_signals_list()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -621,7 +613,6 @@ void GNSSFlowgraph::set_signals_list()
|
|||||||
// {
|
// {
|
||||||
// std::cout << *available_gnss_list_iter << std::endl;
|
// std::cout << *available_gnss_list_iter << std::endl;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ private:
|
|||||||
std::string config_file_;
|
std::string config_file_;
|
||||||
std::shared_ptr<ConfigurationInterface> configuration_;
|
std::shared_ptr<ConfigurationInterface> configuration_;
|
||||||
std::shared_ptr<GNSSBlockFactory> block_factory_;
|
std::shared_ptr<GNSSBlockFactory> block_factory_;
|
||||||
//std::shared_ptr<std::vector<std::shared_ptr<GNSSBlockInterface>>> blocks_ = std::make_shared<std::vector<std::shared_ptr<GNSSBlockInterface>>>();
|
|
||||||
|
|
||||||
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_source_;
|
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_source_;
|
||||||
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_conditioner_;
|
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_conditioner_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user