Patent ID: 7119533

Claim:
A control method of controlling a magnetic-field sensor for detecting the three-axis components of the terrestrial magnetic-field vector, said method comprising: calculating a reference coordinate point in a predetermined coordinate space by performing coordinate transformation for the three-axis components of the terrestrial magnetic field vector as a reference, and holding said reference coordinate point thus calculated; acquiring the three-axis component outputs of said magnetic-field sensor occurring when said sensor assumes five or more attitudes; performing coordinate transformation for the three-axis components thus obtained for each attitude to calculate five or more coordinate points in the same coordinate space as with said reference coordinate point; selecting four points which are as far as possible from one another among the five or more coordinate points, creating a sphere on which said selected four coordinate points are positioned, and obtaining a magnetic-field offset by calculating the distance between the center of said sphere thus created and said reference coordinate point; and calibrating said magnetic-field sensor using said magnetic-field offset.