Patent ID: 7676341

Claim:
A magnetic sensor control device comprising: an input section that inputs a plurality of magnetic data having 3 components sequentially output from a 3-dimensional (3D) magnetic sensor; a buffer that stores the plurality of the input magnetic data; a selection section that selects 4 magnetic data satisfying a predetermined 4-point selection condition from the plurality of the input magnetic data, wherein the selection section selects (n−1)th magnetic data satisfying a predetermined selection condition before selecting nth (n=2, 3, or 4) magnetic data, then obtains magnetic data, which has not been selected as any of up to the (n−1)th magnetic data, from the buffer, and sets the obtained magnetic data as a candidate for selection of the nth magnetic data; a calculation section that calculates a center point equally distant from 4 points each represented by 3 components of a corresponding one of the 4 selected magnetic data; and a setting section that sets 3 components representing the center point as an offset of the magnetic data.