Research Article
Copy Adaptive Routing Algorithm Based on Network Connectivity in Flying Ad Hoc Networks
Algorithm 1
CCAT data forwarding algorithm.
| (1) | for all packets in nodea | | (2) | if node a estimates the network is connected then | | (3) | optimal node = nodea | | (4) | for all nodeb in nodea’s neighborhood do | | (5) | ifthen | | (6) | optimal node = nodeb | | (7) | end if | | (8) | end for | | (9) | if optimal then | | (10) | forward the packet to the optimal node | | (11) | end if | | (12) | else | | (13) | for all nodeb in nodea’s neighborhood do | | (14) | if then | | (15) | forward a copy to node b | | (16) | end if | | (17) | end for | | (18) | end if | | (19) | end for |
|