mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T275, unified elevation missed info -> getElevationsFoundMissedInfo()
This commit is contained in:
@@ -141,6 +141,16 @@ namespace BlackMisc
|
||||
return QPair<int, int>(m_elvFound, m_elvMissed);
|
||||
}
|
||||
|
||||
QString ISimulationEnvironmentProvider::getElevationsFoundMissedInfo() const
|
||||
{
|
||||
static const QString info("%1/%2 %3");
|
||||
const QPair<int, int> foundMissed = this->getElevationsFoundMissed();
|
||||
const int f = foundMissed.first;
|
||||
const int m = foundMissed.second;
|
||||
const double hitRatioPercent = 100.0 * static_cast<double>(f) / static_cast<double>(f + m);
|
||||
return info.arg(f).arg(m).arg(QString::number(hitRatioPercent, 'f', 1));
|
||||
}
|
||||
|
||||
CSimulatorPluginInfo ISimulationEnvironmentProvider::getSimulatorPluginInfo() const
|
||||
{
|
||||
QReadLocker l(&m_lockModel);
|
||||
@@ -258,6 +268,12 @@ namespace BlackMisc
|
||||
return this->provider()->getElevationsFoundMissed();
|
||||
}
|
||||
|
||||
QString CSimulationEnvironmentAware::getElevationsFoundMissedInfo() const
|
||||
{
|
||||
if (!this->hasProvider()) { return QString(); }
|
||||
return this->provider()->getElevationsFoundMissedInfo();
|
||||
}
|
||||
|
||||
CSimulatorPluginInfo CSimulationEnvironmentAware::getSimulatorPluginInfo() const
|
||||
{
|
||||
if (!this->hasProvider()) { return CSimulatorPluginInfo(); }
|
||||
|
||||
Reference in New Issue
Block a user