Patent attributes
The invention relates to a method for defining a compass direction by means of an electronic compass device. In the method at least two field components of an external magnetic field are measured, from which a set of data points is formed, which correspond to the different orientations of the device relative to the external magnetic field, so that the location of the data points in a set of co-ordinates depends on the Earth's magnetic field and the magnetic disturbances of the environment. From the data points it is determined whether the set of data points correspond to a measurement, in which the device has remained on the horizontal plane with a predefined accuracy, or the tilting of the device is detected relative to the horizontal plane during measurement and the set of data points is corrected to correspond to a measurement in which the device has remained on the horizontal plane with a predefined accuracy. If the set of data points corresponds to a measurement in which the device has remained on the horizontal plane with a predefined accuracy, or the said correction of the set of data points has been performed, a new compass direction is defined by using the disturbance correction made on the basis of the said set of data points. The invention achieves a practical way of displaying an accurate direction.