CANbus for Ardupilot with UAVCAN and UC4H

Dual UC4H Magnetometer Setup: First Tests
6. Dez. 2018

Since I’ve installed the dual GPS setup about a year ago or so on my flame wheel, I also wanted to use the magnetometer on the second GPS module as an additional external magnetometer. However, at that time back I couldn’t get it to work with ArduPilot. I now decided to look at this again. First, things have progressed since then and it should work now. Also, my current external magnetometer on the first GPS module started to develop a strange behavior in that it wouldn’t startup properly if it is too cold outside (I could proof that beyond doubt). So, I installed a UC4H general purpose board with a second external magnetometer, configured things, et voila:

MAG is the internal magnetometer, and MAG2 and MAG3 are both external UAVCAN magnetometers on node id’s 44 and 80. Calibration was a bit of a pain, but that’s normal for ArduPilot. Otherwise the setup was straight forward.

Clearly, it would be cool now if things would work such that ArduPilot would select the better external magnetometer at startup, and would choose the proper calibration data if one of them should be found to be unhealthy at startup. Unfortunately, ArduPilot itself can’t do that (which is a longstanding complain), so trying to improve that in BetaCopter would be the next step.