Echo behavior and distance calculation