From b48070d273ff4e53a4d1c636d9680dc0506afe2f Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 3 Aug 2007 11:46:48 +0300 Subject: [PATCH] Fix filter reporting. --- src/gps-nmea-parse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gps-nmea-parse.c b/src/gps-nmea-parse.c index 56a8a2c..915ea79 100644 --- a/src/gps-nmea-parse.c +++ b/src/gps-nmea-parse.c @@ -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(); -- 2.39.5