The invention relates to a method for determining a heading, wherein a magnetic field is measured by at least one magnetometer and a magnetic heading is determined from said measurement, and wherein calculation means carry out a process in which they calculate, for each measurement of magnetic heading, a value for characterising the heading thus determined, characterised in that said characterisation value is a monotonic function of a norm of the gradient of the magnetic field measured, said value being used in determining the heading.
展开▼