Sailboat Support

@rmackay9 thanks for making it run!, looks like I put the parameters in the wrong place? I attempted cherry picking but it went abit wrong I think because you had re-based and I haven’t, I attempted a rebase but ended up just opening a new pull request.

I have now got the acro code working for the heading and pwm wind-vane types. It performs exactly as expected on the stand, unfortunately not had time to go and test it out today, should be able to try it out tomorrow. The only change from before is that now it sheets out all the way when disarmed, this also meant I had to swap the way the throttle controls the sail in manual. Now minimum throttle is sheet fully out (@David_Boulanger is this the convention?) otherwise you end up sheeting in all the way when you want to be slowing down to disarm and when you arm the sail has to traverse from full out to fully in.

as for the analog potentiometer wind vane I haven’t got much further than buying the potentiometer, I got this one https://uk.rs-online.com/web/p/products/6930746/ . It has a fantastically smooth action but does take quite abit of force to turn, I guess we will have to use quite a large ‘flag’ to get it to move in light wind. I found this design and the plan is to adapt it https://www.thingiverse.com/thing:952978 I think i will try and make it abit smaller and mount it on a something at the front of the boat and see how we go from there.

1 Like

Left stick down is usually sheeted in full. left up is sheeted out. If disarmed the sheets should be out I think. So manual sheeting as you have it is kind of backwards. As this code matures I can’t think anyone would have a problem with the sheeting being backwards to start with.

1 Like

Thanks, I think that way is more intuitive, pulling the stick is the equivalent of pulling the rope, I guess we could swap it back and use a switch or hold mode disarm to avoid having to be sheeted in to disarm. Or in the longer term it would probably be a good idea to add separate sheet channel rather than just using the throttle input, i guess people may have motors and sails in which case using the throttle input for sails wouldn’t work.

1 Like

In my opinion if your using a sailboat the throttle input should be the sail sheeting. If you have motors on the boat also that should be an auxiliary channel. When Motor sailing skippers often set the motor at a low speed and trim the sails to go along the course. If this is code for sailing vessels then the use of motors should be on a separate channel. My opinion.

Completely agree.

We should adopt what are the current practices.

1 Like

This is not an easy job to accomplish.

Unfortunately not enough wind for testing today :frowning:

I have had a chance to do some more work on the code and wind-vane sensor instead. The code is now set up to do auto mode in a fairly basic way, I think it should be good enough to get stated with hopefully.

I was thinking about the wind vane design and the one I had planed to base my design on turned out to be 20cm long with the ‘flag’ 20cm tall this would have been nearly as big a the jib! So I decided to take my potentiometer apart to try and reduce the force needed to turn it. I found the fantastically smooth action was due to a sort of wiper pumping round a load of grease inside.

I tried cutting the wiper off to remove the pumping action but ended up just removing all the grease. Now with a spray of WD40 it spins much more freely. I have printed a mount to attach to the pot to the deck and the new plan to make as big a ‘flag’ as will fit without hitting the jib, probably out of foam board.

Then I think the best thing to do is just go and try it on the water.

ps, I also swapped the throttle control back so stick down is sheet in.

1 Like

That’s looking good!

Managed to do some proper testing today and a little work on the code.

Unfortunately my telemetry radio still hasn’t arrived so I took a wifi telemetry unit off a copter. I set this up using the same serial parameters as I have on copter and plane but it wouldn’t load the parameters. It connects fine and shows the HUD and location but won’t load the parameters, I have tried a few different baud rates but no luck. So I have frsky pasthrough telem that only works when disarmed and wifi telem that wont load parameters. Due to this I was unable to do any on the water tuning up. Any idea whats at the root of these weird telemetry issues?

Apart from those problems the new code worked quite well, the steering controller does a good job of keeping it in a straight line on all points of sail, it does have a tendency to tack round quite far but I think this is mostly due to me holding the stick over as you would in manual the target heading then ends up too far round. I think its the slowing right down as it goes trough the wind, then suddenly the sail fills and its off again, it takes a while to get sorted on the new tack. I expect a tune up of parameters would solve this but I was unable to do any tuning up. The auto sail setting worked OK, it was abit tricky on my small bit of water as the wind was quite shifty. I had it set up so the transmitter knob allows you to offset the home heading by ± 180 deg. This adjustment is so course its impossible to set it correctly, I have changed it to ± 45 deg, I think this should be plenty for most situations and will allow much finer control. The sail setting is still a bit hit and miss, but i’m not sure we can get much better without the proper wind vane. A steady wind and a tune up of the ideal sail angle parameter should help though.

Then I went on to try a downwind auto mission, this worked well no problems at all except some of the legs were abit too tight to the wind, again the controller could probably do with a tune up.


This map seems to have lost the first and last waypoints for some reason.

Hopefully tomorrow I can get the wind vane fitted and try out my new upwind sailing auto code.

1 Like

Nice video. Although the wind was calm, and it is hard to tell by the video, the sails look to flat. You may want to ease the outhaul to create about 25 - 30mm of a belly in the sails. They just looked stretched to tight with no Camber/ Draft in them at all. These little boats are sensitive to improperly " tuned " sails and you may see a big performance/ handling improvement. Notice the belly in the sails of 95 and 77.
Version:1.0 StartHTML:000000275 EndHTML:000652613 StartFragment:000652060 EndFragment:000652439 StartSelection:000652060 EndSelection:000652439 SourceURL:https://onedrive.live.com/?cid=C359165FD8509D0A&id=C359165FD8509D0A!23023&parId=C359165FD8509D0A!996&o=OneUp

@David_Boulanger Yeah your right, the whole rig is badly setup at the moment, I haven’t had time to do it properly.

I have found a issue with having zero throttle being sheets fully in, I keep accidentally disarming when tacking upwind in manual, I cant think of any way to get round this except changing the stick arming method, I guess if we add a separate sail input then we can put the throttle on the right stick and only use it for arming.

I manged to get the bottom of the frsky-telem not working. It turns out that logging to the SD card some how disables it, with logging turned off it works fine all the time. I saw some reports of bad SD cards causing this but the logs from yesterday seem perfect, I have tried a formatting and different SD cards with the same result, I guess is just F405-wing issue. So I have no logs from today’s testing.

I have installed the wind vane and it works perfectly! Setting up the parameters didn’t take to long although turning the boat round with the USB plugged in did cause me to half rip off the USB header so hopefully my proper telemetry shows up tomorrow and works better than the WiFi one. I also ran into another f405-wing issue, the analog input doesn’t work unless you disable the battery monitor. Not sure why this is as the RSSI library reads it fine and as the new library is based on that I would think it would also work, not too sure whats going on, I tried changing the RSSI to a different pin even though its disabled, at least it seams someone else has this issue too https://github.com/ArduPilot/ardupilot/issues/8920.

Then I went and did some more auto testing this time with the upwind code. The wind vane defiantly works better than the constant wind direction, although it probably helped that the wind was abit less shifty. It worked well in the stronger winds but did get stuck in the lighter bits. I ended up making a in the field extension.

Now is proven to work I will do a more permanent flag, I think just the more area the better, possibly raising it up would help too. I wanted to avoid having delicate bits sticking out all over the place, it only just fits in the car as it is.

I set up a basic 2 waypoint mission one upwind and one downwind followed by a RTL. It tacks upwind fine it tacks about every 6 foot though. I must have made a error somewhere in the code. I wondered if the sticky wind-vane was causing it to think the wind was changing direction so it would tack back but the quick tacking persisted with the constant wind heading setting.

This vid is 50% auto mode and 50% me taking over in acro to avoid boats and banks and things, I wonder if object avoidance would work…

4 Likes

This is great that things are progressing. Have you sailed RC Sailboats before? I have some other input but I don’t want to sound like a know it all because I am not. I just happen to sail these things competitively. I will watch the video again a few times. Some of the sail trim is a bit off to me on the first watch of the video. Again, I don’t want to sound like I’m the RC Sailing King, thanks for all this effort. The way I see it the better the boat is set up the better the code will work.

2 Likes

not RC, but lots of dingy sailing, I’m glad of the feedback, my rig is raked too far back I think at the moment? The sails are a bit of a botch job and don’t set very well. Once the code is broadly working well we can get the fine trim stuff sorted hopefully. Probably some of it could be tuned with the existing parameters but its too much effort without my telemetry working properly. It would be great if you could do some testing on one of your sailboats, I can compile the firmware for your hardware.

1 Like

Pete,

This is really fantastic progress! I wonder if you’d want to do a blog post? Basically it’s just the same as a discussion but set the category to “Blog” and also put the video right at the very top of the input box. If that’s too much of a pain I can copy-paste some of the important bits you’ve said above and blog it for you.

I would be happy do a blog post, hopefully in a day or two I can have auto working better and do a nicer vid without me having to take over to doge obstacles. Hopefully my telemetry will turn up, although I am considering swapping to a pixhawk lite to get around all these odd issues I’m having with the f405 wing, I will need another analog input too when this wind sensor turns up.

I have this EC12 to repurpose. I don’t sail it competitively anymore. I have a spare Pixhawk 1, Telemetry, GPS and all cables. The wind vane concerns me a bit.https://1drv.ms/u/s!AmAOYZwlkjMthVSFF7PuIeL1eRTD

3 Likes

Lots of room for all sorts of goodies. Options are endless.

https://1drv.ms/u/s!AmAOYZwlkjMthVWkwDHmdPRGAfmy

2 Likes

That’s a beautiful boat…

I’ve gone ahead and ordered the same Modern Device wind sensor and Bourns Continuous Potentiometer as mentioned above.

1 Like

The wind sensor is very interesting. I never thought of measuring wind speed in this way.