]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/performancedata.cxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / AIModel / performancedata.cxx
index f07ad6132d2724fd7a86e4a343c6a1d7976327b8..2a291967143962a41ea492819f2ed0d067426fe9 100644 (file)
@@ -120,7 +120,8 @@ double PerformanceData::actualPitch(FGAIAircraft* ac, double tgt_pitch, double d
 
 double PerformanceData::actualAltitude(FGAIAircraft* ac, double tgt_altitude, double dt) {
     if (ac->onGround()) {
-        //FIXME: return a value here
+        //FIXME: a return sensible value here
+        return 0.0; // 0 for now to avoid compiler errors
     } else
         return ac->getAltitude() + ac->getVerticalSpeed()*dt/60.0;
 }
@@ -129,7 +130,7 @@ double PerformanceData::actualVerticalSpeed(FGAIAircraft* ac, double tgt_vs, dou
     double vs = ac->getVerticalSpeed();
     double vs_diff = tgt_vs - vs;
 
-    if (fabs(vs_diff) > 10.0) {
+    if (fabs(vs_diff) > .001) {
         if (vs_diff > 0.0) {
             vs += _climbRate * dt / 3.0; //TODO avoid hardcoded 3 secs to attain climb rate from level flight