A method for tracking a position of an object includes generating alternating current (AC) magnetic fields at two or more frequencies in a vicinity of the object using at least one field generator. The AC fields are sensed using a field sensor associated with the object. Corresponding AC data points that are indicative of amplitudes and directions of the AC fields at the field sensor are produced, wherein at least some of the sensed AC fields are subject to a distortion. A dependence of the AC data points on the frequencies of the AC fields is extrapolated to a target frequency so as to determine the amplitudes and directions of the AC fields with a reduced level of the distortion. Position coordinates of the object relative to the at least one field generator are calculated responsively to the extrapolated data points.