- Code: Select all | TOGGLE FULL SIZE
CLUE 1
(-10.5086, -7.46857, 39.8129)
(-11.1371, -7.04472, 40.2952)
(-11.1371, -7.04472, 40.2952)
- Code: Select all | TOGGLE FULL SIZE
CLUE 2
(-46.0976, 20.3449, 21.5288)
(-46.5653, 20.8272, 21.2803)
(-46.2146, 20.8857, 21.5873)
These do not look at all similar. I had a quick look at the component on the CLUEs and they both appear to have the same orientation on the board based on the text and pattern on the tiny chip.
I tested with a slightly less precise position/orientation and a magnet about 8cm from them and got:
- Code: Select all | TOGGLE FULL SIZE
CLUE 1
(-92.9845, -36.1736, -171.353)
(-92.6045, -36.2905, -171.485)
(-94.5922, -36.9921, -172.683)
- Code: Select all | TOGGLE FULL SIZE
CLUE 2
(-128.047, -2.30927, -204.238)
(-127.916, -2.51388, -203.727)
(-129.465, -1.95849, -205.013)
Perhaps I've answered my own question here, do these things have an unpredictable offset (bias) on them? The values look comparable if an offset is applied. Is the sort of subsantial variation seen here typical for the same sensor on the same board?
Ah, I've just found https://learn.adafruit.com/adafruit-sen ... alibration
Magnetometers can be used to detect orientation with respect to the Earths magnetic field. Basically, like a compass! We can tell which way is North, and thus correct for motion calculation errors and 'absolute orientation'
Good stuff! But, magnetometers have to measure a very small magnetic field of 35-65 uTesla, in a world full of magnets. And there's some offset when they are manufactured and pick and placed.
Of all the sensors that need calibration, magnetometers are the most essential to calibrate! Unless you're detecting strong magnets, there's no way for a magnetometer to work unless you perform a hard iron offset calculation. Once this is done, you will get rid of any strong magnetic offset values and be able to find magnetic North!
I'm now pondering whether the libraries should have a facility to apply an offset to the returned values?