X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fgps.cxx;h=2d448f575a94e833c409ce80247ef0c409c470bd;hb=73fbc05a6b6af52825c792902d7738f9cad7ec2f;hp=424ed3e90bdfb5bbb0ab3f4e893ba6b014b3be77;hpb=0c5e9f46e79bb7ed991aa1fda5c382308353824e;p=flightgear.git diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 424ed3e90..2d448f575 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -11,9 +11,9 @@ #include #include -#include "Main/fg_props.hxx" -#include "Main/util.hxx" // for fgLowPass -#include "Navaids/positioned.hxx" +#include
+#include
// for fgLowPass +#include #include #include @@ -479,9 +479,8 @@ GPS::updateTTWNode(UpdateContext& ctx, double distance_m, SGPropertyNode_ptr nod if (ctx.speed_kt > 0.0 && distance_m > 0.0) { TTW = (distance_m * SG_METER_TO_NM) / (ctx.speed_kt / 3600); } - - unsigned int TTW_seconds = (int) (TTW + 0.5); - if (TTW_seconds < 356400) { // That's 99 hours + if (TTW < 356400.5) { // That's 99 hours + unsigned int TTW_seconds = (int) (TTW + 0.5); unsigned int TTW_minutes = 0; unsigned int TTW_hours = 0; char TTW_str[9];