Best way to select which IMU is used


Recently, I have noticed that the pair of IMUs in the cube of my pixhawk 2 gets much noisier readings than the non-isolated IMU on the main board. I was wondering if there was a way to influence the sensor voting / ecl to choose the board mounted sensor over the sensors in the cube.

It seems to me that the two factors that go into choosing the sensor are the error_count and priority parameters. The error_count factor seems to report register/value errors as reported by the sensor, so I don’t think there is much to be done with that. The priority of the sensor seems to be taken from the uORB message, which is defined in the sensor wrapper. Is this correct?

The issue is that the pixhawk 2 has the same sensor mounted in the cube as it does on the board. Is it possible to differentiate between the two sensors, and give the board mounted sensor a higher priority?



A quick way to test this would be to start the desired primary sensor first.