]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/metarproperties.cxx
Clean-up: move autosave.xml loading code to proper method
[flightgear.git] / src / Environment / metarproperties.cxx
index 6d8c1c51a70625c8410910d7632dfd6f5e1e703c..4c93aaa97e2db4fdc5ea1bea0a3cdb315ebcb154 100644 (file)
@@ -83,7 +83,7 @@ inline void MagneticVariation::recalc( double lon, double lat, double alt )
   // calculation of magnetic variation is expensive. Cache the position
   // and perform this calculation only if it has changed
   if( _lon != lon || _lat != lat || _alt != alt ) {
-    SG_LOG(SG_ALL, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
+    SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
     _lon = lon;
     _lat = lat;
     _alt = alt;
@@ -194,7 +194,7 @@ void MetarProperties::set_metar( const char * metar )
         m = new FGMetar( _metar );
     }
     catch( sg_io_exception ) {
-        SG_LOG( SG_GENERAL, SG_WARN, "Can't parse metar: " << _metar );
+        SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << _metar );
         _metarValidNode->setBoolValue(false);
         return;
     }
@@ -301,9 +301,6 @@ void MetarProperties::set_metar( const char * metar )
         }
     }
 
-    vector<SGMetarCloud> cv = m->getClouds();
-    vector<SGMetarCloud>::const_iterator cloud, cloud_end = cv.end();
-
     {
         static const char * LAYER = "layer";
         SGPropertyNode_ptr cloudsNode = _rootNode->getNode("clouds", true );
@@ -374,6 +371,7 @@ void MetarProperties::set_metar( const char * metar )
                 -9999.0 : 
                 metarClouds[i].getAltitude_ft() + _station_elevation;
 
+            layerNode->setDoubleValue( "alpha", 1.0 );
             layerNode->setStringValue( "coverage", coverage_string[coverage] );
             layerNode->setDoubleValue( "coverage-type", SGCloudLayer::getCoverageType(coverage_string[coverage]) );
             layerNode->setDoubleValue( "elevation-ft", elevation );