mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
osmosdr signal source: implement bandwidth selection
New config file parameter: SignalSource.if_bw=<bandwidth in Hz> Signed-off-by: Vladisslav P <vladisslav2011@gmail.com>
This commit is contained in:
parent
cb52bc71e8
commit
3491fed625
@ -42,6 +42,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
|
|||||||
gain_(configuration->property(role + ".gain", 40.0)),
|
gain_(configuration->property(role + ".gain", 40.0)),
|
||||||
if_gain_(configuration->property(role + ".if_gain", 40.0)),
|
if_gain_(configuration->property(role + ".if_gain", 40.0)),
|
||||||
rf_gain_(configuration->property(role + ".rf_gain", 40.0)),
|
rf_gain_(configuration->property(role + ".rf_gain", 40.0)),
|
||||||
|
if_bw_(configuration->property(role + ".if_bw", 0.0)),
|
||||||
samples_(configuration->property(role + ".samples", static_cast<int64_t>(0))),
|
samples_(configuration->property(role + ".samples", static_cast<int64_t>(0))),
|
||||||
in_stream_(in_stream),
|
in_stream_(in_stream),
|
||||||
out_stream_(out_stream),
|
out_stream_(out_stream),
|
||||||
@ -118,6 +119,12 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 5. set bandwidth
|
||||||
|
if (if_bw_ > 0.0)
|
||||||
|
{
|
||||||
|
osmosdr_source_->set_bandwidth(if_bw_, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Get actual bandwidth
|
// Get actual bandwidth
|
||||||
std::cout << "Actual Bandwidth: " << osmosdr_source_->get_bandwidth(0) << " [Hz]...\n";
|
std::cout << "Actual Bandwidth: " << osmosdr_source_->get_bandwidth(0) << " [Hz]...\n";
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@ private:
|
|||||||
double gain_;
|
double gain_;
|
||||||
double if_gain_;
|
double if_gain_;
|
||||||
double rf_gain_;
|
double rf_gain_;
|
||||||
|
double if_bw_;
|
||||||
|
|
||||||
size_t item_size_;
|
size_t item_size_;
|
||||||
int64_t samples_;
|
int64_t samples_;
|
||||||
|
Loading…
Reference in New Issue
Block a user