View full-text article in PMC Sensors (Basel). 2021 Oct 29;21(21):7208. doi: 10.3390/s21217208 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 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 (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Shortest Routes in a Wireless Network Step: 1 Inputdata: Xu,Yu←Metercoordinates Xd,Yd←UDAPcoordinates Xeb,Yeb←Basestationcoordinates Xc,Yc←HeadOfficeCoordinates N=card(Xu);M=card(Xd) K=card(Xeb);P=card(Xc) XT=[Xu,Xd,Xeb,Xc];YT=[Yu,Yd,Yeb,Yc] Step: 2 Calculationofdistances: for i=1:card(XT) for j=1:card(YT) D(i,j)←Haversine([YiXi],[YjXj]) endfor endfor D(D=0)←∞ α=N+M+K+P;Dmax=δ∀δ∈Q+ Gα,α←ceros;G(D≤Dmax)←unos Step: 3 Minimumroadsandroutecosts: [rpciai]←compresssparsematrix(G) A=[rpciai] pred←Dijkstra(A,α) CostT←RouteCost(α,pred)