Raymarine Fluxgate compass replacement

Hello World!

My crew broke the Fluxgate compass (Raymarine) on one of our yachts, I was wondering if it is possible to replace it with some arduino compass (GY 521 board with Arduino Uno)?

The original Fluxgate by Raymarine sends NMEA-0183 signal to the autopilot, has 5 wires: blue, red, green, yellow, screen

Anyone tried this before?