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;
}
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