Skip to main content
. 2023 Jul 2;23(13):6095. doi: 10.3390/s23136095
Algorithm 1 Best-SNR-Based Association.
  • 1:

    Place a UAV in the center of each cluster

  • 2:

    Calculate NLoS-SNR(U,M) using Equation (8)

  • 3:

    I1, NLoS-SNR-Best = zeros(|U|, 1)

  • 4:

    for m=1 to |M| do

  • 5:

        count 0

  • 6:

        while count <|U|/|M| do

  • 7:

            [val,idx]max(NLoS-SNR(:,m))

  • 8:

            NLoS-SNR-Best(I,1)val

  • 9:

            II+1

  • 10:

          Delete NLoS-SNR(idx,:)

  • 11:

          count ← count +1

  • 12:

       end while

  • 13:

    end for

  • 14:

    total-throughput ← sum(NLoS-SNR-Best)