1
0
Fork 0

Fix a devide by zero bug"src/Autopilot/newauto.cxx

This commit is contained in:
ehofman 2003-07-22 08:13:10 +00:00
parent 45b16ad0c9
commit e47c97844d

View file

@ -871,7 +871,7 @@ FGAutopilot::update (double dt)
double lookahead; double lookahead;
// estimate speed in 10 seconds // estimate speed in 10 seconds
lookahead = airspeed_node->getFloatValue() + ( airspeed_node->getFloatValue() - previous_speed) * (10/dt); lookahead = airspeed_node->getFloatValue() + ( airspeed_node->getFloatValue() - previous_speed) * (10/(dt + 0.000001));
previous_speed = airspeed_node->getFloatValue(); previous_speed = airspeed_node->getFloatValue();
// compare targetspeed to anticipated airspeed // compare targetspeed to anticipated airspeed