]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIShip.cxx
Improve timing statistics
[flightgear.git] / src / AIModel / AIShip.cxx
index d0a3f3b65f780224d4daab8f365de086fee9a8f9..9b6a0470524e8fc2b017bc4fd3a412875a91abe0 100644 (file)
 
 FGAIShip::FGAIShip(object_type ot) :
 FGAIBase(ot),
+
+
+_waiting(false),
+_new_waypoint(true),
+_tunnel(false),
+_initial_tunnel(false),
+_restart(false),
+_hdg_constant(0.01),
 _limit(100),
 _elevation_m(0),
 _elevation_ft(0),
 _tow_angle(0),
+_missed_count(0),
+_wp_range(0),
 _dt_count(0),
 _next_run(0),
+_roll_constant(0.001),
+_roll_factor(-0.0083335),
+_old_range(0),
+_range_rate(0),
+_missed_time_sec(30),
+_day(86400),
 _lead_angle(0),
 _xtrack_error(0),
-_tunnel(false),
-_initial_tunnel(false),
 _curr_alt(0),
 _prev_alt(0),
 _until_time(""),
 _fp_init(false),
-_missed(false),
-_waiting(false),
-_new_waypoint(true),
-_missed_count(0),
-_wait_count(0),
-_missed_time_sec(30),
-_day(86400),
-_wp_range(0),
-_old_range(0),
-_range_rate(0),
-_roll_constant(0.001),
-_hdg_constant(0.01),
-_roll_factor(-0.0083335),
-_restart(false)
-
+_missed(false)
 {
         invisible = false;
 }
@@ -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;