Off the top of my head
I seem to recall
that the Raymarine
S3G autopilot computer will use NMEA HDG first, then SeaTalk
, then its own heading sensor. There's a possibility that, if you have some inexpensive after-market GPS
, it is erroneously reporting GPS heading information ($GPHDT) as a magnetic compass heading ($HCHDG).
Since the autopilot is working correctly, it seems the display is what is confused. When you say the heading is off by 20-30 degrees, or sometimes 180, is it the chartplotter's display of heading info that's off, or is it the autopilot controller? We had a similar issue with our E-120, but after a firmware update it went away...
Of course, now the E-120 seems to lose a day or so when showing ETA on the current route
(works fine for ETA in hours, but for time-of-day it gets confused - obviously a software