Saturday, January 20, 2018

Dongle Update

We tried to escape the cold weather on Cape Cod, and drove three days to Texas. But after one decent day of sailing, temperatures dropped to below freezing, and stayed at low for the rest of the week.  Too low to go sailing .. maybe we're too spoiled already. But at least it gave me time to play around with the GPS dongles some more.

The first goal was to use two dongles at the same time so that I could compare the results - any difference is definite noise. I was able to record from two dongles on one phone with a USB hub, but the hub itself introduced some electronic interference which degraded the signal. So a second phone was needed.

Finding a cheap Android phone with USB OTG support was not easy. The first two phones I tried, which had been described as having OTG on some web sites, did not work. I finally found a Moto E4 for $40 at Best Buy that worked, and did a few test drives. After reading that the Bavarian Speedkini contest now allows the use of phones with GPSLogit or Windsport Tracker, I decided to record at 1 Hz, so that I could compare the phone GPS and the USB dongle to the "gold standard" GW-60. Here is a speed track from the latest test drive:

The graph shows tracks from 2 GW-60 phones in blue and red - but since the data are almost identical, only the red track is visible most of the time. The tracks for the two phones (Samsung Galaxy J3 and Moto E4) and for the two GPS dongles look pretty much the same.

A typical way of comparing GPS units is to simply compare the speed results, for example for 2 second and 10 second speeds. That is intuitive, but it has the disadvantage that only a very small subset of the data is used; everything that's not part of the top-speed regions is effectively ignored. To answer the more interesting question about how close the data are in general, I wrote a little program that calculates the differences between the tracks over all points above a minimum speed of 15 knots. It gives the average of the absolute differences, which is a good indicator of average reproducibility.  Here are the results for this test:

  • Average absolute differences between 2 tracks:
    • GW-60: 0.035 knots
    • Phone GPS: 0.051 knots
    • USB dongle: 0.025 knots
All these differences are quite small - so far, so good. How about the largest differences?
  • Maximum observed differences between 2 tracks:
    • GW-60: 1.07 knots
    • Phone GPS: 0.796 knots
    • USB dongle: 0.318 knots
Let's look at these areas - first the GW-60 watches:
Next the phones:
Finally, the USB dongles:
Visual examination of the traces confirmed what the numbers indicated: the phone traces have noticeable more diverging areas than the USB dongles, and the GW-60 is somewhere in the middle. The fact that the USB dongles and not the GW-60s had the most consistent data is somewhat surprising, considering that the GW-60 data are actually averages build from higher-frequency data, while the dongle data are (presumably!) single-point measurements. Theoretically, the averages data should have about 2-fold less noise than single-point measurements.

Comparing two identical units only gives us a lower limit of errors in the data, since it measures only truly random noise. Comparing the different GPS types to each other is more interesting, and did indeed give larger numbers for observed differences. However, a closer look revealed that there are some systematic error sources that need to be addressed first - take a look at the image below for an example:

The graph shows a comparison of a GW-60 track in blue and a USB dongle track in red. The GW-60 track is time-shifted relative to the dongle track - it's about 0.6 to 0.8 seconds behind. The likely cause for this particular shift is that the GW-60 reports averages of the last five 5-Hz measurements; the shift is not present when comparing data recorded at 5 Hz. However, I have noticed similar time shifts when comparing tracks from different phones; in this case, the underlying cause is probably different (e.g. the GPS chips in the phones take measurements at different times).

For a thorough comparison of data from different devices, the observed time shifts would need to be corrected. That is algorithmically quite simple, but will require a few hours of programming and testing, so it may be a while before I get to it. However, some of the data can already be analyzed at least qualitatively, as shown in the graph below:

The speeds shown are from the GPS chip in the Moto E4 (blue) and two USB dongles (green and red). In this region, the phone GPS was quite inaccurate. The two values at and before the vertical line were about 1 knot too low, and soon followed by 2 values that were about 1/2 knot too high, followed by another down-up cycle. If this artifact had occurred in the  top-speed region, the measured 2-second speed might have been 1 knot too low, or 0.5 knots to high.

The data above are just from one 15-minute test drive, with about 800 data points used for the analysis, so this is just anecdotal evidence. It's definitely way too early to claim that the USB dongle has better accuracy than the GW-60, that would require a lot more tests. However, it is once again an encouraging sign, and the observations are in agreement with what I have seen in other tests. Hopefully, we'll get some wind tomorrow for a windsurfing test!

No comments:

Post a Comment