4 #include <glib/gstdio.h>
11 * Check track filter against GPS values
12 * return TRUE if point is ok, FALSE if it should be skipped
15 filter_check(GpsTrackFilter *f, GpsData *gps, osm_location *location)
17 if (f->enabled==FALSE)
20 if (f->drop_cnt>f->maxdrop) {
25 if ((gps->hdop<f->hdop || f->hdop==0.0) && (gps->vdop<f->vdop || f->vdop==0.0)) {
30 if (fabs(gps->heading-gps->lheading)>f->angle || f->angle==0.0 ) {
35 if (!location->street) {
40 if (location->street && location->street->dist>f->osm) {
47 g_printf("*** Filtering by: [%s %s %s %s] A: %f (%d)\n",
48 gps->hdop>f->hdop ? "HDOP" : "-",
49 gps->vdop>f->vdop ? "VDOP" : "-",
50 (fabs(gps->heading-gps->lheading)<f->angle) ? "Angle" : "-",
51 (location->street && (location->street->dist>f->osm)) ? "OSM" : "-",
52 fabs(gps->heading-gps->lheading), f->drop_cnt);