1
0
Fork 0

Avoid division by zero.

Modified Files:
	src/Instrumentation/dme.cxx
This commit is contained in:
frohlich 2009-09-04 17:01:53 +00:00 committed by Tim Moore
parent e98d7a1ea4
commit ccb9e64caf

View file

@ -146,7 +146,8 @@ 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);
_time_node->setDoubleValue(distance_nm/speed_kt*60.0); if (SGLimitsd::min() < fabs(speed_kt))
_time_node->setDoubleValue(distance_nm/speed_kt*60.0);
} else { } else {
_last_distance_nm = 0; _last_distance_nm = 0;