We have a 1991 Hunter 30T with an Autohelm (Raymarine) ST4000 autopilot. It was installed in 1993 and we bought the boat about 8 months ago. The boat was in excellent condition and well maintained and even has all of the original manuals and the ones for each item added since original purchase through 2003). As an autopilot, it does its basic job of keeping the boat on the pedestal compass setting. The problem is that the ST4000 display head reading is not synchronized with the pedestal compass. We have tried most everything to solve this. We have followed the manual (several times) as how to compensate for the deviation. This includes setting it to the calibration mode and turning 360 degrees (under 2 knts) 2 to 3 times or until it beeps. We then set the pedestal compass on a known bearing and +- adjust the autopilot to coincide and lock the setting in, just as the manual says. THE PROBLEM is after we lock the settings in, the strangest thing happens. Say we synchronized at 60 degrees, as soon as we steer to increase to, say 75 (+ 15 degrees) the autopilot will go to 45 (- 15 degrees). If we continue to 80 it goes down to 40. It goes in the exact opposite direction the same amount of degrees no matter what or how many times we try to recalibrate it.The fluxgate compass is mounted amidship in the galley (as it has been since 1993). The previous owner was an accomplished sailor so I cannot imagine that he would have lived with this, unfortunately he is not available to get his advice on this. I suspect it is a new problem even though we have not added any new mechanical or electrical items that may adversely affect the autopilot.The good news is, as I said, the autopilot does the basic job of staying on the pedestal compass course setting; it’s just that the two readings don’t match. I can live with this temporarily but need to solve the problem when I hook up my GPS (with waypoints) to drive the autopilot, to drive the rudder, etc.I don’t think it is a deviation problem, I suspect it is either a fluxgate problem or an electrical problem. My suspicion is electrical or magnetic because of the reverse polarity (degree-wise). Additional information is when we first bought the boat and turned on the autopilot it sometimes would not come on, but if we jiggled the cable to the battery around the fuse connection, it would come on. But, we have not had that problem for 3-4 months; it turns on every time now.Sooooooo, I would like some advice from those that may have had the same experience or have a much more in depth knowledge of the workings of the autopilot ST4000. I have read just about everything in the archives and tried those that I thought applied, but to no avail.I realize it is a lot to dump on you guys/gals and I know it is difficult to do remote diagnosis, but since I have been on this web site I have been extremely impressed with the vast and varied experience that exists and the willingness to help.Thanks, Rich