Revised calcdistance method in Trilateration