Ref T231, Ref T236, Ref T238 improved logging of situation/parts logging

* "dot" commands to log parts/situations
* log can also be displayed in simulator (if simulator can display text messages)
* fixed missings locks for m_interpolationRenderingSetup
* more detailed output
* renamings
* using hints in log
This commit is contained in:
Klaus Basan
2018-01-28 05:08:25 +01:00
parent 5f6f822ccd
commit cd5fdfaf14
9 changed files with 333 additions and 121 deletions

View File

@@ -36,6 +36,15 @@ namespace BlackMisc
return validPlane ? this->m_elevationPlane.getAltitude() : CAltitude::null();
}
CAltitude CInterpolationHints::getGroundElevation(const CAircraftSituation &situation, const CLength &validRadius, bool useProvider, bool forceProvider) const
{
const bool validPlane = m_elevationPlane.isWithinRange(situation, CLength::maxValue(validRadius, m_elevationPlane.getRadius()));
Q_ASSERT_X(!(forceProvider && !useProvider), Q_FUNC_INFO, "Invalid parameter combination");
if (forceProvider && useProvider && m_elevationProvider) { return m_elevationProvider(situation); }
if (!validPlane && useProvider && m_elevationProvider) { return m_elevationProvider(situation); }
return validPlane ? this->m_elevationPlane.getAltitude() : CAltitude::null();
}
void CInterpolationHints::resetElevationPlane()
{
m_elevationPlane = CElevationPlane();