mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T683, own aircraft provider CG update
This commit is contained in:
committed by
Mat Sutcliffe
parent
dc790cee8d
commit
e1b0375d68
@@ -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; }
|
||||
|
||||
@@ -110,6 +110,10 @@ namespace BlackCore
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual bool updateOwnParts(const BlackMisc::Aviation::CAircraftParts &parts) override;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::IOwnAircraftProvider::updateOwnParts
|
||||
//! \ingroup ownaircraftprovider
|
||||
virtual bool updateOwnCG(const BlackMisc::PhysicalQuantities::CLength &cg) override;
|
||||
|
||||
//! \copydoc BlackMisc::IProvider::asQObject
|
||||
virtual QObject *asQObject() override { return this; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user