Ref T385, OBS aircraft callsign

* in CAirspaceMonitor::onIcaoCodesReceived we know we deal with aircraft only and explicitly deal with it
* in other cases we can not tell if we deal with aircraft/ATC callsign for sure, we ignore invalid callsigns
This commit is contained in:
Klaus Basan
2018-10-04 16:58:37 +02:00
parent df4ef3f52d
commit 1195eba417
4 changed files with 34 additions and 8 deletions

View File

@@ -87,6 +87,11 @@ namespace BlackMisc
return m_callsign.endsWith("SUP");
}
bool CCallsign::isCopilotCallsign() const
{
return (this->getTypeHint() == Aircraft) && this->isObserverCallsign();
}
QString CCallsign::getIcaoCode() const
{
if (this->isAtcCallsign())
@@ -96,7 +101,7 @@ namespace BlackMisc
return m_callsign.left(4).toUpper();
}
}
return "";
return QStringLiteral("");
}
bool CCallsign::isAtcAlikeCallsign() const
@@ -108,7 +113,6 @@ namespace BlackMisc
bool CCallsign::isObserverCallsign() const
{
if (this->getTypeHint() == Aircraft) { return false; }
return m_callsignAsSet.endsWith("_OBS", Qt::CaseInsensitive);
}

View File

@@ -84,6 +84,9 @@ namespace BlackMisc
//! Supervisor?
bool isSupervisorCallsign() const;
//! Pilot OBS callsign, normally a co-pilot
bool isCopilotCallsign() const;
//! Get callsign (normalized)
const QString &asString() const { return m_callsign; }