摘要 |
The object of the present invention is to provide a calibration program and an electronic compass that make it possible to calibrate the output of a magnetic sensor with a small amount of computation while a user does not notice the execution of calibration. A calibration program according to an aspect of the invention includes: a step of forming at least two triangles 21 and 22 with the use of at least four outputs of a magnetic sensor in a three-dimensional space; a step of finding circles 23 and 24 circumscribed about the triangle 21 and 22, respectively; and a step of finding the intersection of normal vectors 25 and 26 each of which passes through the center of the corresponding circumscribed circle so as to find a reference point.
|