Page 1 of 1

What are the values returned by get_compass_raw measured in?

Posted: Wed Jul 01, 2015 9:35 pm
by zeta_5416
In the documentation for the Python Astro Pi API, it is stated that the values returned by get_compass_raw 'are Floats representing the magnetic intensity of the axis in teslas'.

Either my Sense HAT must be malfunctioning, or my local magnetic field is indeed ~7 times that required to levitate a frog.

I have ensured that there are no nearby devices which could possibly interfere with my results. Is this an error with the documentation? I am wondering whether the results are in fact supposed to be in milliteslas. Any clarification would be helpful.

Re: What are the values returned by get_compass_raw measured

Posted: Thu Jul 02, 2015 10:29 am
by Davespice
I'll double check this.
You may find that the mag doesn't behave correctly until you've calibrated it. Make sure you note this post at the bottom.

Re: What are the values returned by get_compass_raw measured

Posted: Thu Jul 02, 2015 6:27 pm
by zeta_5416
Hmm, I thought that I'd calibrated it. Not seen that final post which you referenced, but even after reinstalling and updating everything, then re-calibrating and placing RTIMULib.ini in /etc/, I am still getting mildly worrying results. After calibration, my local magnetic field strength is only ~4.5 times that required to levitate a frog now - so that's a bonus, I suppose.

By the looks of things, the results that I am currently getting should be in the order of magnitude of 10 to the -6 Teslas, so the documentation should probably specify microteslas (┬ÁT). Hope this helps.

Re: What are the values returned by get_compass_raw measured

Posted: Mon Jul 06, 2015 9:50 am
by Davespice
We've just checked this out and the unit is indeed microteslas. Thanks for pointing this out.
P.S. The LSM9DS1 datasheet says gauss but this is converted by RTIMULib into microteslas before it's passed up to the Astro Pi library.

Re: What are the values returned by get_compass_raw measured

Posted: Mon Jul 06, 2015 10:10 am
by zeta_5416
Thanks for the clarification.