View full-text article in PMC Sensors (Basel). 2018 Nov 9;18(11):3862. doi: 10.3390/s18113862 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 2BLocate Building identification with sensors’ data. 1:if User is walking then 2: for j⟵1to4 do 3: Gs(j)⟵generatePatternusingGf; 4: for k⟵1toN do 5: Ebij⟵calculateEuclideanDistanceusingGsanddBk; 6: mEbij⟵getminimumEuclideandistancefromEbij; 7: end for 8: EbkN˜⟵normalizeEuclideandistanceusingmEbijandNb; 9: Bc⟵getminimumfromEbkN˜; 10: end for 11: end if 12:B⟵finallylocalizebuildingbyremovingoutliersusingBc;