View full-text article in PMC Sensors (Basel). 2020 Jun 16;20(12):3406. doi: 10.3390/s20123406 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2020 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 1 Pseudo code for W-GPCR locp=getLocation(currentnode)=(xp,yp) vp→=getSpeed(currentnode) neigp=getNeig(currentnode) locd=getLocation(destnode)=(xd,yd) Dpd=(xp−xd)2+(yp−yd)2 lpd→=locd−locp=(xd−xp,yd−yp) S=πr2 G=g2cos(vp→,lpd→)+g3neigpS nextnode=currentnode for all neighbors of currentnode do loci=getLocation(ni)=(xi,yi) vi→=getSpeed(ni) Did=(xi−xd)2+(yi−yd)2 lid→=locd−loci=(xd−xi,yd−yi) neigi=getNeig(ni) Gi=g1(1−DidDpd)+g2cos(vi→,lid→)+g3neigiS If Gi>G then G=Gi nextnode=ni end if end for if. nextnode≠currentnode. then forward the packet to nextnode else carry the packet with currentnode end if