Skip to content

Commit

Permalink
Merge pull request #273 from TwinFan/Next
Browse files Browse the repository at this point in the history
Fix/RealTraffic: Altitude processing in high pressure situations
  • Loading branch information
TwinFan committed Sep 14, 2024
2 parents 3821530 + 38aace4 commit 408bf47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/LTRealTraffic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 408bf47

Please sign in to comment.