Sailboat Support

Finally had wind for a change. Did a Auto mission around 14 marks on a pond in numeric order. Other than the sheets moving to fast when my max heel was reached, easily fixed, the boat did a great job I thought.

2 Likes

That’s really great. I hope you don’t mind, I blogged it on ArduPilot.org here. I’m happy to make any chances to the blog you’d like of course.

2 Likes

I’ve raised a pull-request to get the 2nd part of @iampete1’s sailboat support into master. This includes the ability to tack but is still missing a couple of less critical features:

  • tacking in Acro can only be done from an auxiliary switch. tacking (in acro) is aborted if the user provides any steering input
  • true wind speed and direction are always reported to the ground station. In iampete’s version the user can select which is sent using a parameter.

On the positive side though I think the calculation of the true windspeed and drection may be better - this is the key thing that I’d like to confirm. Because the true wind direction is so important, it’s possible that the tacking performance may be better. It will only be better though if a windspeed sensor is attached.

If anyone would like to give it a try before it’s in master that would be greatly appreciated, I’ve put a binary for a Pixhawk/Cube autopilot here.

A small word of warning is that the parameters have moved around so if you were using iampete1’s version please double check that the SAIL_ parameters are reasonable.

Here’s a video of it working in the simulator.

1 Like

My boat is being re rigged with heavier wire stays. I’m looking to add the wind speed sensor also in the next few days. I probably would not have time to test this until Sunday. And just to be clear on the wind speed sensor… The OUT and TEMP labelled on the sensor go to pin 13 and 14 on the Pixhawk ADC? I’m not sure what goes to what pin.

Yeah, out to pin 14 and temp to pin 13

2 Likes

Hi. Please add the ability to set the wind speed manually. Similar to how the wind direction is set through the transmitter thanks to the parameter “Wind vane sensor RC Input Channel”. In conditions when there are no sensors on the market that do not require serious manual revision, input through the transmitter would not be a bad alternative to the sensor.
It is also desirable to approximate the steering wheel taking into account the roll, the position of the sail and the speed of the boat. That is to take into account the property of the sailboat to boguing or to be bring to the wind with the coefficient for the catamaran.

1 Like

We could add setting the true wind speed from the transmitter, the code will work with no wind speed sensor at all, for slower craft this doesn’t make too much difference.

Not too sure what you mean for the steering? Do you mean so set the heading to the wind and keep the sail still? i.e. sailing to apparent wind angle rather than true wind angle. I have been thinking about this, but it would be tricky to include with the navigation code.

2 Likes

I like the idea of using perhaps channel 6 for adjusting the wind speed manually, because even the smallest sensors are too big for the MicroMagic class https://www.theamya.org/boats/micromagic/ where one would have to fight even to get the minimal things onboard :laughing:

I meant sailing to the visible wind, as they do on real yachts. Recalculation of the visible wind in the true wind will always give an error at small angles of attack.
When driving in tacking the sails chosen are tight. The steering is controlled to maintain the course as close to the tacking angle as possible without significant loss of speed (heuristic rule 1: sharp course is more important than speed).

But, when the speed drops, the drift increases and the actual path of the boat becomes noticeably larger than the angle of tacking, and it will not be noticeable on the weather vane! The influence of this factor is amplified when the wind gets stronger. In addition, with further strengthening of the wind, the roll increases, hence the effective area of the sails decreases and the drift increases even more

If it is impossible to visually determine that the sails are winded and lost traction, the most important indicator of this is the Roll. Given the above, the Roll should be within certain limits for a certain wind force.

Actually my wind vane and Bourne pot weighs almost 3 oz… It needs to be this large to function some what properly as I have not removed the grease from the pot. I’m very pleased with it because it gives me repeatable accurate wind direction in a bench testing situation. However, even with my EC 12 the 3 oz. of weight 5 feet above the center of gravity of a 24 pound boat is making the boat more tender in the water. Carrying this kind of weight aloft on the mast head will certainly be a challenge for an IOM or Thunder Tiger boat like Randy has and make the boat not sail as well as designed.

So you want to change the Maximum Heel angle based on wind speed?

Drift doesn’t just depend on wind speed. Still depends on the displacement of the boat, the size of the keel and much more. But on any yacht all the dependencies can be reduced to two-Wind and Roll!

ah, I think I understand.

For calculation of the true wind angle and speed the vehicles velocity vector is used so this will take into account any side slip.

Your suggesting to monitor the roll angle as a way to try and check if the sails are filling or not, and to check the side slip to see if we are too tight to the wind.

These situations are very tricky for the autopilot to spot, just as arduplane stall prevention has to be very conservative. Also they have to be written such that they will apply to any sailing vehicle in any conditions.

The longer term plan is to define a polar the boat will sail to. This would allow the boat to sail at the best true wind angle for each wind speed and this would hopefully avoid any issues with too much side slip. The polar would give the ideal heal angle for each wind speed and heading.

Hopefully we can add a auto tune style optimization algorithm to generate this polar on board.

1 Like

Thanks. No big trouble, let’s wait.
I just don’t know what means “a polar the boat”

It a record of the best boat speed at a given true wind speed and direction, see http://www.ockam.com/2013/06/03/what-are-polars/

This allows selection for the best heading to more towards your destination as fast as possible.

Polars, of course, it’s cool.
But they must be calculated separately for each boat and separately for the storm sail.
How many races do you need to make to have enough material for their calculations?
If in another place there will be a significant flow of water, then Polars will be incorrect?
Taking into account the angle of the roll, you can optimize the course in the first race


Even if you go by the tables of Polaris, it is necessary to align the boat.

I was thinking that you would run a auto tune style mode for abit, probably 30 mins or so for a couple of different wind speeds. The boat would then use a maximizing algorithm to optimize its speed for each heading, the best speed would then be recorded as a point the polar. We would also record the heel angle this speed is reached at. As you say it would take some time to build a full polar for each boat as I guess we would have to average boat speed over tens of seconds to get a reliable reading. As you say if there is flow they will be wrong, but until we support a direct boat speed sensor we cannot tell if there is any flow in any case.

The advantage of the polar is you can use it to select tacking angles for best VMG.

I am not familiar with your roll based method, do you have any more information? I guess it is a method to optimize boat speed on a single heading rather than picking the heading in the first place? It would be nice to support vehicles with movable ballast, it sounds like this roll method may not apply in this case as the boat would always be upright?

2 Likes

My roll based method of determining the course is purely empirical (informal ). Based on personal experience sailing without any navigation equipment, only windvane. Always choose a course with a minimum angle to the apparent wind. When the speed falls and the roll (“heel angle”) is large, then slightly increase the angle. So constantly lie on the steering wheel and keep in mind: a sharp course is more important than speed

2 Likes

But at the same time speed is needed to complete a tack and not get locked up in irons. It’s all about VMG but when its time to tack often a boat will fall off the wind a bit to build up speed and then tack.