Once the offline data is entered into a database, the fingerprinting algorithm will compare realtime RSSI information received by the device to the known locations and RSSI values in the database.  The comparison uses the k-Nearest Neighbor algorithm to find similar fingerprints.  In this case, it judges similar fingerprints by calculating the Euclidean distance. The Euclidean distance of the measured vector of the fingerprint from the i’th fingerprint in the database can be expressed by the formula in Figure 20.