Common Sense
It has been decided by those on a higher paygrade than I that for the initial prototype, I will restrict myself to acquiring two types of environmental data only: Relative wind velocity and Vessel velocity.
First off, I need to determine wind velocity. I am tackling this first because it is considerably more difficult to discern than the velocity of the vessel. Of course, velocity is a vector and is made of two distinct pieces of information: direction and magnitude, so there is in effect two sensors required for this task.
An anemometer, of either the cup-on-stalks variety or the proppeller variety, and a weather vane, to determine the wind speed.
I have been advised to only (if possible) take into account off-the-shelf components for this build, as they would be significantly sturdier than any hardware that I, a computer science student, could put together. However, as commercial anemometers are quite expensive, it is likely that the engineers involved in this project will be respeonsible for the construction of a custom anemometer. It’s interface remains to be seen.
In order to determine the yacht’s velocity, I feel that a GPS reciever would be the ideal option, as it would allow accurate tracking of relative positions of waypoints and course logging as well as basic velocity information. By reading successive GPS co-ordinates, a bearing can ascertained. Driection by:
tan(Angle) = (currX-lastX)/(currY-lastY)
Speed by:
(((currX-lastX)^2 + (currY-lastY)^2))^(1/2)
Reading in the GPS co-ordinates from serial should not be difficult, depending on the platform chosen.
For the basic prototype, however, it is likely only a magnetometer will be available. This will mean I will be able to discern magnetic north. By knowing magnetic north, and relative wind velocity, it should be possible to set the rudder and sails so as to set the boat on a specific bearing.
Here is some very simple code to set the angle of the boom. Let alpha be the relative angle of the wind and setBoomAngle to be a function which sets the angle of the boom relative to the boat (where 0 is the boom parallel to the boat, postive is to port and negative is to starboard).
if (45 < alpha < 180) setBoomAngle((alpha-45)*1.5);
else if (180 <= alpha <315) setBoomAngle((alpha-315)*1.5);
By using the rudder to steer onto a magnetic bearing and the above algorithm to set the sails, basic navigation should be attainable. A special case must be implemented to avoid the deadzone (which is 45 degrees either side of the wind direction) and to tack (or zig-zag upwind) towards any bearing in the deadzone.

The Points of Sail with the resultant boom angles from the pseudo-code snippet above.
The maths of the above is subject to confimation, and is based upon my trusty RYA notebook from when I was a budding sailor. The basis for the formula is that at close haul, the sail should be as close to parallel to the boat’s bearing as possible and when running the sail should be perpindicular to the bearing.
I’ll need to invest further study into this to ensure plane sailing (pun intended) - D.N.T. (14/10/08)
No comments yet.