Modified new trilateration algorithm.