]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/navradio.cxx
Fix the rendering of the KLN89 on the 2D panel that was broken during the move to...
[flightgear.git] / src / Instrumentation / navradio.cxx
index 021447007fb4d12866a5c96767f3c63e8fb9156e..ceeefc8c599ab18ec53014d6edc70a9f2a8f3495 100644 (file)
@@ -460,7 +460,10 @@ FGNavRadio::update(double dt)
                    signal_quality_norm, dt );
         }
         signal_quality_norm_node->setDoubleValue( signal_quality_norm );
-        inrange = signal_quality_norm > 0.2;
+        if ( ! nav_slaved_to_gps_node->getBoolValue() ) {
+           /* not slaved to gps */
+            inrange = signal_quality_norm > 0.2;
+        }
         inrange_node->setBoolValue( inrange );
 
        if ( !is_loc ) {
@@ -590,16 +593,18 @@ FGNavRadio::update(double dt)
         // compute the time to intercept selected radial (based on
         // current and last cross track errors and dt
         //////////////////////////////////////////////////////////
-        double t = 0.0;
-        if ( inrange && cdi_serviceable ) {
-            double xrate_ms = (last_xtrack_error - xtrack_error) / dt;
-            if ( fabs(xrate_ms) > 0.00001 ) {
-                t = xtrack_error / xrate_ms;
-            } else {
-                t = 9999.9;
+        if (dt > 0) { // Are we paused?
+            double t = 0.0;
+            if ( inrange && cdi_serviceable ) {
+                double xrate_ms = (last_xtrack_error - xtrack_error) / dt;
+                if ( fabs(xrate_ms) > 0.00001 ) {
+                    t = xtrack_error / xrate_ms;
+                } else {
+                    t = 9999.9;
+                }
             }
+            time_to_intercept->setDoubleValue( t );
         }
-        time_to_intercept->setDoubleValue( t );
 
         //////////////////////////////////////////////////////////
         // compute the amount of glide slope needle deflection