New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rover: Direct-rotation sail control #17066
Conversation
looks good so far, just need the the magic function to set it. You will also need to add it to This is slightly more complex than the existing outputs, they both have a fixed position to de-power. You will have to actively drive this to point into the wind to de-power. You might have to add some code paths for this, |
Thank you for pointing out |
Excatly. I'm not sure about just fixing the wing to parallel to the hull, I think your just going to get knocked about with excessive heel. It also means you have to go via a high angle of attack to get to a lower one, so setting off and stopping might get quite exciting. I also don't think you would actually stop, I suspect you might just end still going forward a bit and slipping sideways alot. Feel free to try it IRL and prove me wrong, we can always add pointing the wing into the wind as a future improvement. |
I can try to take some videos that show this. I'm still waiting for my wind vane, but this is something I can demonstrate under manual control. I have the sail control on a knob on my TX, so that rotating the knob clockwise rotates the mast clockwise. Middle detent on the knob is the "off" position for this sail. Mind you, with a sail winch, sheeting all the way out depowers you only in as much as you're going upwind. If the wind happens to be from behind, you'll get all the power :=) The future improvement you speak of could actively manage the sail angle for mast rotation and for the winch. Sort of the opposite of what the comments call "ideal angle" for the winch. Outside of that, is there anything else I'm forgetting before I get to the magic? (it's not actually that magical, but I do need the hardware). |
Its looking good. Just need the extra few lines ;). I suspect you will have to add a offset param. We could assume that the servo range is mapped -180 to +180 relative to the hull, then just add a offset param to remove the need to do that mechanically. Should be able to re-use the ideal sail angle param to set the sail relative to the wing to go forwards (and backwards). |
Thank you for your encouragement, Peter. I'm not sure I understand fully your meaning about the offset parameter. Are you talking about constraining the range of rotation or setting the middle point? I would have thought you can control both with I'm planning to use The ideal angle applies when sailing upwind. It is the AoA that gives best L/D ratio, 10-12 degrees. When running, you use the wing as a drag device and turn it to present the widest area, more or less 90 degrees to the wind. There is a discontinuity when going from one mode to the other, and another when jibing: as the boat jibes from starboard to port tack, the sail needs to rotate 180 degrees to keep the leading edge into the wind. I'm not yet sure how to handle that--probably with some kind of hysteresis. |
nice to see this additional support in sailboats. @IamPete1 is the maintainer so I leave the decision to him but I wonder if we need sparate main_sheet and mast_rotation values. I guess there's no way we could squash them together? |
@rmackay9 There was some discussion about that here: https://discuss.ardupilot.org/t/sailboat-support/32060/767 There are two sail control output types in master, this PR is proposing a third. It is unlikely that the same boat would have different types of control, even it she has multiple sails. The alternative is to have one output type, and a new parameter that would control which type of sail control the boat has. Maybe even make |
Yes, I can imagine it's a choice between a servo function and a type parameter... adding a servo function is probably closer to what we are doing for other methods of control. |
I made a new parameter, The purpose of this parameter is to accommodate the use case, like my MaxiMOOP, where the vane is mounted on top of the mast and the mast rotates. In this case, the code must subtract mast rotation angle from vane reading to compute apparent wind angle. This is possible both with winch and direct-control masts, as in both cases the code attempts to set the angle of the sail. To perform the computation, I must read the previous value of the sail servo, before the running code requests a new setting. I'm not sure how to accomplish that--perhaps @IamPete1 or @rmackay9 can point me to an example. |
e27a646
to
fe6725b
Compare
f03207c
to
e47a9fa
Compare
7dbc5c5
to
e677e6f
Compare
eba2ace
to
4fa7c69
Compare
Took off the last commit based on feedback from @IamPete1 on discord. |
a36bed5
to
c5519dc
Compare
8a509f3
to
63bc0c1
Compare
63bc0c1
to
9fc1170
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for putting up with all the change requests!
Thank you for guiding me through a first-time PR process. |
Allows a sailboat configuration where a servo directly rotates the mast, rather than controlling its AoA indirectly with a sheet or an elevator-like surface.