Sailboat Support

I put it to 2
Like fence and sensor kinda…

hum, i just had a go in MP (without a vehicle) and its the same pink with blue points. Not sure.

Dont worry about it Pete, I have enough to test the coming week(s) :slight_smile:

Hi all
We are building an app that is connected to a raspberry pi running mavproxy and we would like to listen to the mavlink message stream of the Wind-sensor. Can somebody give me a hint in what message the Wind-sensor date is transmitted?
Thanks a lot

We use the ArduPilot wind message, id 168

Thanks for the quick help :slight_smile:

Is there a preferred stable Sailboat build at the moment? I’ve been working off of Master because it looks like the stable Ardurover build is years out of date and doesn’t include Sailboat stuff.

Current stable does have most of the sailboat stuff in, master has some newer features. The general waning about using master is that there could be bugs and it could do un-expected things. Un-expected things have a lot less potential to be bad on a sailboat with no motor than a heli or something. Basically its up to you to decide if the features are worth the risk (the risk of very bad things happening is quite low master does get a fair bit of testing between developers users and the autotests but bugs do slip through)

Thank you for the quick response! It looks like I was looking at the wrong branch. Is the current release build “Rover-4.0”?

Yep, 4.0. If your playing with the code I would recommend working off master, everything has to go via master to get in so it just saves moving the features between branches that can sometimes be a big job depending on what other stuff has changed.

1 Like

I’m working on an I2C WindVane driver so I can interface my wind instruments via Arduino (there’s no ADC on my board), and I’d like to be able to troubleshoot by observing the measured values from GCS telemetry. However, I haven’t been able to find settings on QGroundControl or APMPlanner2 to view the windvane output channel. Do you know if that is an option?

Sorry, no idea about APMPlanner ot QGC. In mission planner you can set the status to display or view a live graph via the tuning tick box.

@playertr QGC has a “mavlink inspector” view which can plot live telemetry:

APMPlanner2 can also plot mavlink streams:

2 Likes

Thank you for your responses, Mark and Pete. I got the plotter up and running.

I got a functional driver for my AS5048B I2C magnetometer, but I’m not sure that I’m handling semaphores correctly. I haven’t worked with multithreading before – should I use blocking semaphores for my I2C calls? Should I use that funky macro, WITH_SEMAPHORE?

You can view the source code I have up and running at the link below. After testing and validation, I’d love to submit a pull request to give other folks access to 0.02 degree wind resolution for $20.

Great work!

I have not done a huge amount with semaphores myself, but my understanding is you can use the WITH_SEMAPHORE macro when you enter the function, it will take the semaphore and return it when you leave the function. This means you don’t have to add the giving back the semaphore to the various places your return from the function.

Have you considered having the driver in AP_WheelEncoder, then our friends with wheels can benefit from this driver. You could have a Wheelencoder wind-vane back-end just as we have rpm and airspeed ones.

Any recommendations on where to get a encoder? I’d like to get one to play with.

1 Like

Good idea about associating this with AP_WheelEncoder. Looking at the library, it appears that WheelEncoder is used for rover odometry and therefore WheelEncoders are tasked with maintaining a cumulative running total of angular distance, which is a slightly different use case than a raw angle sensor. It looks like @rmackay9 and @peterbarker have been quite involved with AP_WheelEncoder, do you have opinions on where an AS5048B magnetic rotary position sensor driver belongs?

Pete, you can get a sensor from Digikey for $17. If you want to 3D print this compatible windvane design, then you should add two axial neodymium magnets to your order for another dollar.

2 Likes

I have just hit this error in SITL, you need co change to use Mavlink2 for your telemetry serial port protocol.

Yes, thank you - it works now :smiley:

Hi Peter
in post Sailboat Support you gave me the hint for id 168.
We have the wind sensor connected and configured as described and working great using MP.
(WindSensor-PixRacer - RadioLink - Raspbi(MavProxy) – WLAN – Laptop with MP)
Our plan is to replace MP by an App and to parse the incoming messages with our own software. We see many messages with plausible ID’s, but we do not get any message with ID 168.
We have set the stream rate (SR1_xxx) for all available messages.
Is the ID 168 somehow capsuled in an other message?
Thanks a lot
Mat