An improved topography and aperture dependent motion compensation algorithm