A method, using multiple patches fixed to a surface of a body, the patches including respective electrodes in contact with the surface, and at least one of the patches configured to output a signal in response to a magnetic field applied to the body. Initially, the signal is processed to compute first magnetic and first electrical locations of the at least one of the patches. Subsequently, the signal is processed to compute second magnetic and second electrical locations of the at least one of the patches. A first relation is computed between the first magnetic and electrical locations, and a second relation is computed between the second magnetic and electrical locations. When there is a difference between the first and the second relations, a magnetic location correction is computed responsively to the difference, and the correction is applied in tracking a position of a magnetic tracking sensor inside the body.