Algorithm 2. Broadcast thread for UAV-WSN discovery (pseudo-code). |
(1) define the Broadcast process thread{ (2) begin the process; (3) set up broadcast connection; (4) while (UAV is in survey_ON) do (5) Wait (time); (6) prepare the packet data; (7) send broadcast message; (8) update last broadcast position; (9) while end (10) end the process; (11) } |