PX4-Autopilot
PX4-Autopilot copied to clipboard
Multiple airspeed sensors
Hello,
I've been exploring a feature implementation that I couldn't find documented: the usage of multiple airspeed sensors. My journey led to a successful implementation, however, I'm unsure if I can submit a PR due to the multi-repository nature of these changes and their alignment with the existing code base structure.
Issue:
The reliability of current market airspeed sensors and their associated procedures is questionable, often leading to complications with our aircraft. I observed that PX4 does not support usage and calibration of multiple sensors. Additionally, in UAVCAN, only a single topic was published when multiple differential pressure sensors were operational.
Proposed Solution:
Implementing support for two or three sensors can help decrease signal noise and reduce the risk of physical damage/obstruction to any individual sensor. A voting mechanism could also be established with the use of three sensors.
Implementation Details:
- UAVCAN:
To accommodate multiple topics, I modified the publishing to the topics, with separating by address of the nodes. Each differential sensor push to different topic.
- QGround:
To calibrate and visualize multiple airspeeds, I modified the mavlink messages, GUI and added new commands for calibration of the second sensor.
- PX4:
I introduced a new miniature EKF module that manages two sensors and seamlessly switches between them in case of faults.
I'd greatly appreciate any feedback or guidance on this matter.
Test video: Air Spd : combined value from the ekf. Air Spd 2: Airspeed from second sensor Air Spd 3: Airspeed from first sensor https://github.com/PX4/PX4-Autopilot/assets/103575909/d3bbc7ce-98fd-4536-868f-4c8c6fc1464b
Have you checked out this documentation?
https://docs.px4.io/main/en/sensor/airspeed.html#multiple-airspeed-sensors
@DenisPGH any response to @junwoo091400's doc link?
@julianoes, @junwoo091400 Hello, I read the doc link, but our idea is different. We want two complete separately airspeed sensors, which work simultaneously, and both measured data is collected and used in the main calculation.
@DenisPGH Hello, I am interested to know more about your idea. I am currently trying to connect 2 airspeed sensors (MS4525DO) to Pixhawk using an I2C splitter, but only one airspeed is shown on QGC and I would like to be able to see the airspeed from both sensors at the same time. Could you share more details about how you managed it? Thanks!
I work together with @DenisPGH.
We wanted to use two sensors (or possibly more) because frequently those sensors cause issues and it's a single point of failure. This is especially critical for bigger UAVs and we don't want to rely on a single sensor.
We've added two UAV CAN sensors and developed a small EKF to handle the two sensors data and feed back the data to the main EKF. It works well and it was tested with a few successful flights.
The plan was to add this as contribution to PX4, but because it involves a lot of changes in PX4, MAVLink, QGC and more for now it will be too much hassle and probably not aligned with PX4 goals. Just the PX4 changes affect around 60 files.
@DenisPGH @tnedev I have just implemented https://github.com/PX4/PX4-Autopilot/pull/22785 and indeed two airspeed topics are being published now, with two connected airspeed sensors. The airspeed calibration is still only possible for one of the sensors though. Can you give a bit more detail about the changes in the airspeed calibration part, or are there also to many file changes involved with that?