“GPS data jumps around a lot” and Google Street View

Updates:

  • 2025-09-03 – Added details on how I got the python tool running on macOS.

Recently I posted a list of Google Street View upload errors I have received. I found a way to deal with one of them.

GPS data jumps around a lot

After some “research” (which you can assume means “googling” and “asking A.I.”) I learned that there can be gaps in GPS data that make the movement appear to spike. I found a Mac Store program called GPX Editor which I purchased for the wonderful price of $4.99 so I could look at the data closer:

GPX Editor showing spikes in the GPS data.

This program allowed me to look at my data in a much finer (i.e. zoomed in) way than Google Maps does. I could see spikes in the data that looked as if I suddenly popped to another location, as if I went from walking to zooming at 17 mph. This may have been caused by a GPS glitch as I walked under a bridge or some other obstacle that affected the GPS reading.

While you are looking at that screen shot, notice on the right side you can see how much time there is between GPS entries. Google Street View wants 5 seconds or less, I believe, so when gaps appear at 8 seconds, that will also cause an error and the GPX file will be rejected.

What to do, what to do…

Google wants real GPS data, but it seems fixing an obvious glitch like this should be acceptable. Basically, just moving a point back to where it was. I am sure there are tools like GPX Editor that would allow moving one point and fixing it.

But I am lazy, and wondered if there was an easier way.

I ended up looking for a tool to interpolate the GPS data. Here is the one I found:

https://github.com/remisalmon/gpx-interpolate

It will read a GPX file and then smooth out the points. Here is the example screen shot from that Github repository:

The black dots are actually GPS entries, and the red is where it can create new entries. For slow data, such as walking, this should work really well. And, I notice it has the ability to limit how often the data ends up in the file:

usage: gpx_interpolate.py [-h] [-r RES] [-n NUM] [-s] FILE [FILE ...]

interpolate GPX files using piecewise cubic Hermite splines

positional arguments:
FILE GPX file

optional arguments:
-h, --help show this help message and exit
-r RES, --res RES interpolation resolution in meters (default: 1)
-n NUM, --num NUM force point count in output (default: disabled)
-s, --speed save interpolated speed

Running gpx_interpolate on macOS

Side note: To get this running, I had to install a few other things. In order to install them, I had to use some a “virtual environment” for Python so the stuff I installed was isolated from the Python that came with macOS (or so I think). Here were the commands I ran:

cd Movies ***OR WHEREVER YOU WANT TO INSTALL THIS***
python3 -m venv venv
source venv/bin/activate
pip install gpxpy
pip3 install numpy
pip3 install scipy

After that, I could “python3 gpx_interpolate.py -r 1 my_gpx_file.gpx” and get the interpolated file.

The instructions I used (from Google’s A.I.) said I would need to “source venv/bin/activate” each time I started a Terminal and wanted to use this. I will update this as I learn more and understand what this is all about.

The results…

Perhaps I could use the “-r” option so it drops a marker every 1 meter or so. As long as I was walking at a regular pace, that should make new data that is much smoother without the jumps and gaps.

GPX Editor showing less spikes in the GPS data after applying interpolation.

This file now seems to have much more consistent entries, and still follows the walking path closely.

I was able to upload the video file and this new interpolated GPX file and it is now live on Google.

But I am sure we can do better. To be continued…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.