Fix a devide by zero bug"src/Autopilot/newauto.cxx
This commit is contained in:
parent
45b16ad0c9
commit
e47c97844d
1 changed files with 1 additions and 1 deletions
|
@ -871,7 +871,7 @@ FGAutopilot::update (double dt)
|
|||
double lookahead;
|
||||
|
||||
// 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();
|
||||
|
||||
// compare targetspeed to anticipated airspeed
|
||||
|
|
Loading…
Reference in a new issue