1
0
Fork 0
flightgear/test_suite/FGTestApi/NavDataCache.cxx
James Turner b85048db2d GPS/FLightPlan test updates
- fix reseting of the NavData each test
- improve the test-pilot’s GPS following (reduce turn range close
   to the desired course)
- test DME intercepts
2020-04-21 15:48:41 +01:00

28 lines
636 B
C++

#include "NavDataCache.hxx"
#include <Navaids/NavDataCache.hxx>
namespace FGTestApi {
namespace setUp {
void initNavDataCache()
{
if (flightgear::NavDataCache::instance())
return;
flightgear::NavDataCache* cache = flightgear::NavDataCache::createInstance();
if (cache->isRebuildRequired()) {
std::cerr << "Navcache rebuild for testing" << std::flush;
while (cache->rebuild() != flightgear::NavDataCache::REBUILD_DONE) {
SGTimeStamp::sleepForMSec(1000);
std::cerr << "." << std::flush;
}
}
}
} // End of namespace setUp.
} // End of namespace FGTestApi.