Skip to main content
. 2025 Jul 22;25(15):4538. doi: 10.3390/s25154538
Algorithm 1: Proposed direct-path identification and tracking
  • 1:

    for each localization moment do

  • 2:

        identify the transition from LOS to NLOS

  • 3:

        if the direct path does not change abruptly then    ▹Under the LOS scenario

  • 4:

            identify the earliest arrival path as the direct path

  • 5:

        else                      ▹Under the NLOS scenario

  • 6:

            if there are fewer than three consecutive moments under LOS then

  • 7:

               calculate the direct-path delay using Equation (1)

  • 8:

            else

  • 9:

               for i=1,...,n do

  • 10:

                   obtain Δh and vi

  • 11:

                   calculate Δti=titi1

  • 12:

                   calculate ωi=eλ(ni)i=1neλ(ni)

  • 13:

                   calculate the direct-path delay using Equation (2) ▹ Track the direct path

  • 14:

               end for

  • 15:

            end if

  • 16:

        end if

  • 17:

    end for