Servers by jDrones

Compass stop working but remains healthy

(Sergey) #1

Please help me diagnose problem with external compass (Radiolink TS100 mini).
Issues are:

  1. no compass data coming after some time
  2. random spikes in mag data
  3. healthy flag doesn’t clear after mag data stop

1 and 2 looks like a hardware issues. I’ve checked wiring and found no problem. So could it be a faulty mag chip or power issues?

For 3. a question to AP - how it detects compass health?

Here are some examples:

Copter-3.6.0-rc12 available for beta testing
(andypiper) #2

I did the compass health log message a long time ago, IIRC the status indicator its based on is whether it can read from the compass over a certain period (can’t remember what the period is, maybe 1s or something like that).

(Sergey) #3

Thanks @andypiper I’ve found that logic. That mean i2c device (compass) still was able to read but did provided “frozen” data for some reason. Thats weird…

And for the my question 2 in the start post about spikes - I found that is expected situation for long wiring (I have not very long but about 20 cm wires). There is even a feature exists in Ardupilot:

COMPASS_FLTR_RNG: Range in which sample is accepted

This sets the range around the average value that new samples must be within to be accepted. This can help reduce the impact of noise on sensors that are on long I2C cables. The value is a percentage from the average value. A value of zero disables this filter.