mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 20:23:02 +00:00
Improve channel state management in multisystem configurations
This commit is contained in:
parent
36ac696a46
commit
5b2040ae50
@ -763,10 +763,35 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(signal_list_mutex);
|
||||
available_GNSS_signals_.push_back(channels_[who]->get_signal());
|
||||
channels_[who]->set_signal(search_next_signal(channels_[who]->get_signal().get_signal_str(), true));
|
||||
}
|
||||
DLOG(INFO) << "Channel " << who << " Starting acquisition " << channels_[who]->get_signal().get_satellite() << ", Signal " << channels_[who]->get_signal().get_signal_str();
|
||||
channels_[who]->start_acquisition();
|
||||
channels_state_[who] = 0;
|
||||
acq_channels_count_--;
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
unsigned int ii = (i + 1) % channels_count_;
|
||||
unsigned int sat_ = 0;
|
||||
try
|
||||
{
|
||||
sat_ = configuration_->property("Channel" + std::to_string(ii) + ".satellite", 0);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
}
|
||||
if (!available_GNSS_signals_.empty() && (acq_channels_count_ < max_acq_channels_) && (channels_state_[ii] == 0))
|
||||
{
|
||||
channels_state_[ii] = 1;
|
||||
if (sat_ == 0)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(signal_list_mutex);
|
||||
channels_[ii]->set_signal(search_next_signal(channels_[ii]->get_signal().get_signal_str(), true));
|
||||
}
|
||||
acq_channels_count_++;
|
||||
DLOG(INFO) << "Channel " << ii << " Starting acquisition " << channels_[ii]->get_signal().get_satellite() << ", Signal " << channels_[ii]->get_signal().get_signal_str();
|
||||
channels_[ii]->start_acquisition();
|
||||
}
|
||||
DLOG(INFO) << "Channel " << ii << " in state " << channels_state_[ii];
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
Loading…
Reference in New Issue
Block a user