A method for position tracking includes placing an internal reference probe in a reference location within a heart of a subject, and collecting and processing first location coordinates of the internal reference probe during one or more respiratory cycles so as to define a range of the location coordinates corresponding to the reference location. An active device is inserted into the heart, and second location coordinates of the active device are collected. The first and second location coordinates are jointly processed so as to find relative location coordinates of the active device in a cardiac frame of reference. When a deviation of the first location coordinates from the range is detected, the relative location coordinates are corrected to compensate for displacement of the reference probe from the reference location.