Minimum distance to avoid interference

Hi everyone, I should mount the battery and the external magnetometer (3DR GNSS/Compass) as per the attached image. The distance between the two elements would be 5 cm. Do you think it’s okay to avoid magnetometer interference?

F.