calibrated delay function, with distance variable