BeagleBone blue heading drift on small AUV

Hi all,

At my work we use the BeagleBone Blue boards to control somewhat small AUVs.
The board is placed in underwater tubes along with batteries, ESCs for thrusters and all other electronics.
We use the in-build magnometer and gyro to calculate the heading for navigating under water.
Testing the beagleboard alone on the desk shows that the heading is fairly stable and correct within reasonable limits.
The problem arises when we do offshore tests with the AUV. Here the heading will start to drift. A controller has been configured for the AUV to follow a reference heading for X amount of time. From the data we can see that the AUV actually do keep a steady heading, but from inspecting the vehicle IRL it becomes obvious that something is wrong as the vehicle will follow an arc instead of a straight line.

So to the AUV actually thinks that it keeps the same heading and actually does this for the first few meters and then starts to turn following an arc while still thinking it is on the same heading.

I know that we introduce quit some noise on the sensors by having the batteries, ESCs and wiring going around the board, but could this really be the course of this? Can anyone of you think of other possibilities? And can anyone suggest a solution to this (other than moving power units and wires to another shielded tube - this is not an option at this moment)?

Best,
Jesper