Add baro temperature to sensor voter observation #9411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For our baro sensor (no driver in px4 master), I keep getting STALE errors every few seconds since a recent merge of master.
The errors appear while the vehicle is steady on a table indoors. Apparently the pressure reading from the baro can stay at a specific value for roughly a second under these conditions. As soon as
> 100
(source in ecl) samples have the same value, the error above is triggered and the sensor flagged as stale.A recent PR (#8466) modified the way baro measurements are published. Instead of the derived altitude, the message now only contains the pressure, which makes sense. Before that change however, the altitude was compared in the sensor voter and not the pressure. The altitude computation might have introduced some numerical magic that caused the measurement to be a bit more noisy - numerically speaking. 😕
My idea is to also add the baro temperature to the voter. But I am not sure if that's smart. What if the baro reading actually does become stale, but the temperature reading does not? I don't have enough experience to know what failure scenario the stale check is trying to detect.
@dagar any input? :)
Altitude example output:
Pressure example output of same sensor, different px4 version: