Ref T683, own aircraft provider CG update

This commit is contained in:
Klaus Basan
2019-06-13 00:15:37 +02:00
committed by Mat Sutcliffe
parent dc790cee8d
commit e1b0375d68
6 changed files with 34 additions and 0 deletions

View File

@@ -290,6 +290,15 @@ namespace BlackCore
return true;
}
bool CContextOwnAircraft::updateOwnCG(const CLength &cg)
{
QWriteLocker l(&m_lockAircraft);
const bool changed = (m_ownAircraft.getModel().getCG() != cg);
if (!changed) { return false; }
m_ownAircraft.setCG(cg);
return true;
}
bool CContextOwnAircraft::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude, const CAltitude &pressureAltitude)
{
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << position << altitude; }