Skip to main content
. 2019 Apr 9;19(7):1694. doi: 10.3390/s19071694
Algorithm 1 Pseudocode of the localization-aggregation method
Input: Points indicated by used methods with timestamps: GPS {(xGPS1,yGPS1),,(xGPSn1,yGPSn1)}; {tGPS1,,tGPSn1}, WLAN {(xWLAN1,yWLAN1),,(xWLANn2,yWLANn2)}, {tWLAN1,,tWLANn2}, BLE {(xBLE1,yBLE1),,(xBLEn3,yBLEn3)}, {tBLE1,,tBLEn3}, distributions of errors of GPS (fGPS), WLAN (fWLAN) and (fBLE), present timestamp t
Output: Coordinates of the optimum with value of function Φ(x,y) (Equation (10))
 Calculate range of calculations:
  • xmin=min{xGPS1,,xGPSn1,xWLAN1,,xWLANn2,xBLE1,,xBLEn3},

  • xmax=max{xGPS1,,xGPSn1,xWLAN1,,xWLANn2,xBLE1,,xBLEn3},

  • ymin=min{yGPS1,,yGPSn1,yWLAN1,,yWLANn2,yBLE1,,yBLEn3},

  • ymax=max{yGPS1,,yGPSn1,yWLAN1,,yWLANn2,yBLE1,,yBLEn3}.

Find a point (x,y) where x[xmin,xmax], y[ymin,ymax], with the maximum value of evaluation function Φ(x,y) (10) according to the grid method, local search, or another optimization method.