The influence of surface drift velocities on in situ scanning tunnelling microscopy (STM) experiments with atomic resolution is analysed experimentally and mathematically. Constant drift velocities much smaller than the speed of scanning can in many in situ STM experiments with atomic resolution result in an apparent surface reconstruction. It is shown that a surface atomic structure can be distorted and observed as another atomic structure entirely owing to a constant drift velocity in the plane of the surface. The image can be resolved mathematically and the components of the drift velocity as well as the vectors of the non-distorted surface lattice can be determined. The calibration of distances can thus be carried out also when the image is influenced by drift. Results with gold surfaces and graphite surfaces are analysed and discussed.