Your looking for ‘WindDirApp’ this is the apparent wind direction relative to the boat, 0 deg would be head to wind
‘WindDirAbs’ is the absolute/true wind, 0 deg is wind from the north
edit: I notice that I have used absolute and true wind interchangeable, its ‘WindDirAbs’ but ‘WindSpdTrue’ this is makes it more confusing than it should to be, I will fix
Back in BJ with the boat.
Some development here.
I have been doing a lot of soldering to get the swop from Revolution mini to Kakute F7 AIO autopilot.
This will enable some simplification to the wiring in the Laser boat.
. The board has its own BEC so the current BEC is recommissioned to have only responsibility to power up the RFD900 unit with 5volts. That is good since they draw lots energy.
. The SD card for logging onboard is working.
. The LiPo sensor of volt and current is working.
. The GPS unit is working
. The Compass I2C connected is working.
. I got the Telemetry and the PPM control to work with RFD900 unit.
. The NMEA calypso wind instrument is working.
. I think I found a good way to attach the unit to the deck - remains to be tested.
. Hopefully future rigs that have a fixed mast can allow a mast top mounting.
Things still to do
. the servo outputs are different from documentation (Pete mentioned this early on), not big problem but time consuming soldering.
. Find a way to connect all the cables over deck, decided to try the 8 wire standard LAN cables and connectors. Must learn how to connect these small wires, buy some tools to do it.
. I would like to get a motor mounted and working up on the wing sail to be able to get home if things turn bad. think its a great idea.
. mount the NMEA unit properly.
Hope to do some sailing this upcoming weekend - probably too ambitious expectation
K
Im new to ardupilot and i recently bought a pixhawk 1 (2.4.8) and im trying to make it work on a sailboat moonsoon 1900mm with the Ardurover Sailboat. I had some problems with the compass calibration and command of the servos but its working now.
Now im trying to add wind information in the mix. I have this windvane here but i couldn’t find code to read this windvane in AP_WindVane so im trying to add the code.
the idea is to use the ADC 6.6v slot for the windvane.
i plan to develop more code in the future, so some important questions are:
what are the good practices to develop code for ardurover?
how can i build a firmware for testing?
another problem is that the only wind parameter that is shown in Mission Planner is WNDVN_TYPE. does anyone know why that happen? i have the latest firmware uploaded in the board
The anemometer should already supported using the RPM windvane backed. The problem with that type of wind vane however is the resolution, 22.5 deg is not really enough resolution to do a good job of sailing. Although your welcome to try it.
Your code look OK except your returned angle needs to be in radians, this should do the trick
No sailing last weekend but some progress
. made the LAN cable over deck solution, got a 3 input box on deck now (ugly but efficient)
. NMEA connected over LAN cable and feels very accurate for the 1h testing on land.
. Moving the Compass on deck is great. Using separate LAN input connector, calibrated okay.
. All is prepared for Motor, ESC and servo for the Control Tab on deck.
This is the first time I hade the Autopilot not complaining about BAD AHRS and MAG and GPS health Encouraging.
Plan is to sail with standard Laser Rig upcoming weekend with the new NMEA instrument but will new Autopilot. There seems still be some configuration to be sorted about the radio input and servo outputs. Probably post a question later.
Then need to order some more stuff to arrive next weekend, install it and then sail with Wing Sail the following weekend. Probably too ambitious again, lets see
One thing slowing me down is the need to do all installations in a way so they can be mounted and dismounted and transported in a box.
At this time I feel I need a confirmation that the Radio input configuration in mission planner can be ROLL for controlling the rudder of the boat?
(more intuitive would be to use YAW?)
When setting up the Servo output, the position #1 will ONLY accept input from the ROLL from the RC input. Rather, the only way to get the servo to move on the boat is to use position #1 regardless if using channel # 6 7 8 9 or whatever.
At least in my set up
yeah roll is the steering input on rover, the labels are for flying things. The servo output maybe the kakute f7 motor ordering stuff. Channel 5 and 6 are in the correct order, the servo numbers match the silkscreen on the PCB. 1,2,3 and 4 do not match the silkscreen. Also if rover does not find a ground steering out on another channel it will assign in to servo 1 on boot.
Good to have the Roll confirmed.
Yes, I ran in to the servo number miss match under control I think.
However, I have some unexpected behaviors here.
The ground steering is set to servo 1 and the main sail sheeting to servo 3.
Both servo responds as expected when armed and in manual mode.
When in acro mode, and unarmed, the rudder behaves as expected, the autopilot make correct corrections to the rudder when twisting the boat around.
To test the sheeting, the boat needs to be armed while in Acro mode (I don’t have gps signal indoors so it complains and needs to be forced to arm). Also have no wind so it might get confused like we discussed some month ago with the other controller.
Anyway, when this is done I would expect the rudder to be controlled by the roll stick via rate stabilization and the sheeting should move around according to the code without regarding any input from the throttle stick. But that is not what happens.
The sheeting servo is moving a bit, think that’s a good sign. However the rudder is turning without stick input. Sometimes a lot, like it was trying to tack but mostly it seems random movements. When I move the roll stick the rudder responds in the correct direction at first and is then overtaken by the autopilot. After a while the rudder have responded in the opposite direction to stick control something is not ok.
I think at one time the sheeting took input from the stick and moved as well.
I could just ignore this and try it outside with gps fix and some wind (but standing still).
Just feel that will not fix it. It should not tamper with the rudder at all in Acro.
What do you think?
Hum, if the stick moves the same way as the green roll bar on the radio page and the rudder is correct in manual you should be good to go and try it out on the water
Maybe I’m dense, but I don’t think I can display WindDirApp in my quick view. I’m only seeing “wind_dir” and this appears to be the true wind angle. I have the latest firmware and mission planner.
Bummer. Live apparent wind info in the quick view would be really helpful for manual steering to the apparent wind angle. Is it terribly difficult to expose that data to MavLink?
its quite easy to expose sort of, that is it is very easy to write apparent wind rather than true using the wind message. However we are then using the wind message out of spec, this can potentially cause confusion between vehicles and ground stations ect.
The correct way to do it would be to add a new sailing mavlink message, but then it is quite a lot of work to get it into all the various ground-stations ect.
maybe we could use the airspeed message or something, I will have a think. as you say it would be nice to have, helps when setting up windvanes also.
In the mean time I can show you where to change the code or I could build you a code than reports apparent instead of true.
RE: Custom Build or Where to Change Code
-Definitely, both!
I think I understand there are two issues, sending the message (currently not supported) and then preparing the ground station software to receive the message. I would be interested in learning more on the ground station end because I want to modify the HUD some day. Way outside of my skillset but that’s what hobbies are for.
Excellent, so in this situation we aren’t changing the communication spec, just swawpping apparent wind dir and speed for the absolute values. So all the navigation code running on the board will still function properly if trying to autopilit, but the mavlink telemetry is reporting apparent instead of true until we get a proper system for reporting both.
First attempt at building was a fail, the Cygwin method did not work. I’m on Windpws 10, so I went with WSL. That was successful and I’ve built vanilla rover! But because the source now exists on the WSL ubuntu file system, I have no freakin idea how I’m supposed to go edit the source code or even access the firmware that I jst built to load it onto the board. Frustrating but a worthwhile exercise since I’d like to be able to tinker with this stuff eventually.
I work with WSL alot. My typical work flow is to edit the source code with programs in windows, and do all of my compiling and git commands in Ubuntu. You can access all of your Ubuntu folders in a path similar to this: