Skip to content

Commit 38aace4

Browse files
committed
Fix/RealTraffic: Altitude processing in high pressure situations
1 parent 16a059e commit 38aace4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Src/LTRealTraffic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,8 @@ bool RealTrafficConnection::ProcessTrafficBuffer (const JSON_Object* pBuf)
800800
pos.f.onGrnd = GND_ON;
801801
else {
802802
pos.f.onGrnd = GND_OFF;
803-
double d = jag_n(pJAc, RT_DRCT_BaroAlt); // prefer baro altitude
804-
if (d > 0.0) {
803+
double d = jag_n_nan(pJAc, RT_DRCT_BaroAlt); // prefer baro altitude
804+
if (!std::isnan(d)) {
805805
if (!std::isnan(rtWx.QNH))
806806
d = BaroAltToGeoAlt_ft(d, rtWx.QNH);
807807
pos.SetAltFt(d);

0 commit comments

Comments
 (0)