I have been playing with this part and the news is good/bad.
The bad is that once again the data sheet fails to document a key bit of behavior. According to the data sheet you can set the device to do continuous conversions at various rates. What they fail to tell you is how accurate those rates are. I configured my copy for 50 SPS. I was very surprised to find that it wasn't even close. The actual rate was 73.46 SPS. From this I conclude that the internal clock is a pretty simple RC oscillator and that this rate will vary with temperature. Possibly a lot.
I tried out some code
for calibration of the sensor. The usual method of calibrating magnetic sensors is to carefully rotate them to find the minimum and maximum values which gets pretty tedious. This automatic method requires only that you get 6 different values. Diversity in those helps a lot but you don't have to be fanatical about it. The output is gains and offsets assuming a field strength of 1. This is fine for orientation but not so good if you want to measure absolute field strength.
While looking for information on quaternions I ran across a paper that discussed an analysis technique called the Allan Variance. It looked interesting so I wrote some code and captured some data. I am not sure how to get actual numbers out of the plot
. But it does show the expected -1/2 slope for white noise, a minimum, and then a positive slope. I am trying to locate more information so that I can use this to put numbers on things like noise, offset drift, and perhaps other processes. (While searching I discovered that the NIST program Dataplot
does Allan Variance. If I had thought to check its vast bag of tricks I would have saved some time coding.)