Friday, December 30, 2016

Never Trust Software!

I develop software for a living. So when I say "Never trust software!", you should trust me! What does that have to do with windsurfing? Let me start my explanation with a couple of screen grabs. Here's the first:

These are my "alpha" numbers from a windsurfing session 3 days ago. The best one was only 7.27 knots! That was a bit disappointing, since a few of my jibes were pretty nice.

An "alpha 500" is a 500-m run with a jibe in the middle where the two ends have to be within 50 meters. Since I was not really watching where I was going, I assumed that the two "arms" of the alpha were too far away. That's easy enough to verify - when I changed the "alpha proximity" number in GPS Action Replay from 50 m to 60 m, I got a 20.85 knot alpha. Here's the section from the GPS track:

You can see that the two ends of the 500 m track are indeed more than 50 meters apart, which is why GPS Action Replay did not count it.

But when I analyzed the same track today using the program GPSResults, I got very different results:

This program thinks that my best alpha was 20.296 knots! Obviously, at least one of the two programs is not trustworthy!

Looking more closely, I noticed that GPSResults has shorter run length for the first three alphas, ranging from 444.8 to just 100.6 meters. Indeed, the two legs are less than 50 meters apart a little to the left:
So - which of the two programs has it right? Let's check the exact definition of what "alphas" are in speedsurfing (from

 "All results must have a total distance covered that is less than or equal to the maximum distance"
Based in this definition, GPSResults is correct, and GPS Action Replay has a bug in its alpha calculation. However, the other GPS speedsurfing web site has a slightly different definition:
"Software calculated speed over ‘one’ run of 500 meters with a gybe and a proximity at the startpoint of 50 meters."
Here, the "less than" is missing, and GPS Action Replay actually would be the program that calculates alpha correctly.

Most days, it makes no difference if we say "less than" or not - since the jibe is the slowest part of the run, extending to the full 500 meters usually gives the best alphas. But as I have shown, not always!

I assume that the difference in definition was not intentional, since both sites allow the use of both analysis programs. Maybe they can agree on using just one definition?

Tuesday, December 27, 2016

Slick Fun

I don't know if the wind Santa is still around or what it was, but we got another warm and windy day today. WSW, high tide, and a predicted drop called for a session at the Kennedy Slicks. That's one of my favorite spots. Very flat water right next to the breakwater - but it's deep, so no worries about running aground.
Nina likes it shallow, but she nevertheless decided to join me for a speed session. I rigged for the wind, which was hovering around 30 mph - a 6.3 m race sail sounded about right. That would usually mean a 5.0 for Nina, but she believed that the predicted rapid drop in the wind was just waiting for her to get onto the water. So she rigged a 5.8. That's the ancient KA Koncept with a small and high mast cutout. At the bottom of the cutout, the boom is still at Nina's eye level!
I had to struggle a bit with my 6.3 in the gusts, but kept it somewhat under control. But my fighting meant that the 5.8 was way too big for Nina - and a high boom is about the last thing you want when overpowered. But she seemed to be doing fine on her first run out.
I quickly got numbers above 30 knots on my Locosys GW-60 GPS watch. That does not happen very often, so it made me quite happy. But I stopped frequently to keep an eye on Nina, who was struggling. There's absolutely no danger at the Kennedy Slicks - the worst case scenario is that you'd drift for 15 minutes and come ashore half a mile downwind (or perhaps a 20 minute swim if you don't want to walk back). But after a second run out and a bit of struggling, Nina sailed back to shore, and called it a day.

I helped her derig, and stopped sailing a little while later, too. It was a short session with just 7 runs, but 4 had a top speed above 30 knots .. not too bad. Despite the shortness and no playing around at all with gear trim, the session ended up as my third-fastest of the year. I love December sailing!

Sunday, December 25, 2016

Merry Christmas!

What does a windsurfing addict who has plenty of gear want for Christmas? A windsurf session!

I must have been good last year, because Santa brought some perfect windsurfing conditions today: wind around 30 mph, balmy temperatures in the mid-40s (yes, Fahrenheit, but that's counts as warm in late December), and lots of sun.

One of my favorite playgrounds for northerly and westerly winds is Barnstable Harbor. I usually sail there mid-tide, but had always wanted to explore the channels near low tide that the depth map shows:
I started sailing when the tide was just below 3 feet, and it dropped to 1.6 feet during my one hour session. Here are the GPS tracks:
I got off a lot to check the water depth - except for the 1st turn, I was able to stand every time. On the way back, I walked through some shallow areas, where even my short 21 cm fin might have been a bit too long.

The area where I sailed most is perfectly sailable, and probably would be fin down to a 0 ft tide. The water was not perfectly flat, since there are extended areas to windward where the water depth was about 0.5-1.5 ft. Since I was out alone in somewhat cold weather, I sailed conservatively, so there are no great speeds to report. In conditions like today, this seems more like a freestyle than a speed spot.

But I did see an area that looked very promising in a different wind direction: the sand bar near the top-right in the second image. It looked like a great speed strip for NE wind: the water got deep quickly enough that runs maybe 20-50 feet from the sand bar would be doable. I walked it for about 140 meters. The total length is about 500-700 meters, with a possible approach from choppy waters at the lower right. The best launch for NE low tide would probably be from Millway Beach, since this would me more than a kilometer upwind from today's launch in NE - a long walk at low tide against the wind! This would be a great speed spot in a NE with a neap tide; during a 1.3 ft neap tide, it should be sailable for 3 hours! Maybe we can check it out for speed next spring. Some of the other channels may work even at very low tides (0 ft and lower), although mostly in other wind directions (N-NNE and W-WNW).

Besides the lovely weather and great wind, I had another motivation to go windsurfing today: to try out my new GPS watch, the Locosys GW-60. It just was "provisionally" approved on the GPS Team Challenge, and replaces the GW-52. I find it a lot easier to use, with push buttons instead of touch areas that often do not work; it's also much more Mac friendly, and does not require Windows to download the data. The numbers I got today were very close to the numbers from the GW-52 - no surprise there, others have done a lot more testing already before the approval. But when I compared the tracks from the 2 devices, I noticed one area where they looked quite different - here's a part of that section:
What's going on?

My first suspicion was some difference in the signal processing, but then it dawned on me: it's much simpler! This part is from a walk along the sand bar, and the GW-52 (red) was on my arm just above the elbow; the GW-60 (blue) was on my wrist.  We can see my arm swings when walking, and the difference between the GPS that was closer to my shoulder and the one on my wrist. Cool! Now I just have to remember to push my hand out at the end of each speed run :-).

Monday, December 19, 2016

Fun With Noise

Warning: this is a geeky post. No windsurf pictures, no videos. Just talk about GPS accuracy. So it that does not interest, go and watch TV, play with your kids, or whatever. You have been warned.

If you are looking for someone to blame for this post, don't pick on me! This all started on the Australian windsurf forum. One of the guys who is currently evaluating the new GPS watch from Locosys was kind enough to post some data from both the GW-60 watch and the current "gold standard", the Locosys GW-50. One picture that caught my attention showed data for the top 2-second speed. Interestingly, the GPS watch appeared to have more accurate data, as indicated by  the lower error estimates (SDOP and "+/-" estimates). A detailed comparison of more than 20 different 2-second runs showed that the GW-52 usually have higher speed estimates than the GW-60 watch. The differences were not huge, and the ranges (best guess +- error estimates) between the two devices always overlapped, which is good; but nevertheless, it appeared that either the GW-52 measurements were a tad too high, or the GW-60 measurements a bit too low.

The GW-52 data seemed to have a bit more noise than the watch data, as indicated by the slightly higher "+/-" numbers in the data shown. What do I mean with noise? Check out this graph:
Speed data from 2 GW-52 devices
The data shown are from a driving test with two GW-52 devices right next to each other. Without any noise, the units should show exactly the same speed at each point in time. That's obviously not the case - the speed differs by up to 0.8 knots between the 2 units. That's noise - random errors in the data. There are a number of different potential causes for the noise, but for the remainder of this discussion, what exactly caused the observed noise is irrelevant. What matters is that data from GW-52 units sometimes contain a significant amount of noise. That raises the question:

How does random noise influence our measured speed?

The first answer that comes to mind is: "if it's truly random, some points will be too high, some too low, so the net effect will be quite small". That can actually be true - but only if we have enough data points. For 2-second speed and 5 Hz data, we only have 10 points, which may not be enough!

Time to plug some data into a spreadsheet, and see what happens. The first thing to do is to generate random data with an average speed of 0 knots, and random noise between -1 and +1 knots. That takes a couple of minutes to set up, and 2-second "speeds" can easily be calculated by averaging 10 points. If we then look for a maximum speed, what do we get? Well, I got 0.48 knots when I looked at for the maximum in 600 data points (that would be 2 minutes of data). Cool - noise can make me half a knot faster!

Well, not so fast, cowboy! We don't usually sail around for 2 minutes at our top speed. So let's look at more realistic data. I started by downloading a few GPS tracks from Here is what the fastest 10 second run from the Aussie speedsurfer "Cookie" on November 11, 2016 looked like:
Within this 10 second run, Cookie stayed darn close to 40 knots for about 20 data points - that's 4 seconds. So what happens if we simulate a speed run were we keep the top speed for 4 seconds, and add some noise to it? Here's a graph:
The blue line are the noise-free data, the red line is the data with random noise (between -1 and +1 knots) added. This is a quite a bit noisier than Cookies data, but somewhat similar to the driving data in the first picture.

The next steps are to calculate the 10-point average speeds, and to find the maximum speed ... and then to repeat this a bunch of time with different random noise. I set it up so that 5 simulations were run at a time, and looked at the averages and maximum "measured" speed. After writing down the number, I'd repeat this with fresh random noise. Since the noise was random, the results differed a bit for each run. Usually, the measured top speed would be higher than 40 knots, but I'd often see top speeds below 40 knots in one or two of the 5 simulations. Here's a summary of the results:
On average, the speed was overestimated by almost 0.2 knots. But for one out of five runs, the over-estimate would be even higher, ranging from 0.29 to 0.55 knots. That's a lot! But with less noisy data (like the ones in Cookie's top 10 second run), the over-estimate would be proportionally lower.

If you have another look at the first and third graph, you may notice that the simulated noise looks a bit different from the observed noise. In the simulation, the noise sometimes jumps very quickly between the extremes; in the actual GW-52 data, the jumps are a bit slower, usually spread out over two or more data points. This could, for example, caused by filters like Kalman filters, which are often used in GPS signal processing. To see how such "slightly coupled" errors would affect the measurements, I ran another simulation where the error was random at every 4th data point, and intermediate points were a weighted average of the neighbor "anchor" points. Here's an example of what the simulated data look like:
The "coupled" noise increased the error:
No surprise here. In reality, the noise is probably more random (not as strongly coupled) than in the second simulation; I did it mainly to illustrate what the effect of "coupled" noise would be. In reality, filters that could effectively lead to such coupling would typically also reduce the maxima and minima, which would reduce the induced error.

To some extend, the results shown above may be counter-intuitive. Why do we get a directional measurement error even with completely random noise? The reason is simple - it's because we are specifically looking for the highest values. If there is a region where most values are accurate, but some are artificially high due to random noise, we will find this region.

But there's also lots of good news. First of all, the problem described above mostly affect 2 second data. Going to 10-second data reduces the error substantially - at least more than 2-fold (using basic probabilities), but typically even more, since a 10-second region is more likely to be surrounded by lower speed at both sides than a 2-second region is. The other good news is that preliminary data indicate that the GW60 GPS watch seems to be at least as accurate as the best previous GPS devices - but more user friendly. Let's hope that this can be confirmed in further testing!

Sunday, December 18, 2016

Foggy Goggles

According to the forecast, almost the entire USA was frozen this morning:
Even Texas got some sub-freezing temperatures. But the right coast got lucky: we had the warmest day in weeks, with temperatures in the mid-50s. And wind! So of course we had to go windsurfing.

SSW, wind around 30 mph, air temps at the water around 50ºF (10ºC), low tide - fun! No sun but also no rain, and the fog was weak enough to be ignored - we could see the shore almost the whole time. The water, though was cold. That could have been a good thing since I got quite warm in my Ianovated wetsuit whenever I managed not to fall for a while - except that my glasses completely fogged up every time I fell. "Completely" as in "I could not see a thing", which lasted for a couple of runs after each fall. Since I tend to fall every few runs, I had a problem! I actually saw a lot more when I took the glasses off, even though my prescription is not that weak (around -5).

I started wearing glasses or sunglasses when windsurfing earlier this year, after an eye doctor told me I have cataracts. Cataracts are strongly linked to UV exposure, of which we get plenty on the water, even on a cloudy day.  Sure, cataracts can easily be removed by surgery, but there's alway a remaining risk even in routine surgery; my grandmother actually died during cataract surgery. So I rather wear glasses with polycarbonate lenses that absorb more than 99% of the UV. But today, I discovered a new limit for glasses - once the water gets too cold, they become unusable. So I'll check out UV-absorbing contacts soon.

Back to contacts .. less than a year after not being able to use them (which led to the discovery of the cataracts). But the eye doctor had correctly diagnosed that the cause of my problems were dry eyes, a problem that I had not been aware of. I recently learned that dry eye problems are quite common if you work at a computer all day, since we blink a lot less when staring at a monitor. So I started using a little program that reminds me every few minutes, and my eyes have started to feel a lot better. The program I use is "Time Out", but there are many similar programs available.

But back to windsurfing. The lovely Nina was fully powered on her 4.2 m sail today, and worked on her Flakas. I saw one try that looked pretty good, but ended wet. Very wet, she said - lots of ice cold water got pushed into her hood, and did not want to come out again. After that, her tries were just a bit more hesitant. But it's just a few more weeks until she can practice in warm Texas waters!