After I tested and it was still not fixed. The other thing that I would do is get a 2 wire cable that is shield and use that to run power to "The AP compass and ............ in the autopilot DC power feed, or the Compass Unit?" I would ground the Shield at the battery.
another thought The, "The AP compass and ............ in the autopilot DC power feed, or the Compass Unit?" ,power is the only thing on that wiring.