Reply To: Question about the compass_tutorial01.c

Home Forums Forums Technical Support for BerryGPS and BerryGPS-IMU Question about the compass_tutorial01.c Reply To: Question about the compass_tutorial01.c

#17343
thn_tpl
Participant

Hello,

I have followed the instruction how to calibrate the compass here https://ozzmaker.com/compass3/

After that I recompile the test 03 program with the result of Min/Max values. However when I did a test with my unit positioned in one direction and then 180 turn around, I got these heading result:

First test results:

heading 354.670          magRaw X 589   magRaw Y 571    MagRaw Z -220

heading 356.553          magRaw X 506   magRaw Y 527    MagRaw Z -268

heading 354.433          magRaw X 577   magRaw Y 538    MagRaw Z -238

heading 355.347          magRaw X 504   magRaw Y 528    MagRaw Z -218

heading 354.452          magRaw X 563   magRaw Y 521    MagRaw Z -213

 

Second test result:

 

heading 303.325          magRaw X -685  magRaw Y -543   MagRaw Z -282

heading 302.978          magRaw X -554  magRaw Y -514   MagRaw Z -304

heading 306.539          magRaw X -697  magRaw Y -540   MagRaw Z -285

heading 302.722          magRaw X -633  magRaw Y -504   MagRaw Z -295

heading 304.783          magRaw X -621  magRaw Y -472   MagRaw Z -321

So I expected the result to be around 180 degrees apart but it was not. Please help me figure out what did I do wrong?

Thanks,

Blip, blop, bloop...