Magneto works.
If the corrected magnetometer data points do not lie (roughly) on the surface of a sphere centered on the origin, then you applied the Magneto scale matrix and offsets incorrectly.
Magneto works.
If the corrected magnetometer data points do not lie (roughly) on the surface of a sphere centered on the origin, then you applied the Magneto scale matrix and offsets incorrectly.