Five Degrees of Wrong.

by Dermot Tynan in Microtransat


Posted on Saturday, March 16, 2013 at 08:00

Ff058aa1 1b99 461b b831 65302ffb16de
Google Earth Track


So, as I mentioned, the virtual boat was too eager to tack. If you're dead downwind of the mark, and you set off on a starboard tack, within a metre of being on the left-hand side of the course, the other tack is favoured.

I added code that essentially stated "unless the other tack is at least five degrees better than the existing one, ignore it." So, if I'm at 44 degrees TWA and the other tack is better by a degree (-43 say), stay where you are. This works quite nicely. If you look at the plotted course, it shows the boat sailing nice upwind legs, to the waypoint. As Henry would say, "it's sailing up the ladder."

Without that little extra piece of code, it would tack repeatedly, attempting to sail directly upwind by constantly tacking. A strategy that's doomed to fail because tacking slows the boat down, and isn't something you should do too often.

All looked fine until I noticed that on long legs, it was tacking quite a long way off course. When the leg was on the order of 1,000 nautical miles, it might sail to the left or right by up to 500 or 600 miles, before tacking back. That's to be expected, because over a longer distance, it takes a lot to get an opposing angle better than five degrees. That problem is easily resolved by adding more waypoints, and keeping the leg distance on the order of 100 nautical miles. I may still do that, to avoid the boat making too many grand gestures in terms of ideal course.

However, I also set up a short, "olympic" course as a test. Each leg was approximately one nautical mile. Interestingly, I set the granularity for updates to be too high. When the boat reached the upwind mark, it needed to bear away onto a reach to find the mark, as it had overstood the mark by a considerable factor. Again, this was due to the low granularity of the simulation. By checking every virtual minute, the boat would have covered less distance. When the boat took off on a beam reach (port tack) heading due east to find the mark, it again overshot the target. However, it took about two hundred miles before it corrected the error!

You can see why, right? The boat is on a -90 TWA, in other words, it's keeping the wind at 90 degrees to the boat on the port side. As the wind is coming from the North, this means it's heading East. The absolute best TWA is in fact +90, or due West. Anything else makes no sense. However, there is no difference between the tacks, according to the modified algorithm. So it just keeps sailing East. Eventually, due to the curvature of the earth, and somewhere off the coast of Holland, the angle was such that the opposite tack was now more than 5 degrees different, and the boat turned around.

No score then, for that modification. Not good!

I'm coming around to my original calculation about the best TWA needs to be adjusted for the tack.

We can denote the tack by one of -1 for a port tack and +1 for a starboard tack. If we know what tack we're on currently, and we know the proposed TWA, we can compute the new tack and multiply them by each other. If the proposed tack is the same as the current tack, we'll get a +1, if they're opposite tacks, we'll get -1. We'll call this the tack-error, for the sake of it. Easy peasy!

So, the speed S then is something like S + (S*te)/10.

What we're doing is in the case of an opposing tack, we're subtracting 10% of the polar speed. In the case of the same tack, we're adding 10%. In this way, if the current tack we're on is no good (as in, we're sailing due East away from the mark), we'll tack around because even with the 10% penalty applied to the opposing tack, the speed is worth it.

I haven't tried this in simulations yet, and I'll let you know how I get on.

It doesn't address the issue of sailing off on a long leg, but more waypoints are the best solution to that issue.

I'm also curious how it handles the boat close to a mark or waypoint.

We'll find out, I guess!


Search
Current Missions
Recent Posts
Blog Categories