diff --git a/src/blackmisc/simulation/interpolator.cpp b/src/blackmisc/simulation/interpolator.cpp index d902f2d66..9cca849aa 100644 --- a/src/blackmisc/simulation/interpolator.cpp +++ b/src/blackmisc/simulation/interpolator.cpp @@ -20,6 +20,7 @@ #include "blackmisc/pq/units.h" #include "blackmisc/pq/length.h" #include "blackmisc/logmessage.h" +#include "blackmisc/verify.h" #include #include @@ -228,6 +229,10 @@ namespace BlackMisc Q_ASSERT(secondsSinceTakeoff >= 0.0); Q_ASSERT(secondsUntilLanding >= 0.0); + //! \fixme In future, will we need to be able to support time offsets of zero? + BLACK_VERIFY(predictableFutureSecs != 0); + if (predictableFutureSecs == 0) { break; } // avoid divide by zero + const double takeoffFactor = secondsSinceTakeoff / significantPastSecs; const double landingFactor = secondsUntilLanding / predictableFutureSecs; const double airborneFactor = std::min(std::min(takeoffFactor, landingFactor), 1.0);