Patent ID: 7937845

Claim:
An electronic device comprising: an orientation sensor with a two-dimensional magnetometer, wherein: the sensor is operable to supply a first signal and a second signal for determining first and second components, respectively, of the three-dimensional earth-magnetic field vector at a geographic location of the device; and a data processor operable to determine multiple candidates for the third component of the earth-magnetic field vector based on the first and second components and on a given strength of the earth-magnetic field at the geographic location of the device; determine multiple candidates for the gravity vector, based on a given inclination and a given strength of the earth-magnetic field vector at the geographic location of the device, assuming that an axis of the device is being held horizontally; select a relevant one of multiple candidates for the third component of the earth-magnetic field vector, select a relevant one of the multiple candidates for the gravity vector and determine further data representative of the attitude of the device based on the first and second components of the earth magnetic field vector, and based on the selected candidates.