Skip to main content
. 2024 Mar 25;24(7):2088. doi: 10.3390/s24072088
Algorithm 4 Simulated tracking
  •   1:

    procedure Tracking(profile, RSSI, filter, freq)

  •   2:

          Group all readings by frequency                                 ▹ 3 s, 5 s, or 10 s

  •   3:

          for each frequency group i do

  •   4:

                if Group i not Empty then

  •   5:

                      Group RSS[i] by Beacon_id

  •   6:

                      for each Beacon group j do

  •   7:

                            if filter==TRUE then

  •   8:

                                 RSSI = MovingAvg(RSSI, 2)

  •   9:

                            fp[j] = getCurrentFingerprint(RSSI)

  • 10:

                      prediction[i][‘location’] = nearestNeighbor(fp, profile)

  • 11:

                      prediction[i][‘true_loc’] = round(group[‘true_loc’].mean())

  • 12:

          return prediction