|
Algorithm 1 Drone control algorithm. |
-
1:
Initialize the parameters
-
2:
while the drone has not reached the target do
-
3:
for each position (drones and obstacles) do
-
4:
Calculate the repulsive vector
-
5:
if then
-
6:
Calculate the weight
-
7:
end if
-
8:
end for
-
9:
Calculate the resulting vector:
-
10:
Update the drone’s position:
-
11:
end while
|