Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Compass: don't publish frozen data #9549

Conversation

SergeyBokhantsev
Copy link
Contributor

This is a try to avoid a situation described in
https://discuss.ardupilot.org/t/compass-stop-working-but-remains-healthy/33205
when compass hangs up for some reason. It still can be read but does not provide any changes. So it stays healthy all the time:
image
(plz never mind the peaks, they're likely caused by a long wires)

This fix does monitor the values published and if they are equal for a number in a row ( > threshold), then publishing will stop till the values be different again. Stop of publish will lead to a bad compass health, that is the goal.

@lucasdemarchi
Copy link
Contributor

seems to be a problem in the particular driver. What driver is that?

@SergeyBokhantsev
Copy link
Contributor Author

seems to be a problem in the particular driver. What driver is that?

@lucasdemarchi it is noticed with QMC5883L device.

@tridge
Copy link
Contributor

tridge commented Oct 12, 2018

this doesn't look correct at all. It is quite possible for a compass to produce exactly static values while sitting on the ground awaiting takeoff. If this was used then the compass would show as unhealthy and the aircraft couldn't fly.
Is the DF log for the graph above available somewhere?

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most likely an issue with the specific sensor

@SergeyBokhantsev
Copy link
Contributor Author

@tridge unfortunatelly I've lost the log. Are you sure some compass normally could produce a static value without any noise?

@peterbarker
Copy link
Contributor

If @tridge can confirm that a sensor could reasonably produce absolutely consistent values for seconds then we can close this. Marked DevCall

@peterbarker
Copy link
Contributor

See also #9525 - which seeks to remove the equivalent stale-data check from all barometers....

@tridge
Copy link
Contributor

tridge commented Apr 23, 2019

doesn't this mean if we have a very low noise compass it will be marked unhealthy? that seems like a bad idea

@tridge
Copy link
Contributor

tridge commented Apr 23, 2019

If this is an issue with a specific compass driver then I'd like the fix in that driver.

@tridge
Copy link
Contributor

tridge commented Apr 23, 2019

I don't think this is a valid change without a log to back things up, and even if found we'd want to enable this in one driver

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants