refs #533, fixed matcher as temporary solution until we have DB data

* the whole concept here will change, see comments CAircraftMatcher::getClosestMatch
* currently returns exact match or default model
* added ASSERT in monitor to detect missing callsign for model at an early stage
This commit is contained in:
Klaus Basan
2015-12-08 06:53:43 +01:00
parent bc65cde182
commit 27bbb3d58c
3 changed files with 60 additions and 37 deletions

View File

@@ -18,6 +18,7 @@
#include "blackmisc/blackmiscfreefunctions.h"
#include "blackmisc/propertyindexallclasses.h"
#include "blackmisc/threadutils.h"
#include "blackmisc/verify.h"
using namespace BlackMisc;
using namespace BlackMisc::Audio;
@@ -606,7 +607,8 @@ namespace BlackCore
if (!inRange)
{
// here we assume user has logged out, incomplete data because of traffic sim, etc.
CLogMessage(this).debug() << "Aircraft not in range anymore " << callsign.toQString();
// aircraft is no longer in range, or ws never added to range (no position updates)
CLogMessage(this).debug() << "Aircraft not in range anymore or never added to range " << callsign.toQString();
return;
}
@@ -618,6 +620,7 @@ namespace BlackCore
return; // maybe we like to continue here, hard so say
}
Q_ASSERT_X(!m_serverSupportsNameQuery || remoteAircraft.hasValidRealName(), Q_FUNC_INFO, "invalid model data");
Q_ASSERT_X(remoteAircraft.getCallsign() == remoteAircraft.getModel().getCallsign(), Q_FUNC_INFO, "wrong model callsign");
emit this->readyForModelMatching(remoteAircraft);
}