Sailboat Support

I’d be very much interested in support for nmea0183 sensors. I have an airmar sitting around that would work great on a bigger sailboat, the one I have would probably be too small.

I think with some wind and gps lock the issue will be completely fixed

The ultrasonic sensor I am adding a driver for uses nmea0183, so my understanding is that if I can get that working then all nmea0183 sensors will work, so long as they do not use proprietary messages. (and even then if you have a sensor that we can find some documentation for and don’t mind doing a bit of testing I’m sure we could get it working)

1 Like

@iampete, regards to mount wind vanes at top of mast, I just realized that your sailboat has a fixed mast right? Thats unlike for example the Laser where the mast is moving around with the boom. Typically from 0 to 90 degrees measured from centerline off the boat. So, unless there is some clever code to handle this I will still need to mount the instrument on a fixed point most likely a pole on the front deck. For a wind foil profile, I think they will also move with the wind and have same problem. What do you think?

Your right, currently there is no way to compensate for the mast moving, the wind vane has to be fixed relative to the boat.

1 Like

I have the wind vain set up for testing! The readings have some error but I have not set the dead zone. In Mission Planner, when I set the CAL parameter to 1, I don’t get a pop up for the calibration procedure. I turned the vain for 30sec after setting the CAL flag thinking maybe it was leaning despite not seeing a pop-up. Any ideas?

We don’t get fancy popups, look in the messages tab on the main mission planner screen. If you reload the parameters you should see that the min and max voltage has been set.

I see, you are absolutely right. The wiki says “a message will appear” and I inferred pop-up. I saw that there were min max values but wasn’t observant enough before hand to know if they had changed.

Hi Pete,

We found that our wind direction issue was due to a bad gps signal (wind direction values were fluctuating when the gps was plugged in, but worked well when the gps was unplugged/had proper signal).

We are pleased to report that we were able to complete a few initial sailing tests in auto mode. Everything appeared to work well – the boat tacked as expected and sailed to all waypoints successfully. One issue we noticed was that when there was no strong wind, the wind vane direction would not adapt to light gusts, and the boat would not head in the right direction; however, the boat eventually found its way.

Attached are logs of two of our tests from that day. Looking at the logs, it appears as if there were some errors, possibly with the GPS signal. We were wondering whether this would interfere with the boat speed data we obtained from the tests.

Thank you for your help!

Uploading: 2019-05-21 18-03-36.log…

great! sounds like its working well, there is a low wind cut off parameter for the windvane, possibly this will help in very light winds.

GPS velocity errors can cause the wind vane issues, maybe I can do some more checks in the windvane library to try and reduce this.

Your logs didn’t make it.

Would be great to have some pics of your boat and windvane, and maybe a diagram of how the windvane is wired up for the wiki!

Okay we’ll be sure to take the GPS velocity into account and check the windvane library.

The log files won’t seem to attach to the forum, but here is a screenshot of the auto-analysis of our test. It looks like there are some errors/warnings with the GPS and compass. We are using a Here 2 GPS system with our Pixhawk Cube and it is stored within the cavity of the boat, beneath a watertight cap. Could this method of storing be interfering with our signal? The logs show that the signal bounced our location, such that the current positioning is not always accurate. We were able to filter these out in Google Earth, however. We were wondering if there is also a way to filter out the bad signal in our GPS speed data. A screenshot of this is attached as well.

As for our setup, we are using a standard RC Laser sailboat and our anemometer (Davis anemometer) is attached with a 3D printed mount, as shown. A rough version of our wiring diagram is also attached.


The gps and compass dont seem happy. I have always found the Here2 to be very good. Maybe it does’t like being down in the hull. On my boat the gps is mounted at deck level. Also I wonder if the boom sweeping over is confusing the compass, although its not magnetic I guess.

GPS’s and compassed want to be as far way from metal stuff and power electronics (servos motors, telem ect) as possible. 10cm or so should be fine.

I’m building my test setup by just placing the flight controller, GPS, wind vane and anemometer on foam board.

  1. Is there a way to display apparent wind angle in the quick display instead of the corrected absolute wind angle? I did not see it in the params list

  2. My windvane seems to have 10 degrees of error, smoothly interpolated across the whole range. What I mean by that, is at 0 it has no error, at 90 degrees actual, it reads 80, at 180 it reads 173, 270 265 and by 360 the error is back to zero. Is this the kind of error that the high resistance pull down resistor will fix? Low pass filter? Dead zone? To me this seemed like a dead zone error in that it’s not starting to detect direction change until about 10 degrees of displacement however that did not seem to fix it.

OK, i answered my 2nd question. Sometimes writing the question helps. This is simply the dead zone. My vane has a 10 degree dead zone, that is from 0 to 10. So I needed to set dead zone and offset both at 10. Now my wind vane seems to have maybe 2 degree accuracy. Good enough for me! And since apparent wind will never be tighter than 10 degrees i’m not worried about it at all.

I had this in my dev version, it was useful for setup, I will add it in again. We now have a SAIL_ENABLE param that hides all our sailboat params for most users, this means we can add more specialist parameters back in.

Hi all, this is a bit of a update on the GSoC project.

I have done a fair bit of work on restructuring of code so far. The first task was to move the Sailboat functionality to its own class within the code. This means there is now a SAIL_ENABLE parameter, you have to enable sailboat before the rest of the parameters will show up. This gives us a bit more freedom to add parameters without giving the normal rover users loads of stuff they don’t need. The second change was to split up the wind vane library. This split gives a generic back-end template that will make adding more sensor types much easier in the future. There should (hopefully) be no functionality changes from these code improvements.

The new wind vane library allowed me to implement a driver for NMEA wind vanes. I have tested it with Calypso wired ultrasonic unit although any NMEA 0183 units using the MWV message should also work. I have just finished mounting it to my testing boat. This will he a huge improvement over the potentiometer wind vane I was using previously.

I have also spent some time adding support for ‘motor sailing’. That is a sailboat with both a motor and sail. The code will decide whether or not it should use the motor based on a wind speed threshold. I have also added a three possision switch RC_OPTION. This allows the user to select 1. never use motor, 2. motor enabled (ie the code decides) 3. force motor. This give the ability to do a standard rover loiter for example. To test this I plan to fit a air propeller to the back of the boat with a BL_Heli ESC that supports reversing. Not the most elegant of solutions but much easier than retro fitting a water propeller.

The code tidy ups have already made it into master so can be tested here. If anyone fancy’s testing NMEA wind vanes and/or the motor sailing functionality I can build custom firmware. Hope fully that will also make it into master over the next week or two. I should give the standard disclaimer about using none-stable release code, might do funny stuff and behave in unexpected ways ect…

The next job is wing sails, like this, does anyone have one? I don’t have and hardware to test with, and havent been able to find anywhere you can buy them. (I would quite like to build one but its not Google Summer of Building Hardware unfortunately, but we will see how we go)

2 Likes

Wow you have really been busy :smiley:
I am really interested in the calypso wind vane. How many, and what kind of pins does the cables connect to on the controller? Two analog pins?

For the wing sail, I will see if I can find something available that can fit a Laser.
Keep it up!

Hello Laser users :slight_smile:
What is that sticking down in the water from front and aft bleu bars?
Its some foils?
You plan to foil the laser?
Just curious and have been thinking myself about optional ways to foil my laser.

NMEA uses a serial port, also you need a logic level shifter. This is how its hooked up to my test board:

Ah I think this is goos news, since I can have one of my dear analog pins back.
What autopilot board is that?
Do we need a logic level shifter because the wind instrument is operating at 6-28V and the autopilot at 5V? Is that really needed if using the very similar product but is operating at 5-24V? https://calypsoinstruments.com/shop/product/ultrasonic-wired-ble-9

its a Kakute F7 aio

You will still need the shiftier, they use the RS422 / RS485 standard this specs signal levels between -7v and +12v. I am using this max3232 board from sparkfun.

1 Like