Skip to main content
. 2020 Jun 2;20(11):3160. doi: 10.3390/s20113160
Algorithm 1 Service-oriented aerial routing in UAANETs
Input: Loc, V, CoGAD=0, LGAD, DGAD=0, Bid;
Process:
  1. IGAD (Loc, V, CoGAD=0, CGAD, DGAD=0, Bid)

  2.   IG sends IGADs periodically.

  3.   UAV node j receives IGAD packet.

  4.   if received packet based on BADF scheme condition then

  5.    Node j computes Coj, Lj and Dj according to Equations (12), (13) and (22).

  6.    if (CoGAD=0 || Coj<CoGAD) then

  7.      CoGAD=Coj

  8.    end if

  9.    if (Lj=0||Lj<LGAD) then

  10.      LGAD=Lk.

  11.    end if

  12.     DGAD=DGAD+Dj.

  13.    Update IGAD packet while replacing, Loc and V with Locj and Vj, and updating Ts.

  14.    Update route QoS metrics Co,L,D in routing table of node j.

  15.    Forward IGAD packet based on BADF scheme

  16. else discard IGAD packet;

  17. end if

  18. Compute Cr for each route r according to Equation (23) from routing table of UAV node

  19. C=minCr

  20. Select the route with C

  21. Select the IG with C

  22. Output: Optimized route and IG