Skip to main content
. 2025 Feb 13;25(4):1141. doi: 10.3390/s25041141
Algorithm 1 Drone control algorithm.
  • 1:

    Initialize the parameters dmin,urr,λ

  • 2:

    while the drone has not reached the target do

  • 3:

       for each position pj (drones and obstacles) do

  • 4:

         Calculate the repulsive vector rj(t)=pi(t)pj(t)

  • 5:

         if rj(t)Δt<dmin then

  • 6:

            Calculate the weight βj

  • 7:

         end if

  • 8:

       end for

  • 9:
       Calculate the resulting vector:
    R(t)=j=1Nir^j(t)βj+λvd(t)
  • 10:
       Update the drone’s position:
    pi(t+Δt)=pi(t)+R(t)Δt
  • 11:

    end while