1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-30 23:03:05 +00:00
into anthony-arnold-osmoflags
This commit is contained in:
Carles Fernandez
2015-04-30 20:13:14 +02:00
10 changed files with 371 additions and 57 deletions

View File

@@ -114,7 +114,7 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
{
/*!
* BUG workaround: The GNU Radio file source does not stop the receiver after reaching the End of File.
* A possible solution is to compute the file length in samples using file size, excluding the last 100 milliseconds, and enable always the
* A possible solution is to compute the file length in samples using file size, excluding the last 2 milliseconds, and enable always the
* valve block
*/
std::ifstream file (filename_.c_str(), std::ios::in | std::ios::binary | std::ios::ate);

View File

@@ -65,6 +65,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
if_gain_ = configuration->property(role + ".if_gain", (double)40.0);
sample_rate_ = configuration->property(role + ".sampling_frequency", (double)2.0e6);
item_type_ = configuration->property(role + ".item_type", default_item_type);
osmosdr_args_ = configuration->property(role + ".osmosdr_args", std::string( ));
if (item_type_.compare("short") == 0)
{
@@ -76,7 +77,12 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
// 1. Make the driver instance
try
{
osmosdr_source_ = osmosdr::source::make();
if (!osmosdr_args_.empty())
{
std::cout << "OsmoSdr arguments: " << osmosdr_args_ << std::endl;
LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_;
}
osmosdr_source_ = osmosdr::source::make(osmosdr_args_);
}
catch( boost::exception & e )
{

View File

@@ -100,6 +100,7 @@ private:
std::string dump_filename_;
osmosdr::source::sptr osmosdr_source_;
std::string osmosdr_args_;
boost::shared_ptr<gr::block> valve_;
gr::blocks::file_sink::sptr file_sink_;