Here is an example of how we can improve—or even completely reconstruct—GPX recordings. Let’s take a closer look at the GPX dataset I recorded during a tour of Red Bull Hangar 7.
Dataset 1 shows a GPX recording that is highly inaccurate due to poor GPS reception caused by the building’s glass roof. Systems such as Insta360 or Osmo360 tend to generate extremely dense GPX data, which later results in oversampling on Mapillary. Example file 1 was generated by an Osmo360.
Dataset 2 shows a GPX file that has been reduced by a factor of 28. For Insta360 GPX files, a reduction factor of around 10 has proven effective. This reduction factor can be easily adjusted in the VBA macro I’ve provided.
In dataset 2, we can see that the path inside the building is very inaccurate due to the poor GPS reception. However, the first and last GPX nodes still contain correct timestamps, giving us a reliable starting point.
In dataset 3, you can see how I moved the final node to the known position inside the building where the recording actually ended. I removed all other inaccurate GPX nodes inside the building.
In dataset 4, you can see how I used the recorded 360‑degree video to manually draw a GPX track of my walk through Hangar 7. This manually drawn GPX track contains coordinates but no timestamps. I used DJI Studio to play back the video, although Insta Studio would work just as well. I created the hand‑drawn route using the free Java software JOSM and exported it as a GPX file.
In dataset 5, you can see how I combined GPX tracks 3 and 4 into a single track. The resulting GPX file contains timestamps up to the entrance of Hangar 7, but inside the building the nodes have no timestamps until the final GPX node, which contains the end time.
We now have time gaps, which makes dataset 5 unusable for Mapillary. Since I walked through Hangar 7 at a fairly constant speed, we can artificially calculate the missing timestamps using my VBA macro “Filler.” The macro interpolates the appropriate time for each node that lacks a timestamp. It processes GPX files stored in a directory, creates a new directory called Export, and saves the GPX files with the calculated timestamps there. This approach is sufficiently accurate for simple tunnel passages, provided the movement was at roughly constant speed.
Interim Report
We now have a method to standardize GPX tracks generated by different camera manufacturers and systems for use in Mapillary. I will continue expanding the list of supported manufacturers in my VBA macro, and in particular, I plan to add support for GPX tracks from GoPro.
We have also developed a method to improve GPX tracks in areas without GPS reception by manually drawing the missing sections and calculating the missing timestamps through time interpolation. This makes it possible to create a continuous GPX track even through tunnels.
However, when we look at my walk through Red Bull Hangar 7, we can see that I made several spontaneous changes of direction during the tour. In such cases, calculating missing timestamps solely through time interpolation reaches its limits. We need an additional method to ensure that 360‑degree images and GPX nodes remain properly synchronized at these turning points.
In the era before satellite navigation, ships setting sail synchronized their clocks with the Greenwich Observatory’s time ball. Precise timekeeping was essential for accurate navigation, and vessels maintained their course by steering from lighthouse to lighthouse. For the next steps in our workflow, we need to revisit this old technology and adapt its underlying principles to further optimize our process.
To establish a clear time reference, we add the tag gpx:cmt=Frame=0 to the first GPX node using the JOSM editor.
If we then export the route as a GPX file, we obtain the example shown in dataset 6a.
Please pay close attention to the first GPX point.
Just like at sea, we can now set sail and begin our first tacking maneuver.
I enter the hall and walk past the Douglas DC‑6B. With no GPS reception, we orient ourselves using the video and the elapsed time. We walk past the P‑51D; the passage beyond it is blocked, and I had to turn around at minute 02, second 03:08.
We set a marker here—this point serves as a time anchor:
gpx:cmt=Frame=20308
(Example in dataset 6b)
Please pay close attention to the last GPX point.
I continue this process until the end of my tour of Red Bull Hangar 7 on the mezzanine. At each turn or significant point, I transfer the elapsed time to an anchor point.
You can see the final GPX file in dataset 6c.
We now have a GPX route from the parking lot opposite Hangar 7, which includes GPX timestamps up to the entrance. Inside Hangar 7, we have frame anchor points all the way to the end of the tour.
When we apply my VBA macro “Filler,” it detects the frame anchors in the GPX file and calculates suitable timestamps for each anchor, starting from frame 0. The macro then performs a second calculation pass and interpolates any remaining time gaps. This calculation is significantly more accurate due to the shorter intervals and produces a realistic GPX dataset in which the images and their spatial positions inside the building align correctly.
My Red Bull Hangar 7 tour started with a faulty GPX file. We used a process to repair the existing GPX file and obtained a GPX file that can be uploaded to Mapillary along with the 360-degree video recording.
I recently met an old friend who went on a motorcycle tour on the island of Sardinia with a GoPro camera. Unfortunately, this camera didn’t record a GPX track.
After I was able to extract the start time of his recording from the video, I was able to artificially generate a GPX file for his route by setting frame points. GPX Sardinia dataset 11, dataset 12
GoPro ride with artificially generated GPX track: