GPSBabel Batch File Filter: Remove Unreliable Points (HDOP VDOP NSAT)

GPSBabel does a great job converting the waypoints, tracks, and routes of popular GPS receivers and mapping programs. Unfortunately, the Windows interface (graphical front-end) of the command-line-driven application doesn't allow for the user to adjust some of the more advanced filtering capabilities.

The (Windows XP/Vista/7) solution to easily discarding these errant data points is to create a little program. It takes just a minute or two.

The following code was sourced and altered from these tutorials: GPSBabel Drag and Drop for Windows, Remove unreliable points with high hdop or vdop (discard)

  1. Simply open notepad and save the following text as !cleanGPX.bat
    @ECHO OFF
    ECHO.
    ECHO +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
    ECHO  Removes unreliable GPS tracking data from GPX log file(s)
    ECHO  Note: This will OVERWRITE the file(s)
    ECHO +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
    ECHO.
    ECHO Press Ctrl-Break to stop now or
    PAUSE
    ECHO.
    ECHO Working...
    FOR %%X IN (%*) DO (
    "c:\Program Files\GPSBabel\gpsbabel.exe" -i gpx -f %%X -x discard,hdop=2,vdop=2.2,sat=3 -o gpx -F %%X
    ECHO %%X
    ECHO.
    )
    ECHO ALL DONE!
    PAUSE
    
  2. Place the file anywhere you'd like (such as on the Desktop or in a folder with your GPX files). The exclamation mark in the name will keep the file at the top of the directory if sorted normally.
  3. Select one or more GPX files and drag them into the !cleanGPX.bat icon. The number of files doesn't matter, and running the batch file without any files won't hurt anything.

The above code will remove GPS data points with the following attributes:

  1. Horizontal Dilution of Precision (HDOP) above 2
  2. Vertical Dilution of Precision (VDOP) above 2.2
  3. Fewer than 3 satellites locked

Note: Feel free to adjust the thresholds to your own taste. Some sources says a HDOP over 4 or 6 is more optimal, while others say 2 or even 10 is best. You may need to enable your log to track some of this information. Review your data and adjust your limits accordingly.

Related Catagories: Photography, Travel Gear

GPSBabel Batch File Filter: Remove Unreliable Points (HDOP VDOP NSAT) Photos:

GPSBabel Batch File Filter: Remove Unreliable Points (HDOP VDOP NSAT) Videos:

Submitted Links and Comments about GPSBabel Batch File Filter: Remove Unreliable Points (HDOP VDOP NSAT):

No additional links or comments have been posted so far; be the first to do so!

Submit a New Link or Comment:

Note: Comments are open to everyone. To reduce spam and reward regular contributors, only submissions from first-time commenters and/or those containing hyperlinks are moderated, and will appear after approval. Relevant content contribution to this article is encouraged; however, off-topic and "me too" remarks are subject to pruning. Your e-mail address will never be publicly disclosed or abused.