2018-09-17 09:32 AM
Hello everyone,
I started with the implementation of the rotated ellipsoid fitting described in DT0059 for the LSM303AGR compass. There is as well a sample matlab code which I use to verify my implementation.
My software inside the microcontroller calculated all the steps described in the design tip 59. I get the same offsets, eigenvectors and -values as in Matlab.
In the paper, there are three steps described to correct the magnetic input values:
I made a simple test, where I fixed the PCB in the XY plane and rotate it (around the z-axis).
The red data points are the collected values, whereas the green should be the corrected fitted values.
My question now is:
How do I need to order the eigenvalues and -vectors, so that the input values and transformed to the correct places? The design tip just tells to "juxtaposition the three eigenvectors" (page 3), but depending on the order I get completely different results and unfortunately, none of them really makes sense.
Thank you and best regards
Daniel