Avoid division by zero.
Modified Files: src/Instrumentation/dme.cxx
This commit is contained in:
parent
e98d7a1ea4
commit
ccb9e64caf
1 changed files with 2 additions and 1 deletions
|
@ -146,6 +146,7 @@ DME::update (double delta_time_sec)
|
||||||
}
|
}
|
||||||
_distance_node->setDoubleValue( tmp_dist );
|
_distance_node->setDoubleValue( tmp_dist );
|
||||||
_speed_node->setDoubleValue(speed_kt);
|
_speed_node->setDoubleValue(speed_kt);
|
||||||
|
if (SGLimitsd::min() < fabs(speed_kt))
|
||||||
_time_node->setDoubleValue(distance_nm/speed_kt*60.0);
|
_time_node->setDoubleValue(distance_nm/speed_kt*60.0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue