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:
parent
3f00b27926
commit
f8015bf54f
1 changed files with 4 additions and 0 deletions
|
@ -620,6 +620,10 @@ double FGAIShip::getCourse(double lat, double lon, double lat2, double lon2) con
|
||||||
|
|
||||||
void FGAIShip::ProcessFlightPlan(double dt) {
|
void FGAIShip::ProcessFlightPlan(double dt) {
|
||||||
|
|
||||||
|
if ( dt < 0.00001 ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double time_sec = getDaySeconds();
|
double time_sec = getDaySeconds();
|
||||||
|
|
||||||
_dt_count += dt;
|
_dt_count += dt;
|
||||||
|
|
Loading…
Reference in a new issue