Fix wrong velocity and latitude

This commit is contained in:
Tim Schubert 2020-08-17 11:52:27 +02:00
parent 4cad8458ab
commit d145337d6c
3 changed files with 5 additions and 5 deletions

View file

@ -50,11 +50,11 @@ LeoCircularOrbitAllocator::GetNext () const
2 * M_PI * (m_lastSatellite / (double) m_numSatellites),
0);
m_lastSatellite = (m_lastSatellite + 1) % m_numSatellites;
if (m_lastSatellite >= m_numSatellites)
if (m_lastSatellite + 1 == m_numSatellites)
{
m_lastOrbit = (m_lastOrbit + 1) % m_numOrbits;
}
m_lastSatellite = (m_lastSatellite + 1) % m_numSatellites;
return next;
}