|
Algorithm 2 Prioritized-based contact-duration frame selection mechanism (PCdFS) Algorithm. |
|
Input: Initial deployed information of nodes and UAVs, , , , . |
|
Output:,
|
| 1: for
,
do
|
| 2: Make a judgement for sensor and : which priority area does them in; |
| 3: Calculate the contact duration between and the , and the , respectively; |
| 4: end for
|
| 5: For (and ), allocated to the one (e.g., , and for , and , for ) which is within the higher priority area; When more than one node within the same high priority area, allocated to the one (e.g., for , and for ) which has the shorter contact duration with the UAV. |
| 6: In , and send packets to and respectively; |
| 7: Update , ; |
| 8: return
and ; |