Ho ho : )
I received the wind vane and the anemometer.
Managed to connect the wind vane to the voltage sensor of Revo pwr port in such a way that the voltage in the GCS PFD gadget no longer report the volts of my on-board LiPo but shows direction of where the wind is coming from.
Wind from degrees : Volt displayed
. 0/360 : 1.9V
. 90 : 3.0V
. 180 : 2.5V
. 270 : 3.3V
In total it shows 16 different Voltages corresponding to direction degrees in between the above.
The anemometer, windspeed, seems more difficult to connect so I just put it aside for a while.
So far so good
Knowing this set up will only report the apparent wind angle (due to the boat tilting, boat speed, sail changing airflow, etc), I will regard it as the True Wind angle for now anyway. Knowing there is a huge area of improvement in accuracy later on to develop, like getting an ultrasonic sensor with onboard compass providing the true wind direction compensated for tilt of boat as well as wind speed directly and wireless connecting to the FC.
Question;
Any suggestions as to were would be a good point in the code to implement an interrupt in the execution of the waypoints?
Path follower module?
Path desired UAVObject?
I will need to get access to the Voltage for wind direction and then determine something like what sail mode is the boat in, then make some changes in sail sheeting and maybe course heading.
I realize I am just tampering around here, but my goal is to use the Path planner to set some waypoints from the map. This will provide the desired directions and positions I want the boat to visit, regardless of direction of the wind (and other obstacles).
This is what works already, see the video.
However, I do the sheeting of the sails manually based on a FPV camera view of the sail and boat.
The boat is completely unaware of the fact that it can not sail straight in to the wind.
The FC think its a car and its using the GroundPathFollowerSettings to execute the Waypoints.
I am thinking first to develop an awareness of what current SailMode (SM) the boat is in
(given the destination). There are some distinct five basic sail modes:
1. Close hauled (tacking: this is only done when target is located in a heading of the No-go zone),
2. Close reach
3. Beam reach
4. Broad reach
5. Run
These directions are all relative to the true wind angle (TWA) and not to the apparent wind angle (AWA), that I am getting now, I know, I know.
I will stay out of the first SM (tacking) for now, since its much more complex than all the others.
The Close hauled tacking SM will work very differently. It will keep the optimal sailing sheeting for this particular boat at all times, but instead change the course/heading of the boat to sail. Eventually it needs to tack to reach its destination.
But for SM 2-5 it just need to keep the course as today but the new feature will be autonomous sheeting of the sails according to the different wind directions. I can provide the best setting for the sail sheeting actuator for each SM (accessory 0). But where to save it so it will be executed?
Its interesting that any progress that will work for this little boat can be scaled up to much larger yachts. Also, the current professional SailDrones/SailBots are using several computers and sensors and I think we could achieve close to the same with much less.
Ideas much appreciated as always.