I’m currently working on a Cube Orange PX4 (v1.11.3) system with a companion computer that runs a state machine along with some other craft tasks. I would like my companion computer to be able to diagnose failed sensors and react accordingly, regardless of PX4 failover behavior. For example, if I have two external mags connected, I would like to know that both are healthy, and if one fails and PX4 defaults to the other, I would like to detect that.
The sensor flags in SYS_STATUS seem to be able to provide this. In practice, however, the flags are inconsistent at best. Here are my findings using the compasses on two Holybro F9Ps. As you can see, only when the primary compass is unplugged do the status flags change, at which point they reflect complete compass failure (I believe the compass connected to GPS2 is the one PX4 tends to choose as the primary).
Additionally, I don’t think I can get information such as which IMU is being used or if my radar is healthy over MAVLINK.
In short, I’m wondering if I’ll need to create my own module and MAVLINK message to report the information to my companion computer. I would be open to upgrading to 1.12 if it helps, but preliminary tests have shown otherwise, and there is significant overhead to upgrading in my organization.