From 321cb8e563c016698416725811b9e0de1e55b54f Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 25 Jan 2018 23:22:33 +0100 Subject: [PATCH] Ref T236, transfer elevation to newer situations for future reference. The elevation will be transferred within a given radius --- src/blackmisc/simulation/interpolator.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/blackmisc/simulation/interpolator.cpp b/src/blackmisc/simulation/interpolator.cpp index 2e711f8fa..2e01ad9f4 100644 --- a/src/blackmisc/simulation/interpolator.cpp +++ b/src/blackmisc/simulation/interpolator.cpp @@ -148,6 +148,18 @@ namespace BlackMisc m_logger->logInterpolation(log); } + // we transfer ground elevation for future usage + if (currentSituation.hasGroundElevation()) + { + CElevationPlane ep(currentSituation); + ep.setSinglePointRadius(); + + // transfer to newer situations + const int transfered = m_aircraftSituations.setGroundElevationChecked(ep, currentSituation.getMSecsSinceEpoch()); + Q_UNUSED(transfered); // for debugging + } + + // bye return currentSituation; }