OpenMarine

Full Version: Strange compass headings from ICM-20948
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all -- Complete newbie here, seeing if I can put together a pypilot system. 

So, my brand-new Pi Zero 2 W arrived yesterday and I booted it up using Stelian's tinypilot image. It all seems to have loaded properly and it recognises the ICM20948 board. The pitch and roll readouts seem plausible. 

But the compass is crazy. Like, if I turn the ICM round by 180° the heading readout might change by 20°. I've checked for loose connections and nearby magnets/cables and played around with calibration settings, all to no avail. Is there something else obvious it might be? Or could it be a dodgy board? (it's from Adafruit).

As I say, a complete newbie -- I just wanted to learn a bit about programming and maybe, just maybe, get an autopilot out of it, so please be patient.
That is normal behavior. The compass always has to recalibrate.


After a few minutes after booting, it can begin to calibrate. If you slowly rotate in a circle and gather enough measurements it can perform a fix.

Check the pypilot_calibration script, or calibration plot on the web interface etc for more information.
Ah ... thanks, Sean. I knew I'd embarrass myself with my first post! I'd assumed the calibration process was for fine-tuning.

I've been slowly turning it around on the kitchen table and it's juuust beginning to make sense of its surroundings.

Many more clueless questions to follow no doubt. Cheers!