]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/YASim.cxx
YASim airborne start-up
[flightgear.git] / src / FDM / YASim / YASim.cxx
index 6292656d2abc68726addfab8e65664bc60236122..a0f93c2f6381d7caab6afd0c06bb22c77319aaa0 100644 (file)
@@ -3,6 +3,8 @@
 #  include "config.h"
 #endif
 
+#include <cstdlib>
+
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/misc/sg_path.hxx>
@@ -217,8 +219,14 @@ void YASim::init()
                 minGearZ = pos[2];
         }
         _set_Altitude(runway_altitude - minGearZ*M2FT);
+        // ground start-up: gear down
         fgSetBool("/controls/gear/gear-down", true);
     }
+    else
+    {
+        // airborne start-up: gear up
+        fgSetBool("/controls/gear/gear-down", false);
+    }
 
     // Blank the state, and copy in ours
     State s;