From: fredb Date: Tue, 30 Dec 2008 23:13:44 +0000 (+0000) Subject: Csaba/Alexis : fix a NAN problem when wind is unspecified in a metar X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=12dc71a3c0bca193b2cfe95469ecbc81ac7734c4;p=flightgear.git Csaba/Alexis : fix a NAN problem when wind is unspecified in a metar --- diff --git a/src/Environment/fgmetar.cxx b/src/Environment/fgmetar.cxx index a543832e7..b2b331fbf 100644 --- a/src/Environment/fgmetar.cxx +++ b/src/Environment/fgmetar.cxx @@ -99,6 +99,8 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co _wind_range_from = _wind_range_to = _wind_dir; } + if (_wind_speed == SGMetarNaN) + _wind_speed = 0.0; if (_gust_speed == SGMetarNaN) _gust_speed = 0.0;