An apparatus includes an interface and a processor. The interface is configured for exchanging signals with: (i) a probe, which is inserted into a body of a patient and includes a flexible distal-end assembly, wherein the distal-end assembly comprises a magnetic position sensor and two or more intra-body electrodes, and, (ii) multiple body-surface electrodes attached externally to the body of the patient. The processor is configured to estimate, based on the signals exchanged with the probe, a spatial displacement of the magnetic sensor between consecutive measurements, and to estimate a position of the distal-end assembly in the body based on (i) the signals exchanged with the intra-body electrodes and the body-surface electrodes, (ii) a-priori known spatial relationships between two or more of the intra-body electrodes of the probe and (iii) the estimated spatial displacement of the magnetic sensor.