]> git.mxchange.org Git - flightgear.git/blobdiff - utils/GPSsmooth/gps.cxx
Merge branch 'next' into durk-atc
[flightgear.git] / utils / GPSsmooth / gps.cxx
index f266623fbcac3f8f560adb51b0aac3d10430b6a3..1d6a79c2274762a5490e2cd6cd5ed41299bc0945 100644 (file)
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <simgear/compiler.h>
+
 #include <iostream>
 
 #include <simgear/constants.h>
@@ -6,8 +12,8 @@
 
 #include "gps.hxx"
 
-SG_USING_STD(cout);
-SG_USING_STD(endl);
+using std::cout;
+using std::endl;
 
 
 GPSTrack::GPSTrack() {};
@@ -80,7 +86,7 @@ int GPSTrack::load( const string &file ) {
         } else if ( tokens[0] == "$GPGGA" && tokens.size() == 15 ) {
             double raw_time = atof(tokens[1].c_str());
             GPSTime gps_time = GPSTime( raw_time );
-            if ( fabs(gps_time.get_time() - p.gps_time.get_time()) < 0.0001 &&
+            if ( fabs(gps_time.get_time() - p.gps_time.get_time()) > 0.0001 &&
                  (p.gps_time.get_time() > 1.0) ) {
                 // new data cycle store last data before continuing
                 data.push_back( p );