Set assist_dual_frequency_acq to true by default only for multiple-band receivers

Fixes configurations which do not contain signals in L1
This commit is contained in:
Carles Fernandez 2019-10-04 09:17:29 +02:00
parent b8eef3697f
commit c63c85ff36
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 44 additions and 2 deletions

View File

@ -80,6 +80,7 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr<ConfigurationInterface> configurati
running_ = false;
configuration_ = std::move(configuration);
queue_ = queue;
multiband_ = GNSSFlowgraph::is_multiband();
init();
}
@ -1218,7 +1219,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
estimated_doppler,
RX_time);
channels_[current_channel]->set_signal(gnss_signal);
start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", true);
start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", multiband_);
}
else
{
@ -1233,7 +1234,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
DLOG(INFO) << "Channel " << current_channel
<< " Starting acquisition " << channels_[current_channel]->get_signal().get_satellite()
<< ", Signal " << channels_[current_channel]->get_signal().get_signal_str();
if (assistance_available == true and configuration_->property("GNSS-SDR.assist_dual_frequency_acq", true))
if (assistance_available == true and configuration_->property("GNSS-SDR.assist_dual_frequency_acq", multiband_))
{
channels_[current_channel]->assist_acquisition_doppler(project_doppler(channels_[current_channel]->get_signal().get_signal_str(), estimated_doppler));
}
@ -1891,6 +1892,45 @@ void GNSSFlowgraph::set_channels_state()
}
bool GNSSFlowgraph::is_multiband() const
{
bool multiband = false;
if (configuration_->property("Channels_1C.count", 0) > 0)
{
if (configuration_->property("Channels_2S.count", 0) > 0)
{
multiband = true;
}
if (configuration_->property("Channels_L5.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_1B.count", 0) > 0)
{
if (configuration_->property("Channels_5X.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_1G.count", 0) > 0)
{
if (configuration_->property("Channels_2G.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_B1.count", 0) > 0)
{
if (configuration_->property("Channels_B3.count", 0) > 0)
{
multiband = true;
}
}
return multiband;
}
Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal,
const bool pop,
bool& is_primary_frequency,

View File

@ -182,8 +182,10 @@ private:
void remove_signal(const Gnss_Signal& gs);
double project_doppler(const std::string& searched_signal, double primary_freq_doppler_hz);
bool is_multiband() const;
bool connected_;
bool running_;
bool multiband_;
int sources_count_;
unsigned int channels_count_;