How to determine the distance of lightning