This filter is used to "fix" unreliable GPS data by discarding points that are believed to be unreliable. You may specify an HDOP and/or VDOP above a specified limit, a minimum number of satellites that must have been in view for a fix to be considered, or both.
HDOP and VDOP are measures of the best possible horizontal or vertical precision for a given configuration of GPS satellites. Higher numbers indicate a higher dilution of precision and therefore mathematically less useful.
Example 4.19. Using the discard filter for HDOP and VDOP.
gpsbabel -i gpx -f in.gpx -x discard,hdop=10,vdop=20,hdopandvdop -o gpx -F out.gpx
You may specify a minimum number of satellites.
Example 4.20. Using the discard filter to require at least three satellites.
gpsbabel -i gpx -f in.gpx -x discard,sat=3 -o gpx -F out.gpx
Contributed by Tobias Minich and Serge Droz.
Suppress points with higher hdop.
This option specifies the maximum allowable Horizontal Dilution of
Precision (HDOP). By default, any point with an HDOP in excess of
this value will be discarded regardless of its VDOP, but see
Suppress points with higher vdop.
This option specifies the maximum allowable Vertical Dilution of
Precision (VDOP). By default, any point with an VDOP in excess of
this value will be discarded regardless of its HDOP, but see
Link hdop and vdop supression with AND.
If this option is used, only points that exceed both the maximum
allowable HDOP and the maximum allowable VDOP will be discarded. This
option requires that both the
vdop options be specified.
Minimium sats to keep points.
This option specifies the minimum required number of satellites.
Suppress points without fix.
This option is similar to the 'sat' option. There are times when some GPSes will know how many satellites are in view, but not yet computed a valid fix. This option allows you to discard those points.
Suppress points with unknown fix.
This option is similar to the 'sat' option. Some GPSes will log points with a fix value of 'unknown'. This option allows you to discard those points.
Suppress points below given elevation in meters.
This option drops waypoints with an altitude lower than the specified value (in meters). Although GPS altitude isn't very accurate, GPS devices may log faulty waypoints from time to time, such as when near tall buildings. Elevation values that are way off may signify such waypoints. Use this option to the filter to toss known rogue points.
Suppress points above given elevation in meters.
This option drops waypoints with an altitude higher than the specified value (in meters). See elemin for an explanation why this may be useful.
Suppress points where name matches given name.
This option discards points that have shortnames that match the provided regular expresision.
Example 4.21. Discarding specific point by regular expression
For example geocaches typically have names starting with GC followed by an alphanumeric sequence of variable length. To remove all six character long IDs that between (and including) GC1000 and GC2FFF, you could use
gpsbabel -i geo -f geocaching.loc -x discard,matchname=GC[1-2]...
to discard all GCs followed by exactly three characters.
Suppress points where description matches given name.
matchname, but instead matches on the description.
Suppress points where comment matches given name.
matchname, but instead matches on the comment.