Commit 6b119f87 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Remove satellites from list if we cannot calculate their position

parent fbbc00f7
......@@ -62,10 +62,18 @@ void SatelliteGroup::readTLE()
void SatelliteGroup::updateSatellitesPos()
{
for ( int i=0; i<size(); i++ ) {
Satellite *sat = at( i );
QMutableListIterator<Satellite *> sats(*this);
while (sats.hasNext())
{
Satellite *sat = sats.next();
if ( sat->selected() )
sat->updatePos();
{
int rc = sat->updatePos();
// If position cannot be calculated, remove it from list
if (rc != 0)
sats.remove();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment