Sailboat Support

Yes, just to track boat speed vs wind speed, heading and apparent wind angle. All the steering and sail controls will be done via real life FPV…eg, people on the boat :slight_smile: And this is purely for amusement. Basically Mission Planner will be attached to the flight controller via Wifi telemetry or just a USB cord, making a tablet or small netbook into a chartplotter/data logger.

-P

Second sailing session today :grinning:
I spend some 3 hours fiddling with settings before sorted most out and could get some time in the water before the wind totally died out after 6 pm.
No video this time. These are smaller things and likely I will figure them out but comments are welcome.

  1. I noticed often when starting up the boat after some days the flightcontroller is reset to default setting and have forgotten all my settings. I really do not know what causes this but will pay more attention.

  2. Then I try loading settings file from disk that I saved last time all was fine. However, that brings most parameters back to what I set but not all. One parameter I specially notice is not set is the WINDVN_SPEED_TYPE, this is usually back to 0, but it should be 3 RPM library. I am pretty sure I have saved it many times to disk but it will be reset to 0 when loaded.

  3. Many time the Wind direction is bouncing around, is off and needs recalibration when I start rigging the boat. Today I noticed that unless I also assemble the wind speed cup instrument, the wind direction will not show a stable value. I think its because these two instruments share a ground wire, so I could make one less wire from the rigg all the way to under deck where the flight controller is located. When both are assembled, both works okay. This lesson will save lots time in future.

  4. I checked and confirmed that in Acro mode, flightcontroller compensation is correct if a sudden shift to the right boat tries to give left rudder. Also sheeting is correct when wind direction changes, as is the sheeting out when keeling is over limits. In Manual mode when I control the rudder directly, it steers correctly to right and left. BUT the odd thing, when in Acro mode the rudder is opposite, so if I give go right rudder, the boat will turn left. A bit unexpected :slight_smile:
    I need to correct this, but keep the Manual rudder behavior as is and also keep the compensation from flight controller when in Acro mode.

Thanks

#4. try reversing the steering in your transmitter and RC in for the same channel.

1 Like

There was a issue on master that would cause this, it has now been fixed, so to get rid of it you can load the latest firmware. That issue has been fixed but there maybe some new ones.

This is due to setting enable parameters. So it has to set WINDVN_TYPE to something other than zero and reload the parameters before it will see the rest of the WINDVN_ params. The trick is to load from disk, reload parameters and load in from disk again. Then reboot and use the compare tool to double check everything has been set.

As David says for number 4 it is mostly likely transmitter and RC output reversed. You can check the RC inputs are correct in the mission planner RC input tab, all the green bars should move the same way as the sticks (except pitch but you don’t need that on rover)

1 Like

All items solved :slight_smile:

  1. Upgraded okay. Now just hope it does not revert to defaults anymore.
  2. I understand. Make sense. Will load 2 times then reboot.
  3. Just lesson learned.
  4. Yes, now rudder works in all modes and also compensates correctly in Acro.

Thank you both.

1 Like

I am pleased to report I have been given a GSoC project this year to carry on my work on sailboats. So hopefully there will be some improvements coming this summer. More info here:

So if you have any ideas or feature requests, now is the time, I will add them to my list.

1 Like

That is so great Peter!
At the moment the sailboat do not support Smart RTL Mode right?
I am sailing in to small bays and if RTL is entered as failsafe it will be bad to going home just using straight line…

I think Smart RTL should work although I haven’t tested it, i will test soon and report back.

2 Likes

I did an Autonomous mission around a pond 12 or 13 times IIRC. Total distance was like 6 KM according to mission planner. Only problem I had was failed tacks due to wind shifts. I also had a max cross track set at 10 meters so I would not run into shore. Not bad for the early sailboat code.

2 Likes

I have been thinking about how to best deal with this, I think a turning rate to boat speed at start of tack parameter. So if your going slowly it will turn slowly. Maybe also disable the turning integrator. And for bearing away I think the solution is to set the sail for the target heading rather than the current one. So it would let the sail out first then turn rather than trying to do it all at once, maybe have a wind speed threshold where it does this, no point in light wind.

setting the sail to the target heading first is smart, it will reduce weather helm and make the steering easier. For boats with two sails, differential sheeting between the forward and aft sail can help bring the boat around for tacking and jybing. In sailing school they would do an exercise on light wind days where the instructors fix the rudder in the middle, and then students have to use sail and boat heel only to drive. Frustrating and fun day.

I’m tempted to get a yacht and follow along: a couple of decades ago, as a young midshipman, I learned “blind pilotage” on a twin masted Ketch. Two masts, a chart, a compass, an echo sounder, and a speed log. And a curtain across the cockpit/bridge.
A challenging, but achievable, navigation exercise for a 19 yr old. It would be great to see ArduPilot do the same.
(caveat: these days I’m an Aerospace Engineer. It’s been a long time…)

2 Likes

Peter, for the point #1, the support for commercially available wind instruments that can be installed at mast top, I have two thoughts (you probably got them covered):

. some of these wind instruments also have a compass included, it would be great to get access to that data in a plug and play way, since in a limited water proof box on board, there is so many items disturbing the standard compass in the flight controller.

. When implementing the (true) wind speed usage,
(currently it is mostly used to shut down trust of wind direction data when speed is too low? but for using Polars it will have much more impact on auto sail operations),
just consider that a boat can move faster than the wind speed, especially for an ice sailer that normally travels at 3-4 times the true wind speed.
I hope to build an ice sailer and use the same fine software :slight_smile:

The only problem with commercial wind instruments is the weight. They will be good for a custom built hull ballasted properly. Even my EC 12 behaves differently with just and extra 3 oz. of equipment up on the mast. I do love the idea of hardsails with an elevator and the ability to motorsail.

Hm yes, weight is important when sitting on mast top.
Mine is now 1.9 oz (55 gram) that’s a cup anemometer only. I can not sense a difference with or without it. But the sexy accurate one with wind vane, anemometer, solar power, thermometer, gyroscope, accelerometer and wireless is 4.8 oz (135 gram). Thats really a light weight unit, but would start to matter. 3 oz is only 85 gram.

I hope to be getting one of these to add support for.

https://calypsoinstruments.com/shop/product/ultrasonic-wired-standard-81

The more expensive ones have more sensors but the update rate is very slow for them. The gyro and accelerometer is 8hz, the ones on the flight controller run at up to 8khz (i think). So that is not all that useful. Temp sensor might be nice for logging i guess, but not a huge deal.

The wireless could be useful and that model has a better water proof rating but I think on the whole the wired version is the best for our application.

I will also try and get my hands on some mast head units for yacht. I think they are probably already supported with the cups anemometer and analogue voltage wind vane but it would be nice to document one for the wiki.

1 Like

After 3rd sailing I could not figure out why the Acro mode behaved so strange.
Then I notice that the wind vane works fine as long as the boat is not armed. But as soon as it is armed, the direction changes to something else and stays there, no matter how the wind vane is pointed.
As soon as disarming, the wind vane change back to correct value and is changing when moved around :astonished:
How can arming have anything to do with the wind vane?
Since it uses analog pin 11 that per default is used for Battery current sensor, I disabled the whole battery sensor. But that had no effect.
Any ideas?

hum, this is very strange, did you get the SD card setup in the end? if that working a data flash log would help diagnose, otherwise a tlog from mission planner.

Still struggling go get logs on the SD card. The unit is connected to the correct pins now and a suitable card formatted as recommended but there are so many LOG parameters to set I don’t understand yet. I have an arming check for Logging and that fails always.
Attached is a tlog file from today.
I armed and disarmed two times.
When disarmed the wind direction is around 2-4 degrees and when armed it moves to around 112 -116 degrees.
2019-05-19 11-34-34.tlog (477.8 KB)

looks like this is due to the inertial navigation system. Because you have no GPS fix it falls back to trying to calculate its velocity using its accelerometers. It only bothers to do this when is armed. If you look at the ground speed you will see it also jump.

Then because there is some ground speed and you have a wind speed sensor (although none of the speed prams showed up in the log for some reason) it does apparent wind calcs. The wind speed is reading zero so the wind direction changes a lot.

So if you have a GPS fix and/or some wind speed this effect would be very small. Because either the ground speed is correct with gps or the wind speed is much larger then the incorrect ground speed.