1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-30 02:44:50 +00:00

Fix possible duplication of satellites

This commit is contained in:
Carles Fernandez 2018-10-25 16:48:19 +02:00
parent 49769059a7
commit b3d4ba33f3

View File

@ -833,34 +833,42 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
DLOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_[who]->get_signal().get_satellite() << ", Signal " << channels_[who]->get_signal().get_signal_str(); DLOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_[who]->get_signal().get_satellite() << ", Signal " << channels_[who]->get_signal().get_signal_str();
if (sat == 0) if (sat == 0)
{ {
switch (mapStringValues_[channels_[who]->get_signal().get_signal_str()]) Gnss_Signal gs = channels_[who]->get_signal();
switch (mapStringValues_[gs.get_signal_str()])
{ {
case evGPS_1C: case evGPS_1C:
available_GPS_1C_signals_.push_back(channels_[who]->get_signal()); available_GPS_1C_signals_.remove(gs);
available_GPS_1C_signals_.push_back(gs);
break; break;
case evGPS_2S: case evGPS_2S:
available_GPS_2S_signals_.push_back(channels_[who]->get_signal()); available_GPS_2S_signals_.remove(gs);
available_GPS_2S_signals_.push_back(gs);
break; break;
case evGPS_L5: case evGPS_L5:
available_GPS_L5_signals_.push_back(channels_[who]->get_signal()); available_GPS_L5_signals_.remove(gs);
available_GPS_L5_signals_.push_back(gs);
break; break;
case evGAL_1B: case evGAL_1B:
available_GAL_1B_signals_.push_back(channels_[who]->get_signal()); available_GAL_1B_signals_.remove(gs);
available_GAL_1B_signals_.push_back(gs);
break; break;
case evGAL_5X: case evGAL_5X:
available_GAL_5X_signals_.push_back(channels_[who]->get_signal()); available_GAL_5X_signals_.remove(gs);
available_GAL_5X_signals_.push_back(gs);
break; break;
case evGLO_1G: case evGLO_1G:
available_GLO_1G_signals_.push_back(channels_[who]->get_signal()); available_GLO_1G_signals_.remove(gs);
available_GLO_1G_signals_.push_back(gs);
break; break;
case evGLO_2G: case evGLO_2G:
available_GLO_2G_signals_.push_back(channels_[who]->get_signal()); available_GLO_2G_signals_.remove(gs);
available_GLO_2G_signals_.push_back(gs);
break; break;
default: default: