1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-11 08:30:08 +00:00

Add bladeRF support

This commit is contained in:
osqzss 2018-02-24 15:19:04 +09:00
parent 30451e95f3
commit 995367d776

View File

@ -97,7 +97,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
LOG(INFO) << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq()); LOG(INFO) << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq());
// TODO: Assign the remnant IF from the PLL tune error // TODO: Assign the remnant IF from the PLL tune error
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) ; std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) << std::endl;
LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) ; LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) ;
// 4. set rx gain // 4. set rx gain
@ -113,10 +113,23 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
osmosdr_source_->set_gain(gain_, 0); osmosdr_source_->set_gain(gain_, 0);
osmosdr_source_->set_if_gain(rf_gain_, 0); osmosdr_source_->set_if_gain(rf_gain_, 0);
osmosdr_source_->set_bb_gain(if_gain_, 0); osmosdr_source_->set_bb_gain(if_gain_, 0);
if (!osmosdr_args_.empty() && (osmosdr_args_.find("bladerf") != std::string::npos))
{
std::cout << boost::format("Actual LNA Gain: %f dB...") % osmosdr_source_->get_gain("LNA",0) << std::endl;
std::cout << boost::format("Actual VGA1 Gain: %f dB...") % osmosdr_source_->get_gain("VGA1",0) << std::endl;
std::cout << boost::format("Actual VGA2 Gain: %f dB...") % osmosdr_source_->get_gain("VGA2",0) << std::endl;
}
else
{
std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl; std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl;
LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain(); LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain();
} }
} }
// Get actual bandwidth
std::cout << boost::format("Actual Bandwidth: %f [Hz]...") % osmosdr_source_->get_bandwidth(0) << std::endl;
}
else else
{ {
LOG(WARNING) << item_type_ << " unrecognized item type. Using short."; LOG(WARNING) << item_type_ << " unrecognized item type. Using short.";