]> err.no Git - mapper/commitdiff
Fix filter reporting.
authorKaj-Michael Lang <milang@onion.tal.org>
Fri, 3 Aug 2007 08:46:48 +0000 (11:46 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Fri, 3 Aug 2007 08:46:48 +0000 (11:46 +0300)
src/gps-nmea-parse.c

index 56a8a2c3688c37e59d615574bd0b1ac9193578b3..915ea79d2d2bf0457a09de83f3047a29289c290a 100644 (file)
@@ -159,7 +159,7 @@ void channel_parse_rmc(gchar * sentence)
        /* XXX: Set filter logic somewhere else */
 
        if ((_conn_state == RCVR_FIXED) && (_track_store==TRUE)) {
-               if ( (_gps_filter==TRUE) && (track_drop_cnt<10) ) {
+               if ((_gps_filter==TRUE) && (track_drop_cnt<10)) {
                        integerize_data(_vel_offsetx, _vel_offsety, _pos, _gps);
                        if ( (_gps.hdop<_filter_hdop || _filter_hdop==0.0) && 
                                (_gps.vdop<_filter_vdop || _filter_vdop==0.0) && 
@@ -171,13 +171,14 @@ void channel_parse_rmc(gchar * sentence)
                        } else {
                                track_drop_cnt++;
                                g_printf("*** Filtering by: [%s %s %s %s] (%d)\n", 
-                                       _gps.hdop<_filter_hdop ? "HDOP" : "-", 
-                                       _gps.vdop<_filter_vdop ? "VDOP" : "-", 
+                                       _gps.hdop>_filter_hdop ? "HDOP" : "-", 
+                                       _gps.vdop>_filter_vdop ? "VDOP" : "-", 
                                        (fabs(_gps.heading-_gps.lheading)<_filter_angle) ? "Angle" : "-",
-                                       (_map_location_known==TRUE && (_map_location_dist<_filter_osm)) ? "OSM" : "-", track_drop_cnt);
+                                       (_map_location_known==TRUE && (_map_location_dist>_filter_osm)) ? "OSM" : "-", track_drop_cnt);
                        }
                        refresh_mark();
                } else {
+                       track_drop_cnt=0;
                        integerize_data(_vel_offsetx, _vel_offsety, _pos, _gps);
                        track_add(_pos.time, newly_fixed);
                        refresh_mark();