Add test for adding waypoints

This commit is contained in:
Tim Schubert 2020-07-07 20:26:38 +02:00
parent e1bca0b7d9
commit 737c9a49c7
3 changed files with 65 additions and 7 deletions

View file

@ -63,16 +63,19 @@ LeoWaypointInputFileStreamContainer::GetNextSample (Waypoint &sample)
NS_ABORT_MSG ("Input stream is bad");
}
Time newLast = m_lastTime;
while (m_input && sample.time < m_lastTime)
sample.time = Time (0);
sample.position = Vector (0.0, 0.0, 0.0);
bool updated = false;
while (sample.time < m_lastTime && (m_input >> sample))
{
m_input >> sample;
newLast = sample.time;
updated = true;
}
if (updated)
{
m_lastTime = sample.time;
}
bool res = (newLast != m_lastTime) && m_input;
m_lastTime = newLast;
return res;
return updated;
}
void