A system includes multiple electrically-conductivechannels and a processor. The processor is configured toreceive, over the electrically-conductive channels, (i)respective first electric currents from a probe, which iswithin a body of a patient, via a plurality of first electrodes,which are attached to skin of the patient at a region of thebody, and (ii) a second electric current from the probe via asecond electrode, which is attached to the skin and isconnected to one of the channels. The processor is furtherconfigured to ascertain respective first electric-currentvalues of the first electric currents and a secondelectric-current value of the second electric current, and to calculatea position of the probe between the region and the secondelectrode, based on the first electric-current values and thesecond electric-current value. Other embodiments are alsodescribed.