Servers by jDrones

Compass problem with ArduSub

Hi, I’m a a student working on a project about ROVs.
I am trying to simulate an underwater vehicle with SITL and Ardupilot, and control it with Python scripts: so far I’ve been learning to use the QGroundControl software and do simple missions, and lastly I’ve managed to control it manually with the keyboard using a script.
However, I ran into a problem with the compass: when I switch to GUIDED mode and arm the vehicle, the compass starts to behave differently and changes continuously between two positions (approximately North-East and North-Weast), making it impossible to control his direction.
This happens every time I set the vehicle to GUIDED mode and arm it, but never during a mission: when i plan a mission through waypoints the vehicle behaves fine.

I tried the compass calibration, but didn’t manage to complete it without the hardware, while disabling the compass gives me troubles for the arming command.

Is there any way to resolve (or get around) the problem?
Thanks for the help!

Servers by jDrones