Merge branch 'vladisslav2011-osmosdr-bw' into next

This commit is contained in:
Carles Fernandez 2022-07-06 14:03:58 +02:00
commit 0e1bfc0026
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,8 @@ All notable changes to GNSS-SDR will be documented in this file.
load on the data link and thus allow more bandwidth.
- Added gain setting and reading for the XTRX board when using the
`Osmosdr_Signal_Source` implementation of a `SignalSource`.
- The `Osmosdr_Signal_Source` implementation learned a new parameter `if_bw` to
manually set the bandwidth of the bandpass filter on the radio frontend.
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/

View File

@ -42,6 +42,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
gain_(configuration->property(role + ".gain", 40.0)),
if_gain_(configuration->property(role + ".if_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))),
in_stream_(in_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
std::cout << "Actual Bandwidth: " << osmosdr_source_->get_bandwidth(0) << " [Hz]...\n";
}

View File

@ -79,6 +79,7 @@ private:
double gain_;
double if_gain_;
double rf_gain_;
double if_bw_;
size_t item_size_;
int64_t samples_;