Monday, May 15, 2017

The Fastest Way To Get Faster

Some people who saw me driving around today looked at me in a funny way. Was it because I had my arm out of the window in 54ºF (12ºC)? Or maybe because I had 6 GPS units strapped to my arm?
In case you're wondering: I was wearing two yellow GW-52 units on top; two GW-60 PGS watches on the wrist, one facing up and one facing down; and a GT-31 plus a third GW-52 at the bottom.

As fascinated as I am with GPS speedsurfing, even I need a good reason to strap more than $1000 in GPS devices on my arm and go for a drive. I had one! I wanted to reproduce what Boro had accomplished recently. Boro wanted to start using his GW-60 watch, and compared it to his trusty old GT-31 GPS units. He got substantially higher speeds from the GW-60 watch:
  • 2 seconds:
    37.99 knots GW-60, 36.29 knots GT-31
  • 5x10 seconds:
    33.71 knots GW-60, 33.20 knots GT-31
That's 1.7 knots more for 2 seconds! It takes me (and others) years to improve my speed by that much! In many other tests, the speed of the watch had been much closer to the speed of other GPS units - was his watch broken, or was there another cause?

Looking at Boro's GPS files, it was obvious that his speed data had unusually high error margins of +- 1 to 2 knots; that's at least 2 times higher than usually, and about 5 times higher than what can be achieved with good GPS satellite reception. The error margins were about 2x higher when he was going the direction of his speed runs than when he was sailing back.

The first suspicion was that he was using an undergrip, with his watch hand closer to the mast, on his speed runs, and Boro quickly confirmed that this had indeed been the case. The human body is a very good absorber of GPS signals, and the GPS gurus had been very concerned about this very scenario - watches faces down towards the water, with an arm between them and the GPS satellites. I quickly did a little test walk with a couple of GW-60 watches on my wrist, one facing up and one down, and was able to reproduce the roughly 2-fold increase in error estimates if the watch is facing down.

But could such an increase in speed errors cause the observed difference in speed? There are some theoretical arguments against that: if the error is random, and we collect data at 5 Hz, we get 10 data points for 2 seconds, and 50 for 10 second runs. Average error should sometimes go up, sometimes go down, so that the total error should go down the more points we have. With 10 points, we'd expect the error to go down about 3-fold; with 50 points, about 7-fold. With data like Boro's that have about 1.5 knots error estimates, the expected error for 2 seconds is just 0.5 knots; for 10 seconds, it's closer to 0.2 knots; for 5x10 seconds, even lower.

So, something just is not right here. Instead of boring you to death with more theory and statistics, let's get back to my little drive. The idea was simple: let's just see what actually happens if we go for a drive with a bunch of GPS units, some facing up towards the satellite, some facing down. Somewhere in the middle of the drive, turn the arm around by 180 degrees and see what happens! And, most importantly - what's the effect on the top speed?

Let's start with a look at the speeds:
This is about 15 minutes worth of data from 6 GPS units - a bit too much information to see much. I deleted a few data points in the middle, where I turned my arm around. I also split the tracks into 2 segments for each device, before and after I turned the arm. So each device was pointing up for one segment, and down for the other.

Let's jump straight to the 2 second speed results from the first segment:
Four units show top speeds close to 28 knots: all the units that were facing up, and the GT-31. But the GW-60 watch and the GW-52 unit that were facing down show speeds that are almost one respectively 2 knots higher! Let's look at the data in detail:

The top graph shows the doppler speed, the bottom graph shows the error estimates. What stands out is:
  • Two speed curves are substantially higher than the others: the black (GW-52 #3) and the red (GW-60 #2). 
  • The same two GPS units have error estimates in this region that are about 2x higher than the other units,
  • The observed error is not random. Both the red and black speed curves stay about 2 knots above the other curves for 8-10 seconds (40-50 data points). If the error would be completely random, this would be extremely unlikely to happen by chance; winning the jackpot in a lottery is more likely.
I can only speculate why the error becomes non-random at high SDOP values, but there's a likely guess: when the signal quality gets too low, the firmware starts to rely more on "dead reckoning". GPS chips sometimes use dead reckoning when no GPS signal is available, for example in tunnels. A sensible firmware implementation would start using increasing amounts of dead reckoning as the signal quality decreases, rather than a single "all-or-nothing" threshold. There are several indications that something like dead reckoning is causing the observed error characteristics, but that probably deserves another post.

Another question that arose was whether the problems are specific to the GW-60 watch, since it apparently has a GPS antenna that is smaller than the antenna in the GT-31, and thus possibly inferior. Let's look at the error estimate graphs from the "up" and "down" segments to get an idea. I color-coded the graphs so that blue indicates "up", and red indicates "down". Here's the GW-60 watch:
The SDOP values roughly doubled when I turned my arm so that the GPS was facing down. Here's the same graph for a GW-52:
Pretty similar, again with a marked increase when the GPS unit was faces down under my lower arm. Finally, let's look at the GT-31:
The GT-31 was facing down during the first segment, and up in the second segment. Again, we see much better data accuracy with the GPS facing up towards the satellites. Note that I sometimes had to take my hand into the car to turn, and that I may not always have had the arm oriented perfectly up or down, but the overall trend is clear: all three devices show the same trend towards much degraded accuracy of the GPS is worn facing to the ground.

Here are some conclusions and suggestions from this analysis (some of these points just re-iterate what others have stated many time before):
  • When using a GPS watch, make sure that the watch is facing up during your speed runs! If you use an undergrip on your front hand, wear the watch on the inside or (even better) on your back hand. Or get an armband extended and wear the watch around your bizeps - it will get better reception there. For the best GPS reception and the most accurate data, consider mounting it on your helmet (if you wear one).
  • The GPS analysis software may need to be modified to deal with poor quality data better. For example, the default SDOP cutoff of 3.0 that GPSResults uses for 5 Hz data seems too high, as the example above and Boro's initial experience show.
  • While the examples I have shown here focus on speed over-estimates, it's just as possible that the error goes the other direction, and the speed is under-estimated. Here's an example:
The red track is from a downward-facing watch, and the speed happens to be several knots too low just around the maximum speed for this region. So wearing the watch facing downward during speed runs may not just be the quickest way to pick up a knot or two - it may also be the quickest way to loose a knot. So - keep it up!