Skip to main content

gpxfix: GUI to fix .gpx tracks with missing sections

Project description

PyPI version License: MIT Downloads Downloads Code style: black

gpxfix

A small python-based GUI that helps you reestablishing broken GPX-files. alt text

When can this be useful?

It's a common issue for every sportsman who loves recording activities. Your device runs out of battery before you come back home, you forgot to start the record when you left home or, even worse but a frequent problem in older iPhones, you lost GPS signal somewhere on the track for a couple of minutes. Then, checking out your track, you see straight lines or the first/last bit is completelty missing.

Installation

gpxfix ships via pypi:

pip install gpxfix

Afterwards, just type gpxfix to start the UI

Usage instruction

  1. If you run the file, the default windofw of the GUI shows up: alt text

  2. You see a couple of options here, the first step should be to upload your GPX file

  3. You get a confirmation message once the file has been parsed successfully

  4. Press Show Tracking Mistakes to let the algorithm find the missing sections in your file. Per default a tracking mistake is defined as not having recorded a GPX trackpoint for at least 5 sec with you having moved at least 400m. I find this okay for cycling but you can change these parameters at the beginning of the code.

    1. A window pops up saying "Great! No error has been found." This means, your file itself is consistent, but you may want to insert something at the beginning or at the end. To do so, please click on the respective link which directs you to Google Maps. Then you simply have to tell Google where you started/ended your trip.

    2. Otherwise, you get an overview of the found errors, i.e. the program displays you the coordinates of the last trackpoint before and the first trackpoint after the missing spot. Now, assuming you want to fill in this gap in your GPX file, please select the number of the error from the dropdown and click GO! to instruct GoogleMaps to find the shortest path between the 2 trackpoints. Default vehicle is bicycle. Now you can set easily adjust this snippet such that it fits the route you actually took. alt text **NOTE: In this window you determine where your snippet will be inserted. ** If you want to insert a snippet at the start click "I miss the start of my ride". If you dont select anything here, the program will not know where to insert your snippet and fail later.

  5. Now, we want to merge the snippet we just created with the broken track we recorded. For this, we use a nice tool called mapstogpx. Past the link from the Google Maps snippet you just created and download the file (make sure you to tick Advanced Settings -> Include Elevation before downloading). Please also make sure to remember the distance of the snippet (according to Googe Maps).

  6. Tell the program where you saved the snippet via Upload GPX fragment.

  7. You have to fill in the distance of the fragment that you want to merge (for some reason, gpxpy.geo.haversine_distance behaves a bit erratically and consequently speed estimation is imprecise). Then press OK and then Repair!

  8. Hopefully, everything went through and the repaired file was saved in the directory "Corrected Files" alt text

  9. If you have multiple issues with your GPX file, just repeat the procedure.

Feel free to fork and please report any issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpxfix-0.0.5.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distribution

gpxfix-0.0.5-py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page