Abstract: Aiming at the errors generated by the three-axis magnetic sensor during measurement, this article proposes a new algorithm: an ellipsoid fitting algorithm with an “outlier removal and random ...