0
\$\begingroup\$

I am testing on a magnetometer and found that moving the magnetometer along a straight line within the range around 1m, and the measurement varies. From what I understand, moving magnetometer along a line won't change its orientation and the range within 1m guarantees that the magnetometer won't suffer much from soft-iron distortion(test in many environments), so I am quite confused about what's happening here...

\$\endgroup\$
  • \$\begingroup\$ are you sure that you are reading the magnetometer output? ... does the module have an accelerometer, for example? \$\endgroup\$ – jsotola Nov 8 '19 at 22:21
  • \$\begingroup\$ @jsotola yeah it's magnetometer, first I used the app in iPhone and this happened, and I guess that might be caused by iPhone, then today I received an IMU and ran the same test and found this again \$\endgroup\$ – XJY95 Nov 9 '19 at 3:49
0
\$\begingroup\$

The earth's magnetic field is weak and many electrical appliances and current conductors (power lines, power cords) also generate magnetic fields. Do your test outdoors, away from any power lines, cars, mobile phones, etc.

\$\endgroup\$
  • \$\begingroup\$ Thank you for the answer! Unfortunately my project is indoors, also actually in my test 10cm movement would yield obvious difference, which makes me think that I might have some misunderstanding about how magnetometer works... \$\endgroup\$ – XJY95 Nov 9 '19 at 3:47
  • \$\begingroup\$ If you're still able to do a test in isolation, you can see whether magnetic disturbance is actually the source of the error. You might be able to work out a calibration to counter known magnetic fields. \$\endgroup\$ – Anders Petersson Nov 9 '19 at 9:00
  • \$\begingroup\$ Thank you for the advice, I'll see if I can work this out \$\endgroup\$ – XJY95 Nov 9 '19 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.