Ref T231, utility functions

* corrected altitude also considering CG
* 0 if CG is NULL
This commit is contained in:
Klaus Basan
2018-01-21 19:38:57 +01:00
parent ddaba89e2d
commit ca13c21943
4 changed files with 16 additions and 5 deletions

View File

@@ -45,6 +45,12 @@ namespace BlackMisc
return m_elevationPlane.isWithinRange(coordinate);
}
const CLength &CInterpolationHints::getCGAboveGroundOrZero() const
{
static const CLength zero;
return this->hasCGAboveGround() ? this->getCGAboveGround() : zero;
}
void CInterpolationHints::setAircraftParts(const CAircraftParts &parts, bool hasParts)
{
m_hasParts = hasParts;