Note: This page describes an obsolete version of GPSBabel that may substantially differ from the current or development version.

Remove unreliable points with high hdop or vdop (discard)

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.21. 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.22. 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.

hdop option

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 hdopandvdop.

vdop option

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 hdopandvdop.

hdopandvdop option

Link hdop and vdop suppression 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 hdop and vdop options be specified.

sat option

Minimum sats to keep points.

This option specifies the minimum required number of satellites.

fixnone option

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.

fixunknown option

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.

elemin option

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.

elemax option

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.

matchname option

Suppress points where name matches given name.

This option discards points that have shortnames that match the provided regular expression.

Example 4.23. 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.


matchdesc option

Suppress points where description matches given name.

Like matchname, but instead matches on the description.

matchcmt option

Suppress points where comment matches given name.

Like matchname, but instead matches on the comment.

matchicon option

Suppress points where type matches given name.

Like matchname, but instead matches on the icon description.