]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/dme.cxx
Set the format default to float instead of int.
[flightgear.git] / src / Cockpit / dme.cxx
index f8e40efd38af14c20a11285bf890e88001eb19e6..fb416fcaaa34e9d8d806e0f8b180389eb0359241 100644 (file)
@@ -161,6 +161,9 @@ FGDME::update(double dt)
             station = Point3D( x, y, z );
             dist = aircraft.distance3D( station ) * SG_METER_TO_NM;
             dist -= bias;
+            if ( dist < 0.0 ) {
+                dist = 0.0;
+            }
 
             current_time.stamp();
             long dMs = (current_time - last_time) / 1000;