Servers by jDrones

Sailboat Support


(David Boulanger) #61

O.K… Thanks again for everything.


(David Boulanger) #62

Absolutely my last question. How does the code know this is a sailboat? Have a great weekend.

edit here. If wind vane type is set to 1 and the boat is into the wind upon arming can I run an auto mission? trying to understand what WNDVN_TYPE all means.


(Peter Hall) #63

no worries, feel free to ask away, I will try and keep up-to date on the forum over the weekend, i’m excited to see how it works for another boat.

It knows is a sailboat because one of the servo outputs is defined as the main sheet (function 89).

Yep it will run a auto mission just if the wind changes too much it will get stuck. I would recommend setting it as type 2, PWM you can then define a RC channel with WNDVN_RC_IN_NO and use a knob on your transmitter to offset the armed wind direction by ±45 deg.

Hopefully I can get the last few things sorted out early next week and start tidying it up for a merge and do some proper documentation on the wiki.


(Peter Hall) #64

I have found a bug in the firmware you have, the SAIL_NO_GO_ANGLE that defines what angle to tack at upwind and SAIL_HOLD_ANGLE that defines what angle to try and hold with the sail out in hold mode are swapped. I suggest you just set them both to the tacking angle.

Alternatively this new firmware doesn’t have that bug but may have some new ones.

ardurover.apj (746.2 KB)


(David Boulanger) #65

Thank you . Should have the boat ready for sail testing Monday morning.


(David Boulanger) #66

@iampete, @rmackay9.

Did some bench testing today and have a few minor issues. The code say 3.5.0 dev and ChibiOS. Is the ChibiOS correct for my Pixhawk 1? I can’t arm with my transmitter but with Mission Planner no problem. Although I can see my left throttle stick, sheets, changing value from bottom to top, in manual the output does not start to change until mid stick. At this point the output to my sail winch goes from 1100 to 1900 from mid stick to all the way up. I’m not seeing my battery voltage or amp draw on Mission Planner. HUD or Status bar. When I change from manual to acro and auto the boat does stuff that looks to be correct on the bench. I’ve made progress. The big thing is the ChibiOS, not arming with the transmitter, only half the movement of my throttle stick does anything and no battery voltage being displayed. What’s strange is the battery voltage and Amps on the HUD doesn’t just say zero but they aren’t there. Still planning to test and tune Monday morning.


(Peter Hall) #67

ChiboOS should be fine, I have added a radio arming paramiter in that latest code, posibly there is a bug there. I never tested it. Its called ARMING_RUDDER or something similar posibly its that you could try changing the valve. Throttle thing dosebt shound like a sailboat thing, i think there is a paramuter for enabling or disabling reverse, posibly it thinks the bottom half of the stick is for reversing. If you cant find a reversing param you could change the trim to the miniumum value. No idea about the battery moniter i havent got one on my setup. Dosent shound sailboat related, unless you have the analog windvane enabled and its on the same pin, i dont think it is on pixhawk tho


(David Boulanger) #68

Thanks for the quick reply. I’ll look at my parameters closely. Can’t wait for Monday. Just dug out the " B - Rig". Its shorter than the standard rig but can handle wind up to about 20MPH. It will be the one that gets the pot attached and later the wind speed indicator.


(David Boulanger) #69

Tried changing servo3 trim to minimum value but no change. Although the RCIN on 3 show the PWM going up the output on three doesn’t change until mid stick and then it goes from 1100 to 1900 from mid stick to top. curious to see how this behaves in Acro or Auto.


(David Boulanger) #70

Re calibrated the radio TX and all is good with the sheet winch. My fault.


(David Boulanger) #71

@iampete, @rmackay9.

Ready to rock and roll tomorrow. Bringing camera equipment and will be spending 3 hours or so tuning and playing.


(Peter Hall) #72

good luck, I guess first the ideal sail angle param, without a vane its probably best to be tighter(higher number) then looser, not that is has to be perfect, so long as it goes. tuning the steering is the same as normal,just is harder to judge because the speeds not constant. You should be able to set up a 2 point reaching mission with a do_jump waypoint to just reach back and forth while you tune the L1 nav controller. This is only used in auto when not going upwind (angles larger than no go angle + 10 deg). Then all modes should work. If its windy enough you could have a look at the sail control PIDs, these kick in at heel angles larger than the max heel, I would just add p gain to start, and keep I D and ff at zero. I think loiter should work too, I only found the LOIT_TYPE param on after i tested it the other day, has to be 1, so it knows to turn round not try and try and reverse.

This is my latest parameter set if its any help.
Pixwawk5.param (12.4 KB)

I lookforward to seeing how it goes.


(David Boulanger) #73

Thanks for the heads up. I thought I would start with Acro to see how the sails sheet in and out for a bit. The reaching Auto mission makes sense. Steering PID are ATC_STR I assume? This boat tracks very well due to its weight and full keel. I’ll play around and ask questions tomorrow afternoon. Thanks for the Param’s.


(Peter Hall) #74

Yep ATC_STR same as normal, Acro is a good place to start, you can also try auto tacking in acro on the aux switch


(David Boulanger) #75

What Aux switch? I have Ch6 for then wind vane type 2 option to adjust. Is it channel 5 or did I miss a parameter where I can set this.


(Peter Hall) #76

you can set RCx_Option to 59 for tacking, works in acro and upwind auto


(rmackay9) #77

@iampete,

I’ve created a PR to allow disabling arming and/or disarming via sticks. I hope this will go into master in the next day or so and then I’ll help rebase your branch on this. Coincidentally the tradheli guys wanted this feature in Copter too so this basically moves the feature so it can be used in all vehicles.


(Peter Hall) #78

@rmackay9 I have got the airspeed library working, however, The new sensor doesn’t really fit into the preexisting types, it directly reads the airspeed, requires a temp input on a second analog pin and the offset works differently. I don’t want to add too much extra stuff to the airspeed library, basically the new sensor would be a special case. Possibly it would be better to implement the new sensor in the windvane library, but still allow standard airspeed senors to be used?

this is the documentation for the sensor, https://moderndevice.com/news/calibrating-rev-p-wind-sensor-new-regression/

I cant see anyone using it for plane so i don’t think it would be a big deal, what do you think?


(Luís Vale Gonçalves) #79

Backported to 3.6 ??


(David Boulanger) #80

I got out today for some initial testing on my boat. The wind was very light and shifty changing in direction about 270 degrees. I had to change my SERVO3_REVERSE parameter to get it going in auto in the proper direction. Ran a two waypoint mission four or five times on about a beam reach. It really was more like 70 - 75 degrees windward and 105 - 120 degrees back in for waypoint 2. Boat tracked perfect going slightly to wind heading to waypoint 1 and coming back to waypoint 2, slightly downwind of a beam reach, it hunted around a bit. Really could not do any useful tuning with the wind so light and shifty. My wind speed sensor came today but I am really waiting for the pot to arrive. We may get some more predictable wind here in Southwest Florida later in the week when the Hurricane hits the Carolina’s. Nice work!
https://1drv.ms/u/s!AgqdUNhfFlnDgbNxCmXeP0F_L62mIA