]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/fgmetar.cxx
cmake changes for osg::CullSettings::ClearMask and Fedora
[flightgear.git] / src / Environment / fgmetar.cxx
index a543832e7d6bcb436b87dea9031984f02525b16b..c9d046ca9883b566dab88bf66f9c72bdfbf8c91d 100644 (file)
@@ -61,7 +61,7 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co
                vector<SGMetarCloud> cv = _clouds;;
                if (!cv.size()) {
                        SGMetarCloud cl;
-                       cl.set(5500 * SG_FEET_TO_METER, 2);
+                       cl.set(5500 * SG_FEET_TO_METER, SGMetarCloud::COVERAGE_SCATTERED);
                        _clouds.push_back(cl);
                }
        }
@@ -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;
 
@@ -107,9 +109,9 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co
        vector<SGMetarCloud>::iterator cloud, cv_end = cv.end();
 
        for (i = 0, cloud = cv.begin(); cloud != cv_end; ++cloud, i++) {
-               int cov = cloud->getCoverage();
-               if (cov == -1)
-                       cov = 0;
+               SGMetarCloud::Coverage cov = cloud->getCoverage();
+               if (cov == SGMetarCloud::COVERAGE_NIL)
+                       cov = SGMetarCloud::COVERAGE_CLEAR;
 
                double alt = cloud->getAltitude_ft();
                if (alt == SGMetarNaN)