Please help me diagnose problem with external compass (Radiolink TS100 mini).
- no compass data coming after some time
- random spikes in mag data
- 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:
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).
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.
Hi，I have also encountered this problem“frozen data” recently. I tried to reinitialize the magnetic compass after the data is not updated, but it is useless. Do you have any solutions? Thanks a lot
This fix helped for me
Thanks a lot ,I will try it sooner.
I would like to ask another question, because I have been using the version of Copter 3.5-rc7 (25-May-2017) and the OS is nuttx. I want to fix the bug in this OS,Do I need to send a function that simulates 9 consecutive CLKs after IIC stuck to solve this problem, I want to ask you if my idea is correct, or is there any other way?