An apparatus includes a guide wire (22) configured to be inserted into a passage of a living body (28), and at least one electrical conductor (34) and electrical insulation covering a surface of the conductor (34) with a gap formed in the electrical insulation at a predefined position on the guide wire. A processor (46) is configured to measure an electrical impedance of the body (28) between the conductor (34) at the gap and one or more electrodes (R1,R2,R3) fixed to the body, and to calculate a location of the gap within the passage in the body in response to the measured impedance.