Skip to main content
. 2021 May 21;21(11):3578. doi: 10.3390/s21113578
Algorithm 2: Angle Based-Data Packet delivery.
1. Procedure ACQUIRE ANGLE FOR NEXT NODE (Sourceni, Sn (PACK)
2. For Re Ni do
3.   Tfn = D(ni, l1) ∗ D(nj, l2) − P (Er) then
4.   θ = A (x, y, z)
5.   Adjust angle for corresponding nodes ni → nj
6. End For
7. n 1
8. j 1
9.    While θ = 90 ± 3K do
10.    Pack Sn  Sn=NvA (xyz)  Nv  Er P Ack
11. If Pack  Ni and D (Sn) = (N (ln-l1) φ (fn Tn) then
12.   PCHG = n0minNv f(Nv(1Tn i=0nfn(Erπ2(A (x, y, z))
13. For Ni niD (Sn)
14.   Nj njD (Sn)
15.    End While
16. End For
17. Else
18.    Modify θ = A (x, y, z) PCHG 0 < θ < π
19. End if
20. For Er do
21.    for Re (Ni Nj) then
22.    Compute distance for nearest neighbor vector node then
23.       if Nv: Tfn = D(ni, l1) ∗ D(nj, l2) − P (Er) do
24.       Dissemination of data packet delivery until Er PCHG
25.       end if
26.     end for
27. End For
28. End if
29. End Procedure