Reliable compass sensor

Hi, i am looking for a reliable compass sensor to use it in a marine autopilot in a sailboat. I have use some sensors until now like QMC5883 and the LSM303 who they failed after a while. They jump a lot a degrees abnormally even i use them in a gyro base to keep it horizontally all the time. The old autopilot has a magnetic sensor make it of loop wires that I can't find it as part in stores. Do you have to suggest me a reliable sensor for that use?

Look for fluxgate compasses , if they're still avalaible as spare part (maybe from Raymarine)