GPS on two phones: measurement error
I got a new phone a few days ago, a Fairphone 5, after a long time with a Samsung S8. I decided to compare their performance in terms of GPS. I’ve been using a homebrew mess of code (principally Python and Stata) to extract GPS data for years, as I’m kind of allergic to using Strava-type apps. I store timestamp, latitude, longitude and elevation on trips. The example I will use to compare the devices is a long bike ride that I took recently in the French countryside.
Location and elevation are the factors I want to compare. Location (i.e., latitude and longitude) matches very well at an overall level:

However, if we zoom in we see that the F5 (orange track) is more consistent than the S8 (green track):

Not only does the S8 track wobble a bit more but it seems to have autocorrelated errors (e.g., persistently too far north for a while), and the F5 tracks remain pretty well in the street.
Error in location obviously affects distance calculations (particularly random errors; autocorrelated errors not so much). This in turn affects speed. If the distance errors are random, the average speed will be OK but the immediate speed will rise and fall too much from segment to segment. Looking at speed calculated from distance over time (for intervals of usually 5s), for a segment of the ride we see that the F5 provides more stable speed figures:

(Note: speeds around 10 km/h are grinding up a slope, around 20 it’s flatter and >30 km/h is a sustained downhill. I’m not TdF material!)
The other concern is elevation. My experience with the S8 is that it has problems, and tends to lag, to be slow to realise you have gained or lost elevation. I’ve seen this comparing the GPS-reported elevation with the SRTM elevation for the reported location; SRTM is NASA’s Shuttle Radar Tomography Mission data, available for download. You can see here that the S8 data tends to be lower than F5 when climbing, and higher when descending:

SRTM elevation is in metres above mean sea-level (AMSL), while the GPS devices return height relative to the WGS84 standard (an idealised ellipsoid which captures the shape of the Earth well but not perfectly, and therefore deviates locally from AMSL). Where I am now, the WGS84 elevation is about 48.5 metres greater than the local elevation. We can see that in the following graph, where the SRTM line is lower, but rather closer in shape to the F5 data than to the S8:

The simplest summary of the agreement (after correction, implicitly) between the GPS and SRTM data is a correlation. The correlation with the S8 data is 0.9958, which is clearly very high: while there are errors, they are not enormous at the global level. However, the correlation with the Fairphone GPS data is 0.9996, markedly better. If we think of this in error terms (as in a regression) the RMSE for the F5 is about 30% that of the S8.
Obviously the performance of the GPS device is not the only thing that matters about a phone (and my old S8 is battered and worn out), but I’m pleased with this improvement.
F5 | S8 | |
---|---|---|
Correlation of GPS & SRTM | 0.9996 | 0.9958 |
RMSE, SRTM = f(GPS) | 4.2702 | 14.396 |