by Vin Mariani
[Note: This article was originally posted January 25, 2008
by Vin Mariani on SLSailing.com. Although it is five years old,
the information in the article (and in the subsequent “Part II“)
still applies to many SL boats that have wind algorithms
based on Kanker Greenacre’s original Tako scripts. /JFos]
Several weeks ago a group of us were sitting around the table on the terrace of Nantucket Yacht Club, knocking back a few and talking about the wind. Jane Fossett asked, “do all boats in a given race feel the same variation of wind at the same time?” A simple question, yet a critical one, as the answer tells us whether winning races is a matter of randomness or of skill. We all want to believe it is skill, don’t we? But if I experience a different wind variation in a race from my competitors, I can always say, “you won because you happened to get better wind than me, this time.” But if we all experienced identical wind fluctuations during the race, then I must admit, “you made more skillful use of that wind than I did.” So Jane’s question is central to the meaning of sailboat racing in SL. We had better hope that all racers experience the same wind variations, or winning a race would be pretty much just a roll of the dice.
We already know that wind variations affect hot lap times. The variation adds a random factor that can only be overcome by persistent repetition, or by setting the wind variations to zero. But, is the order of race results also affected by wind variation? The more we talked about the subject, the more questions we uncovered. Turns out, we don’t really know much about the wind at all. So I decided to study the subject intensively and see how much I could learn. This article presents the results of an investigation into how race wind works in detail. It’s surprising how much we CAN know about the wind. I’ll present the answers to all of the following questions. If you think you understand the wind already, you can consider this a quiz.
- Once a boat gets its wind parameters from a windsetter, how does it still know the “current wind” when it is far, far away from the windsetter?
- Jane’s question: in a race, do all boats of a type feel the exact same wind variation at the same time? (Are they lifted and headed together?)
- Even if they are in different sims?
- Do different types of sailboats in the same race feel the very same wind variation as each other? Or does the wind depend on the type of boat?
- Does the wind vary from place to place at a given time, the way that it does in RL?
- Does the wind change when you cross a sim boundary?
- Does the wind have any day/night variation, the way it does in RL?
- Wind speed and direction are seen to occasionally deviate by more than the +- parameter values; how much does it really vary?
- Can we know the entire wind variation in advance?
- Would knowing it affect racing or hot laps?
- Each boat that can use race wind carries two internal functions inside its scripts that can tell that boat the exact wind speed and direction whenever the boat “asks”. These two functions trace back in time at least to Kanker Greenacre’s Tako version 2.1 scripts, (which can be found on the LSL Wiki, a repository for scripting knowledge). Here is Kanker’s original code fragment:
In case you find the scripting opaque, here are the functions themselves, pretty-printed for clarity:
The specific outputs of these two functions depend on the five wind parameters, which are shown in red. Once those five parameters have been received by the boat, that boat’s wind functions will then proceed to vary only as a function of SL time, wherever the boat goes. At the default rate of 1.0, the variation repeats itself every 24 minutes, all day long. Below are plots of the variations over one cycle, using the particular wind parameters of the NYC race line (spd = 11, dir = 5, spd+- = 3, dir+- = 15, rate = 1.0). The basic curve shapes would always be the same at other race locations, although the axes scales would depend on the five parameters of the local windsetter.
Although these two plots “tell the whole story” I find it hard to relate speed and direction to one another. What I would like to see is both speed and direction on the same plot. Rather than try a 3-dimensional plot, which can be very hard to visualize, I made a polar plot of just direction and strength, where time is only implied. In the plot below, the instantaneous wind wanders slowly along the curve over time, leaving a blue dot every 15 seconds. The average wind of 11 m/s coming from 5° is marked as a big green dot in the center. Note that in SL, 0° is due East, not due North, as we might expect.
Here we can see that the wind wiggles around the average with many small deviations, and it has a few rare larger deviations, like real wind does. And the variations are complicated enough that you probably would never notice a pattern. But shown like this, my mind sees a butterfly in the red Rorschach blot. Nice work, Kanker.
This is a good place to stop for a rest. We still have nine more questions to answer and, although the answers will be brief, this article is plenty long already.
To be continued. Questions are welcomed, but first check to see if I’ve already promised to answer that question in Part 2. If your brain is full, go sailing.