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.
- Davespice
- Forum Moderator
- Posts: 1665
- Joined: Fri Oct 14, 2011 8:06 pm
- Location: The Netherlands
- Contact: Twitter
Re: What are the values returned by get_compass_raw measured
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.
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
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.
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.
- Davespice
- Forum Moderator
- Posts: 1665
- Joined: Fri Oct 14, 2011 8:06 pm
- Location: The Netherlands
- Contact: Twitter
Re: What are the values returned by get_compass_raw measured
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.
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
Thanks for the clarification.