]> git.mxchange.org Git - flightgear.git/blobdiff - src/WeatherCM/FGLocalWeatherDatabase.cpp
Updated so load/save will work.
[flightgear.git] / src / WeatherCM / FGLocalWeatherDatabase.cpp
index e17d3ce67c469c473cf92b6cb5e5bea6d69bad1d..36e13f5b5ec7149db18efbd2f2be09ba7d7ddbd1 100644 (file)
@@ -73,6 +73,8 @@ void FGLocalWeatherDatabase::init( const WeatherPrecision visibility,
                                   const DatabaseWorkingType type,
                                   const string &root )
 {
+    FGPhysicalProperties f[2];  //make an standard weather that's the same at the whole world
+
     cerr << "Initializing FGLocalWeatherDatabase\n";
     cerr << "-----------------------------------\n";
 
@@ -145,7 +147,6 @@ void FGLocalWeatherDatabase::init( const WeatherPrecision visibility,
            double x[2] = {0.0,  0.0};  //make an standard weather that's the same at the whole world
            double y[2] = {0.0,  0.0};  //make an standard weather that's the same at the whole world
            double z[2] = {1.0, -1.0};  //make an standard weather that's the same at the whole world
-           FGPhysicalProperties f[2];  //make an standard weather that's the same at the whole world
            database = new SphereInterpolate<FGPhysicalProperties>(2,x,y,z,f);
        }
        break;
@@ -259,7 +260,7 @@ void fgUpdateWeatherDatabase(void)
     sgSetVec3(position, 
         current_aircraft.fdm_state->get_Latitude(),
         current_aircraft.fdm_state->get_Longitude(),
-        current_aircraft.fdm_state->get_Altitude() * FEET_TO_METER);
+        current_aircraft.fdm_state->get_Altitude() * SG_FEET_TO_METER);
     
     WeatherDatabase->update( position );