GPSBabel: supprimer selon fix
March 24th, 2008 by Melaneum
GPSBabel permet de supprimer des waypoints selon le nombre de satellites en visibilité, les dillutions de précision horizontales et verticales (HDOP et VDOP), mais rien pour supprimer les points en <fix>none</fix>.
L’ajout de l’option est plutôt simple et le patch ci-dessous a été soumis pour une inclusion dans la prochaine version de GPSBabel, en attendant, vous pouvez l’appliquer vous même:
--- gpsbabel-1.3.5-beta20080217/discard.c 2008-02-06 03:29:21.000000000 +0100
+++ new/discard.c 2008-03-24 17:16:30.000000000 +0100
@@ -27,6 +27,8 @@
static char *vdopopt = NULL;
static char *andopt = NULL;
static char *satopt = NULL;
+static char *fixnoneopt = NULL;
+static char *fixunknownopt = NULL;
static double hdopf;
static double vdopf;
static int satpf;
@@ -43,6 +45,10 @@
NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"sat", &satopt, "Minimium sats to keep waypoints",
"-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX},
+ {"fixnone", &fixnoneopt, "Suppress waypoints without fix",
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ {"fixunknown", &fixunknownopt, "Suppress waypoints with unknown fix",
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
ARG_TERMINATOR
};
@@ -71,6 +77,12 @@
if ((satpf >= 0) && (waypointp->sat < satpf))
del = 1;
+ if ((fixnoneopt) && (waypointp->fix == fix_none))
+ del = 1;
+
+ if ((fixunknownopt) && (waypointp->fix == fix_unknown))
+ del = 1;
+
if (del) {
switch(what) {
case wptdata:
L’option est alors -x discard,fixnone ou -x discard,fixunknown. On peut bien sur combiner avec -x discard,fixnone,fixunknown.
This entry was posted on Monday, March 24th, 2008 at 21:32 CET and is filed under Geolocation. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.