mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
Ref T681, use simulator or DB CG as in settings
This commit is contained in:
committed by
Mat Sutcliffe
parent
6d490e9a49
commit
017e9402fd
@@ -1193,7 +1193,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CG from provider
|
// CG from provider
|
||||||
const CLength cg = this->getSimulatorCG(callsign); // always x-check against simulator to override guessed values and reflect changed CGs
|
const CLength cg = this->getSimulatorOrDbCG(callsign, this->getCGFromDB(callsign)); // always x-check against simulator to override guessed values and reflect changed CGs
|
||||||
if (!cg.isNull()) { correctedSituation.setCG(cg); }
|
if (!cg.isNull()) { correctedSituation.setCG(cg); }
|
||||||
|
|
||||||
// store corrected situation
|
// store corrected situation
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ namespace BlackMisc
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
CLength CInterpolator<Derived>::getAndFetchModelCG()
|
CLength CInterpolator<Derived>::getAndFetchModelCG()
|
||||||
{
|
{
|
||||||
const CLength cg = this->getSimulatorCG(m_callsign); // simulation environment
|
const CLength cgDB = this->getRemoteAircraftProvider() ? this->getRemoteAircraftProvider()->getCGFromDB(m_callsign) : CLength::null();
|
||||||
|
const CLength cg = this->getSimulatorOrDbCG(m_callsign, cgDB); // simulation environment
|
||||||
m_model.setCG(cg);
|
m_model.setCG(cg);
|
||||||
m_model.setCallsign(m_callsign);
|
m_model.setCallsign(m_callsign);
|
||||||
return cg;
|
return cg;
|
||||||
|
|||||||
Reference in New Issue
Block a user