|
Algorithm 2 Path-planning algorithm in the sensor network. |
-
1:
for
to
do ▹ Initialize all to 0
-
2:
-
3:
end for
-
4:
while any exists do ▹ Run until DaaG collects data from every sensor
-
5:
if DaaG visits
then
-
6:
-
7:
= getSensorToVisit() ▹ Get unvisited sensor , which has the highest
-
8:
= getPosition()
-
9:
moveDaaGTo ▹ Command flight controller to move to
-
10:
end if
-
11:
T = getSensorListFromCollectedData(D) ▹ Get list of sensed sensors from D
-
12:
for each
in T
do
-
13:
if
then
-
14:
-
15:
end if
-
16:
end for
-
17:
end while
|