Our Hanse 388 has three different GPS devices. A couple of days ago, when I was sorting through the position data, I came across some interesting glitches.
It’s All Over the Place!
It all started out with this video, replaying a few minutes of boat movement. In real life, after having secured the anchor, we were steaming forward by engine, but here’s what the video shows:
The boat isn’t moving anywhere! And then, wait for it… at 4 seconds, it leaps ahead to then just suddenly stop again.
It stays stationary, for about twenty seconds, and then:
It jumps back to where it started!
I’m almost absolutely certain that this is not how we sailed in real life (quantum-mechanic sailing?), but where to start the error solving?
So, as I mentioned, our Hanse 388 has three GPS devices:
- A B&G ZG100, located under the right starboard aft bench.
- An internal GPS (iGPS) inside the Zeus3 chart plotter.
- A GPS in the NAIS 500 AIS transponder, located just forward of the navigation table mounted on the port hull.
The ZG100 is, I assume, intended to be the primary GPS on the boat, and the one expected to provide the most accurate position information. It reports the GPS position ten times a second (10 Hz), uses both GPS and GLONASS satellites, and boasts of having an integrated gyro to increase the accuracy.
ZG100 – High-accuracy position, updated 10 times every second. The ZG100 GPS Antenna also houses an integrated multi-axis heading sensor, which allows it to carry out some clever damping of the GPS course over ground (COG) at very low boat speeds where normal antennas may become erratic due to normal GPS positioning errors.https://www.bandg.com/volvo-ocean-race/explore-the-technology/
B&G Zeus3 iGPS
The Zeus3 internal GPS offers the same 10 Hz reporting rate, supporting GPS and GLONASS (and maybe others), but there isn’t much more information to be found about it in the documentation.
Finally, the AIS transponder, NAIS-500, comes with its own internal GPS. I couldn’t find any detailed specifications for that either, but looking at the data, it’s not “10Hz”, but closer to 1Hz, meaning position reports once a second.
The GPS Test
So, in the “glitch” videos, the GPS boat is moving based on the primary GPS data from the ZG100.
As it doesn’t seem to very accurately capture what was really happening, I put together a small graphing program to plot what the three different GPS devices were saying.
Before the motoring episode in the video above, we were lifting the anchor and preparing to go. We would have been moving slowly to windward (NE in the video), and then maybe drifting a bit downwind (to SW) once the anchor had left the bottom.
Here’s the picture, as painted by our three different GPS devices. The red circles are position readings from the Zeus iGPS, the blue circles from the NAIS-500, and the black x marks are from the primary source, the ZG100.
What is immediately striking is:
- There are no Xs there! The ZG100 does indeed output GPS coordinates ten times each second, but the cloud sensors only record changes in the position. So, at 21 seconds, when the first x appears, that’s the first change in position as reported by the ZG100. And when the Xs finally do appear, they are far away from the rest of the positions! About 20 meters! That’s roughly two boat lengths.
- The other GPSs, they move around a lot. There seems to be some amount of erratic jumping and skipping, but following the red circles (iGPS) closely, it does seem like there is some real-life movement, as well, and not just errors.
- The blue circles (NAIS-500) are roughly in the same neighborhood as the red circles, but it seems that there is less mathematical precision in the rounding. While the red circles move quite smoothly around the canvas, the blues seem to be grouped by a less accurate latitude.
Now we are one minute from the glitch videos, and the reds (Zeus3 iGPS) and the blues (NAIS-500) are clearly starting to move down and to the left.
The black crosses, however, are still few and far off the main road!
Now we are exactly where the glitch videos start (in the beginning of the blog post), and here’s what the data shows.
At 32 seconds there an X appearing far away from the other GPSs. This is where the boat jumps “backwards” in the first videos. Apparently the ZG100 is still a bit out of sync with the real world.
And here’s the T+1 minute:
In this video, the ZG100 (black X) starts out far away from the reds and the blues. But then, using some mathematic averaging woodoo, it skips and hops closer and closer, to finally join its friends.
It seems that once we’ve been moving for a while, all the GPSs converge toward each other. The problem, however, is that during the converging stage, the GPS that should be the most accurate, is way way off.
It might be that the ZG100 stumbles on its own intelligence:
The ZG100 GPS Antenna also houses an integrated multi-axis heading sensor, which allows it to carry out some clever damping of the GPS course over ground (COG) at very low boat speeds where normal antennas may become erratic due to normal GPS positioning errors.
The “clever damping” might be a bit too clever, since it doesn’t register small movements at all, and it takes a long time for it to “catch up” when the boat is actually going somewhere. (It might be, of course, that this is some kind of settings or calibration issue, but the manuals don’t mention any settings, so I don’t know.)
GPS Error and Damping
Based on the graphs above, the seemingly most accurate GPS is the iGPS inside the Zeus3.
When looking at its track more closely, we see the more traditional GPS accuracy problem of getting location pings that aren’t exactly where we are in the real world, but (seemingly a bit randomly) spread out within roughly a few meters of the assumed “correct” positions. (More info about it in this article: GPS Accuracy.)
In the video, you do get the feeling of real movement. At the same time, looking at the individual location points, they seem to pop up a bit unpredictably, centered around the perceived movement.
The most basic way to correct this, and make the movement more natural, is to use some kind of averaging or smoothing function.
1 Second Damping
Here’s the video above with an added track (black Xs) that implements a one second rolling average to the raw data points.
The black track seems slightly less erratic than the red one, but still not like our boat would move in real life.
10 Seconds Damping
Let’s lengthen the damping significantly. Here’s the same track with a ten second smoothing function.
Now, it looks somewhat like real boat movement would! Except for the first few seconds because there aren’t enough data points to make a good average at that point.
When I apply ten seconds averaging to the “glitch” data track, here’s what it looks like:
One notable issue still: the smoothed track is behind the real position because it’s an average of the previous ten seconds. To get it “up to speed”, the rolling average should be of the previous five and the next five seconds. Doable in playback mode, not doable for live data.
Glitch Video Corrected
Finally, here’s the original video with all of the above corrections:
Next problem: the sea looks a bit monotonic and uninteresting, so what should we do about that? 😄