Once the three rows with the smallest Euclidian distance have been chosen, location is calculated with the following equations, where a is the smallest, b the second smallest, and c the third.