1. A system to localize a device in an indoor environment, the system comprising: wireless signal transceivers positioned in the indoor environment, wherein the indoor environment contains one or more polygonal obstructions; a server comprising a processing unit, a memory unit, and a server communication unit, and the processing unit is programmed to: receive a signal strength profile, wherein the signal strength profile includes at least one of signal strengths of the wireless signal transceivers received at the device in the indoor environment and signal strengths of the device received at the wireless signal transceivers in the indoor environment; determine a raw estimated location of the device in a coordinate plane representing the indoor environment by using a K-nearest neighbor (KNN) algorithm to compare the signal strength profile with reference profiles stored in a database; calculate a straight-line path in the coordinate plane connecting the raw estimated location to an immediately preceding location of the device; select the raw estimated location as the candidate location if the straight-line path does not intersect any of the polygonal obstructions in the coordinate plane using a polyxpoly( ) function as follows: if isempty(polyxpoly[(x_old x_raw], [y_old y_raw], keepouts_x, keepouts_y)) [x_est, yet]=LPF(dt, x_old, y_old, e_raw, y_raw, p_gain, v_lim), wherein x_old and y_old represent the immediately preceding location, wherein x_raw and y_raw represent the raw estimated location, and wherein x_est and y_est represent the candidate location; calculate a weighted-average location using the immediately preceding location and the candidate location; and store the weighted-average location as a new location of the device in the indoor environment when a hypothetical velocity calculated using an elapsed time and a distance separating the immediately preceding location and the weighted-average location is less than or equal to a saturation velocity.