1
0
Fork 0

Add a small bit of nan/fpe protection. It's possible that this routine

could be called with a zero dt which would then lead to a divide by zero
error if we ran through all the computations.
This commit is contained in:
Curtis L. Olson 2010-12-20 12:20:57 -06:00
parent 3f00b27926
commit f8015bf54f

View file

@ -620,6 +620,10 @@ double FGAIShip::getCourse(double lat, double lon, double lat2, double lon2) con
void FGAIShip::ProcessFlightPlan(double dt) {
if ( dt < 0.00001 ) {
return;
}
double time_sec = getDaySeconds();
_dt_count += dt;