Utility functions to improve resolution in auto stash component

This commit is contained in:
Klaus Basan
2018-08-26 15:19:51 +02:00
parent 2392a27a59
commit d010f6f15a
5 changed files with 28 additions and 5 deletions

View File

@@ -629,7 +629,7 @@ namespace BlackMisc
const int icaoScore = this->getAircraftIcaoCode().calculateScore(compareModel.getAircraftIcaoCode(), log);
const int liveryScore = this->getLivery().calculateScore(compareModel.getLivery(), preferColorLiveries, log);
CMatchingUtils::addLogDetailsToList(log, this->getCallsign(), QString("ICAO score: %1 | livery score: %2").arg(icaoScore).arg(liveryScore));
return (icaoScore + liveryScore) / 2;
return qRound(0.5 * (icaoScore + liveryScore));
}
CStatusMessageList CAircraftModel::validate(bool withNestedObjects) const

View File

@@ -66,7 +66,7 @@ namespace BlackMisc
TypeModelMatchingDefaultModel, //!< a default model assigned by model matching
TypeDatabaseEntry, //!< used along with mapping definition
TypeManuallySet, //!< manually set, e.g. from GUI
TypeOwnSimulatorModel, //!< represents own simulator model
TypeOwnSimulatorModel, //!< represents own simulator model (AI model, model on disk)
TypeVPilotRuleBased, //!< based on a vPilot rule
TypeTerrainProbe //!< peudo aircraft used for terrain probing (FSX)
};