Patent ID: 7363718

Claim:
An orientation data generation method comprising: a measurement step of inputting data outputted from a geomagnetic sensor that detects magnetic fields in three axial directions and then measuring magnetic field data on the basis of the inputted data; a storage step of sequentially storing the magnetic field data measured by said measurement step; a determination step of determining whether or not a plurality of the magnetic field data stored by said storage step lie within a same plane in a three-dimensional orientation space; a provisional offset calculation step of, when said determination step has determined that the plurality of the magnetic field data, stored by said storage step, lie within the same plane in the three-dimensional orientation space, calculating provisional offset values on the basis of the magnetic field data and in accordance with a predetermined algorithm; an offset calculation step of, when said determination step has determined that the plurality of the magnetic field data stored by said storage step do not lie within the same plane in the three-dimensional orientation space, calculating offset values on the basis of the plurality of the stored magnetic field data and in accordance with an algorithm different from the predetermined algorithm; and an arithmetic operation step of correcting, with the calculated provisional offset values or the calculated offset values, magnetic field data measured after calculation, by said provisional offset calculation step or said offset calculation step, of said provisional offset values or said offset values and performing an arithmetic operation for determining orientation data on the basis of the corrected magnetic field data.