Ref T472, added a 1st version of glider category matching

This commit is contained in:
Klaus Basan
2019-03-09 02:06:31 +01:00
committed by Mat Sutcliffe
parent 13de708944
commit 3a10483379
3 changed files with 131 additions and 0 deletions

View File

@@ -872,6 +872,8 @@ namespace BlackCore
if (setup.getMatchingMode().testFlag(CAircraftMatcherSetup::ByIcaoData))
{
// by airline/aircraft or by aircraft/airline depending on setup
// family is also considered
matchedModels = ifPossibleReduceByIcaoData(remoteAircraft, matchedModels, setup, reduced, log);
}
else if (log)
@@ -891,6 +893,16 @@ namespace BlackCore
}
}
if (setup.useCategoryMatching())
{
matchedModels = categoryMatcher.reduceByCategories(modelSet, setup, remoteAircraft, reduced, shortLog, log);
// ?? break here ??
}
else if (log)
{
CMatchingUtils::addLogDetailsToList(log, remoteAircraft, QStringLiteral("category matchig disabled"), getLogCategories());
}
// if not yet reduced, reduce to VTOL
if (!reduced && remoteAircraft.isVtol() && matchedModels.containsVtol() && mode.testFlag(CAircraftMatcherSetup::ByVtol))
{