]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/approach.cxx
- fixed ANSI C++ namespace problems
[flightgear.git] / src / ATC / approach.cxx
index 5d9670687398c047b15a87c57f5aebe88a2e30be..4423894f76d7949a2164dfdfdd51aee885971582 100644 (file)
@@ -185,7 +185,10 @@ void FGApproach::Update() {
 void FGApproach::get_active_runway() {
 
   sgVec3 position = { lat, lon, elev };
+
+#ifndef FG_NEW_ENVIRONMENT
   FGPhysicalProperty stationweather = WeatherDatabase->get(position);
+#endif
 
   SGPath path( globals->get_fg_root() );
   path.append( "Airports" );
@@ -193,8 +196,13 @@ void FGApproach::get_active_runway() {
   FGRunways runways( path.c_str() );
   
   //Set the heading to into the wind
+#ifndef FG_NEW_ENVIRONMENT
   double wind_x = stationweather.Wind[0];
   double wind_y = stationweather.Wind[1];
+#else
+  double wind_x = 0;
+  double wind_y = 0;           // FIXME
+#endif
   
   double speed = sqrt( wind_x*wind_x + wind_y*wind_y ) * SG_METER_TO_NM / (60.0*60.0);
   double hdg;
@@ -363,4 +371,4 @@ int FGApproach::RemovePlane() {
   }
   num_planes = np;
   return num_planes;
-}
\ No newline at end of file
+}