Monday, May 16, 2022

How Much Better Are More Satellite Systems?

After following a thread about a cool DIY GPS on Seabreeze for a while, I ended up building a few of these ESP 32, e-ink, u-blox M8-based GPS units myself. Looking at the results from my first few tests, I noticed that the units used fewer satellites than my older, Openlog-based DIY loggers. Fortunately, the firmware for the ESP32 logger is now open source,  which made it easy to verify that the loggers use the default settings for the Beitian GPS chips for the satellite networks used: they use only two global navigations satellite systems (GNSS), the United State's GPS system and the Russian GLONASS system. The BN chips support also support the concurrent use of a third system, the European Galileo satellites, and my older prototypes use those. 

This brings up the question: does using 3 GNSS systems give better accuracy than 2 GNSS systems? The chip manufacturers seem to think so, seeing that newer GPS units can track 3 or even 4 systems. But sometimes, these developments are driven by marketing, competition, and what's technically possible, and not necessarily by what makes really makes sense. So I decided to treat this as an open question, and tried to collect and analyze some data.

Unfortunately, the wind did not play along with my plans, so my tests were limited to bike rides and driving around in the van. But driving tests also have a few advantages. For example, it's easier to use multiple GPS units that remain in fixed positions relative to each other. In this post, I'll present some result from today's test drive, which seem to be quite typical, based on what I have seen in several other tests in the past week. Let's start with a picture of the test setup:

I used a total of six GPS units on the dashboard of my high roof van. The two units on the left are prototypes that have been approved for use on the GPS Team Challenge a couple of years ago, based on the Openlog logger and Beitian BN880 and BN280 GPS chips. The four units in the GoPro dive housings mounted on the wood board are the new ESP32 e-ink prototypes, and they all use the BN220 chip. The BN220 has a smaller antenna than the BN280 and the BN880; the BN880 is the only chip that has an "active" antenna, all other antennas are passive. Both Openlog prototypes and two of the ESP loggers were configured to use 3 GNSS systems (GPS+GLONASS+Galileo); the other two ESP loggers were configured to use only 2 GNSS system (GPS+GLONASS). 

Here's a graph that shows the speeds of the six units on top, and the accuracy predictions (sAcc) that the chips provide below:

Let's have a closer look at a region:


This is from a heavily wooded stretch of road, and the different GPS units show quite a bit of jitter, often disagreeing by a couple of knots for a few points. In this region, the green curve seems to be the worst offender - but that's a subjective assessment, and there are other regions where other colors look worst. Looking at speed curves can provide some hints about what's going on, but it is also subject to "expectation bias": if we expect the 2 GNSS units to be worse, then we're more likely to "see" this in the data. What we need is a quantitative analysis!

If we knew the actual speed at any point, it would be trivial to get actual accuracy numbers - but we do not. Even the presumably best GPS unit, the BN880-based logger, shows a substantial amount of jitter or "noise" (and for the van, we know with absolute certainty that the rapid ups and downs are noise, since it is physically impossible for the van to repeatedly gain and loose a couple of knots within a fraction of a second).

But the noise we see has a lot of randomness to it, so if we average the data from multiple GPS units, we can remove a lot of the noise. So for the following analyses, I used the average speed from five of the six GPS units at any point as the "true speed estimate", and then looked at the difference in speed from the sixth unit to calculated the "estimated actual speed error". I then averaged the absolute error over 200 points for the graph below:

There's a lot of information here, but one thing jumps out at me: while there is a lot of variation in the error over the few minutes depicted in the graph, but mostly, the curves keep their relative position to each other: yellow is worst most (but not all) of the time, and the light blue logger shows the lowest error estimates most of the time.

To get back to our "2 vs 3 GNSS" questions, let's just look at three units: the BN880 unit, and one 2 and one 3 GNSS ESP logger. Here's the first pair of ESP loggers I had built:

For most of the time, the 2 GNSS unit had higher errors than the 3 GNSS unit. The difference was largest in the region near the end, where all three units show the highest errors.

Now to the second pair of ESP loggers:

Again, we see that the 2 GNSS unit has higher errors than the 3 GNSS unit and the controls. Interesting, the 3 GNSS ESP logger seems to be more accurate than the BN880 here (although we need to keep the limitations of our "true speed estimate" in mind!).

For comparison, let's look at a different region from the test drive, where there were no trees and very few other obstructions next to the road:


The speed graph shows that the different GPS units were in much closer agreement, and the sAcc error estimates provided by the GPS were lower and steadier than in the "noisy" region above. Let's have a look at the "estimated actual speed errors" for this region:

This region was much shorter, so the graph shows averages over only 20 points (rather than 200 in the first example). Note that the actual speed errors in this region are much lower than in the previous region:  between about 0.015 and 0.07 knots, compared to 0.1 to 0.4 knots. At this much lower error level, the curves do not follow the same "better or worse" trends - instead, they are often closer together, and trade ranks more often.

When speedsurfing in a straight line with a GPS that is properly positioned to have a clear view of the sky, we are generally much closer to the second, "lower error" example above than to the first, "high error" example. Extrapolating from the data above, we would expect differences between tracking 2 and 3 GNSS systems to be relatively small. In the one windsurfing session that I did manage to squeeze in,  that is indeed what I saw - but I was using only 2 ESP loggers configured for 2 GNSS systems, and the BN880 logger as a control. But the same general trend was also true in other biking and driving tests I did.

But when GPS signal reception gets poorer, the data indicate that using 3 rather than 2 GNSS systems will give more accurate data. The difference is not dramatic, but it is real. For a GPS worn with an armband, reception can get poor when the armband slips, and the body and arm block satellite signals; with a GPS watch, an underhand grip will cause poorer reception. One of the cool things about the ESP GPS is that the cheap cost and good display allow for mounting a unit on each side of the boom, so that you can see your speed while surfing. Getting close to the boom with the body could also possibly impair the GPS signal reception, although this should be largely limited to one side. Another common source of speed artifacts are crashes, where the GPS becomes submerged, and sometime "fantasizes" high speeds, but without triggering the filters in the GPS analysis software. Here, two boom-mounted units offer a potentially large advantage, since one of the two units will typically remain above water, and keep getting good reception. By looking at the reported error estimates from both units, GPS analysis software could theoretically automatically pick the unit that retains reception, and ignore the under-water unit completely. I plan to look into this as an addition for GPS Speedreader ... once I have more examples from windsurfing or foiling sessions with two units.


Saturday, May 7, 2022

Foil Tack Footwork

 Yesterday, a few videos came out that showed fully windfoil tacks that were fully foiled through - here is one of them: 


Sure, Balz Müller had shown fully foiled tacks a couple of years ago already, but his tacks were Duck Tacks. Duck Tacks may be "easy" for world class freestylers, but they out of reach for most regular windfoilers and windsurfers, and they are just about completely impossible with large race sails. 

In a regular windsurfing tack, you always loose just about all speed when tacking. In foiling, that's not the case - even mediocre amateurs like yours truly can keep a few knots of speed for the entire tack, and good racers keep so much speed that they pop right back up onto the foil. But compared to other foil disciplines, that's not really that good. America's Cup boats foil fully through their tacks all the time, often at speeds well above 30 knots. Advanced wingfoilers often foil through their tack; I recall a wingfoiler in Florida who would always jibe on one side, and tack on the other, without ever touching down.

But until yesterday, all windfoil tacks that I have seen had included at least a brief moment where the board touches the water. In my tacks, that usually happens when I put my front foot in front of the mast, or a moment later when I shift my weight from the back foot to the front foot. No surprise here - put your weight far forward, and the board goes down. So the critical question is: how can you get around the mast without putting your body weight in front of the mast? Just head over to Windsurfing.TV on Facebook and check the foil tack video there (https://fb.watch/cSdv0BHLkY/): it has a big smiley face that hides the foot placement.

So let's have a closer look at how the windfoiler in the video above solves the problem. Here is a screen shot as he carves into the tack:

It's a hard carve, but there's nothing unusual about it. That happens a little later:

Here, Harry started moving his front foot. Note that he has not moved the back foot, so it carries all his weight, which pushes the board higher out of the water. In a normal tack, we usually put down the foot in front of the mast, and then step forward with the back foot - but Harry does not stop moving his foot until it is on the other side of the mast:

With both feet behind the mast, his weight remains further backward. It also helps that the sail is tilted far towards the back, moving even more weight to the back. Let's look a fraction of a second later:
Harry is now moving his old back foot to the other side, again without putting it down in front of the mast. Note that the other foot has moved quite far back on the board already, again putting weight towards the back of the board. In the final picture of this series, he has both feet on the new side, and well behind the mast:
Clearly, the talented 15-year old Harry Joyner has figured out how to get around the front of the mast without ever putting his weight in front of the mast, which allows him to clearly foil through his tacks.

For a bit more detail, here are screen shots from a different perspective, taken from a video Harry posted on Instagram (https://www.instagram.com/p/CdOOkRzMA3f/):

Carving hard into the tack.

Two seconds later, still carving hard.

Just about to move the front foot.
The front foot is starting to move. All the weight is on the back foot.

The old front foot goes around the mast to the new side, without stopping in front of the mast. The front hand moves to the new side on the boom. Note that the board having all weight on the back foot has pushed the board higher out of the water. 


The foot does not stop moving, but right away slides further back on the new side.


The old back foot starts moving, with the old front foot already quite far back on the new side.


Harry keeps moving to the back of the board. The new front foot briefly touches the board behind the mast.


The new front foot keeps moving back, with all weight on the back foot.


All that weight on the back has kept the foil flying high.'

Ready to get going on the new tack.

It will be interesting to see how many racers will be foiling through their tacks this year. My bet is that many of the top guys will. In hind sight, it seems a bit surprising that it took several years of racing before someone figured to out how to foil through tacks. But maybe that's because all those windfoilers with a windsurfing background has the "step before the mast" too deeply engrained in their muscle memory.



Wednesday, April 6, 2022

Texas Summary

 We've back from our winter escape from Texas, so it's time for a summary. The first thing that comes to mind is that is was cold. Before 2021, winters in Corpus Christi would follow a pattern of 3-4 warm days, with sun and temperatures in the 60s or 70s, followed by 3-4 cold days, where temperatures dropped to around 50 F (10 C). Quite often, we'd also get decent sessions on the colder days, since the water would remain comfortably warm for the first couple of cold days.

This year was different: the cold spells lasted longer, often 5 to 7 days, and the warm spells seemed shorted. On January 20, the air temperatures dropped below 40 F, and it took until February 2 before it got up to 70 again ... only to drop down to below freezing two days later, and then remain below 70 for another couple of weeks. Interestingly, the colder weather is likely to be a consequence of global warming, which weakens the jet stream and thus causes more "blocking", where weather remains "stuck" for longer times. I find it scary that this seems to have become an easily observable trend already .. and that it's effect of making winters in Texas colder may prevent locals from realizing that climate change is real, and carbon emissions really must be reduced.

After having experienced 6 freezing cold days without power in Texas last year, we escaped the cold period in February by driving to Florida. That was an astonishingly long drive (1,260 miles), but well worth it. We visited our friend Joanie, foiled and winged at a few new spots, and I even got to take a one-day wing clinic with Andy Brandt, which was great. I got a few longer rides and can now at least imagine that winging could be fun.

In March, it finally got (mostly) warm, and we had a lot of days with wind in the 20-30 mph range, and temperatures in the high 60s and low 70s. After getting onto the water only about every third day in January and February, I got 21 sessions in March. 11 of those were speed sessions on slalom gear, mostly at Grassy Point and with Nina. I ended up getting above 35 knots a couple of times, which I had previously not done in the USA, and set a new personal best for the nautical mile (32.12 knots) on the last day. But my speed improvements paled against Nina's.

In the last couple of years, Nina had been stuck at a top speed just below 32 knots in Corpus Christi. But after a few successive speed sessions in March, something clicked, and she got a 2-second top speed above 34 knots on March 18. She also set a new PB for the nautical mile (30.448 knots) the same day. After this session, she had no problem getting above 33 knots, proving that she had indeed learned to go faster. 

Towards the end of our trip, we got lucky: 3 windy days in a row, with low tide levels which meant flat water at Grassy Point. On our last day of sailing, Nina set a new top speed PB with 36.103 knots, easily beating my speed for the day. She also improve her nautical mile PB again, to 30.962 knots. For her top speed, she had found a spot of very flat water right next to the shipping channel near Padre Island. She later showed me the spot, but by then, the wind had dropped.

Since we had so many cold days in the first two months of our trip this year, we ended up with a new hobby: bird watching. Corpus Christi may be one of the best spots to get started with taking bird pictures, since it has lots and lots of impressive water birds that are not shy at all. We ended up with photos from more than 40 different bird species, and a few other animals like coyotes, deer, and crocodiles. Here are a few of my favorites:

    Willet - a common sight

    Royal Terns. Love the hairdo.

    Roseate Spoonbills and Little Blue Heron

    Reddish Egret

    Long-billed Curlew. A few often hang out near the Bird island windsurf launch.

    White Pelican

    Windsurfer and a flock of Ibis

    Great Blue Heron and Great Egret, two very common sights.

    Black-necked Stilt. Elegance defined.


Thursday, January 27, 2022

Measuring Speed Errors: Sampling Frequency

This is the first of several posts where I look at the accuracy of speed measurements and the sources of errors in detail. To get started, let's look at the tracks and speed graph from an impressive speedsurfing session (click on images for a larger version):

This is the track from a recent speedsurfing session in Tasmania, Australia, available at ka72.com. The section for top speed runs right next to a sandbar is quite short: the blue line in the image is only about 220 m long. But despite the short runs, the speedsurfer hit more than 40 knots in every speed run, and reached a top speed of 44.3 knots. 

I am using this session as an example because it has some very rapid speed changes: each speed run took only about 40-50 seconds. With rapid speed changes like this, we obviously must take speed measurements often enough to get the correct speed, or our measurements will be off. In signal processing, the term "Nyquist theorem" is often used to describe this issue; "sampling rate" that are too low for the signal create "aliasing errors".

A zoom-in on the top 10 second speed run illustrates this:
The blue curve shows the original speed measurements, which were done ten times per second (at 10 hz). The red curve used only every second point of the original data, corresponding to measuring the speed at 5 hz. The green curve used just every 10th point, and shows what the data would look like at 1 hz (the rate of the Locosys GT-31 that was the "Gold standard" GPS device for many years). 

The graph shows clearly that measuring speed just once per second does not capture the details of getting faster and slowing down very well - but how much "aliasing error" do the slower sampling rates introduce? Here is what the calculated top speeds at 1 hz, 5 hz, and 10 hz look like for the categories used in the GPS Team Challenge:

Interestingly, the differences relative to the 10 hz numbers are quite small: 0.064 and 0.026 for the top 2 seconds; about 0.01 knots for the 5x10 second average; and about 0.02 knots or less for the other categories.

But looking at just one result for each categories leaves us a bit at the mercy of chance - perhaps the difference were low for the fastest 2 second run, but larger for other speed runs? So let's have a look at the fastest 5 runs in the 2 second, 10 second, and nautical mile categories:
That's a lot of numbers, but we can just plug them into a spreadsheet, calculate the differences relative to the 10 hz numbers, and then find the average and maximum differences. Here are the results for the speed session:

The average differences measured for the 5 hz data range from about 0.06 knots for 2 second runs to 0.002 knots for the nautical mile. The largest observed difference is 0.131 knots for the 4th-fastest 2-second run. Here's a zoom in of this region (again with blue = 10 hz, red = 5 hz, green = 1 hz):
Basically, most 5 hz values used in this region happened to be higher than the points that were not used, so the 5 hz average ended up higher than the 10 hz average. Over longer periods, point-to-point variations will not show the same "up-down-up-down" patterns as this region, so it will become less and less likely that the sub-samples are mostly higher or lower values, which leads to the drop in the observed differences.

The numbers above are for just one file. What happens if we look at more GPS tracks - from other spots, other people, other units? To find out, I repeated the analysis above with a total of 10 files, which include 40+ knot sessions from Albany and Lake George, as well as a number of slower sessions from other spots. Here are the results:

The numbers cover quite a range - from an average "aliasing error" of 0.004 knots when comparing 5 hz and 10 hz data for nautical mile results, to a maximum of 0.349 knots when comparing 1 hz data to 10 hz data for 2 second runs. Of the 10 files in this analysis, 4 showed differences near or above 0.2 knots for 2-second runs (when looking at the top 5 runs in each file). In other words, the chances that a 2-second result obtained from 1 hz data is off by 0.2 knots or more are quite high. 
In contrast, the observed differences between 5 hz and 10 hz are much smaller - typically around 0.02 knots. One one of the fifty runs included in this analysis had a difference of 0.131 knots; all other runs had a measured difference below 0.1 knots.

But what do these numbers mean? To put them into perspective, I looked at differences from runs that were recorded with 2 GPS units at 10 hz speeds. I included a total of 10 files from 5 different sessions, recorded by 3 different speedsurfers. Here are the results:

The next graphs compare our measured estimates of "aliasing" errors to the measured differences between 2 units - first the average differences:

In each category, the measured "aliasing error" is at least twofold lower than the observed difference between two units. The picture for the observed maximum differences is similar:
The analysis above is the first actual measurement of "aliasing error" in speedsurfing. The result indicates that, compared to the current accuracy of the best GPSTC-approved units, the aliasing error is small for 5 hz data. In contrast, the measured error for 1 hz data is larger than the typical "2 unit difference". In absolute terms, this primarily affects 2 second results, and to a lesser effect 10 second runs. 

What the analysis above did not address was the impact of sampling rate on the accuracy estimates of the final results due to random and non-random errors in the speed measurement from other sources. This is a topic that can appear very simple ("more is better"), but can actually be quite complex when looking at the underlying assumptions and error sources in detail. I plan to address some of these issues in future posts.