I thank the ArduBoat group and all the greater ardupilot community for your exemplary intelligence-sharing and cooperative spirit!
Working with Pixhawk autopilots running APMrover2 aboard small Autonomous Surface Vehicles, my question is about the possibility of providing alternative heading data, for example from a dual-antenna phase-ambiguity-resolution GPS system, instead of using only on-board and external magnetometers.
I’ve made, and am continuing to make, an earnest effort to grasp the body of code that comprises APMrover2 and its many libraries and references, but so far it has been so formidable that I’ve taken the alternative tack of trying to simulate an external magnetometer (using an Arduino as a sort of UART NMEA translator and I2C imposter). By brute force I have learned a lot about I2C in general and about the HMC5883L magnetometer IC in particular, but have bogged down at the point of trying to figure out what the ardupilot code expects to get back from the external compass (in this case device “30”) after addressing register 10 (ID register A, the first of three).
I’d be interested to hear any thoughts on alternative heading input …or on my almost ridiculous exercise of trying to fool the Pixhawk and ardupilot by synthesis of phony X and Y magnetic vectors that always sum to the set declination, given ancillary heading input.