X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FEnvironment%2Ffgmetar.cxx;h=26d33bc7aaeb6edab8363850d97622e7c5d66b20;hb=4a3b8c57654f633d8e6923f7217ea4b4d36938a1;hp=b2b331fbf223469aec3b00e99fec829bb0906266;hpb=89010e6b0ac344970dfe3e802e4e51703fedc8ff;p=flightgear.git diff --git a/src/Environment/fgmetar.cxx b/src/Environment/fgmetar.cxx index b2b331fbf..26d33bc7a 100644 --- a/src/Environment/fgmetar.cxx +++ b/src/Environment/fgmetar.cxx @@ -43,8 +43,8 @@ #include "fgmetar.hxx" -FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, const string& auth) : - SGMetar(icao, proxy, port, auth, _rq_time = globals->get_time_params()->get_cur_time()), +FGMetar::FGMetar(const string& icao) : + SGMetar(icao), _snow_cover(false) { int i; @@ -59,9 +59,9 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co _min_visibility.set(12000.0); vector cv = _clouds;; - if (!cv.size()) { + if (cv.empty()) { SGMetarCloud cl; - cl.set(5500 * SG_FEET_TO_METER, 2); + cl.set(5500 * SG_FEET_TO_METER, SGMetarCloud::COVERAGE_SCATTERED); _clouds.push_back(cl); } } @@ -109,9 +109,9 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co vector::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) @@ -148,11 +148,11 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co _time = sgTimeGetGMT(_year - 1900, _month - 1, _day, _hour, _minute, 0); - SG_LOG(SG_GENERAL, SG_INFO, _data); + SG_LOG(SG_ENVIRONMENT, SG_INFO, _data); if (_x_proxy) - SG_LOG(SG_GENERAL, SG_INFO, "METAR from proxy"); + SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from proxy"); else - SG_LOG(SG_GENERAL, SG_INFO, "METAR from weather.noaa.gov"); + SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from weather.noaa.gov"); }