Airspeed fault detection in SITL

Hello everyone!

I’m reading about the wonderful work on Airspeed Sensors Fault Detection, done last year by @sfuhrer & CO (https://github.com/PX4/Firmware/pull/12887/commits).

I want to test it in simulation and see how it works before we proceed to hardware tests.
But my first impression is that this is not possible, since the message sent by SITL (HIL_SENSOR) can only contain 1 differential pressure sensor reading.

Am I missing something? Has anyone done SITL testing of this feature before?

Thank you!

Hi @Georacer-avy, I haven’t tried it yet in HIL, but in SITL it is possible to simulate it. The hard part is to setup a realistic failure scenario in simulation, would actually be interesting to know what you think is the most realistic failure on an airspeed sensor. Partial clogging?
What also needs some testing is how well the wind estimator in SITL is, as part of the failure detection is based on it.

I’ll handle the fault scenarios, we’ve got our own custom simulator. I’m thinking of starting with abrupt zero output, abrupt multiplicative fault and incipient multiplicative fault.

What I don’t know how to do (hence my question) is how I create the corresponding HIL_* MAVLink message to send to PX4 SITL.

I am not interested in HITL.

Bump? Bump? Bump? (Times 3 for length-checking)

Yes I think it’s currently only possible to send a single airspeed sensor simulation to SITL. This was okay so far, as also on the PX4 side we don’t yet fully support multiple airspeed sensors.
I’m not the expert on the mavlink side, maybe somebody else can help you out here.