From 38aace457656c8533c548481804bc36370fbf97e Mon Sep 17 00:00:00 2001 From: TwinFan Date: Sat, 14 Sep 2024 23:38:04 +0200 Subject: [PATCH] Fix/RealTraffic: Altitude processing in high pressure situations --- Src/LTRealTraffic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/LTRealTraffic.cpp b/Src/LTRealTraffic.cpp index fae0bf6..287fced 100644 --- a/Src/LTRealTraffic.cpp +++ b/Src/LTRealTraffic.cpp @@ -800,8 +800,8 @@ bool RealTrafficConnection::ProcessTrafficBuffer (const JSON_Object* pBuf) pos.f.onGrnd = GND_ON; else { pos.f.onGrnd = GND_OFF; - double d = jag_n(pJAc, RT_DRCT_BaroAlt); // prefer baro altitude - if (d > 0.0) { + double d = jag_n_nan(pJAc, RT_DRCT_BaroAlt); // prefer baro altitude + if (!std::isnan(d)) { if (!std::isnan(rtWx.QNH)) d = BaroAltToGeoAlt_ft(d, rtWx.QNH); pos.SetAltFt(d);