Skip to main content
. 2019 Nov 27;19(23):5204. doi: 10.3390/s19235204
Algorithm I. Ideal Inertial-Based Shifting Trilateration.
Input: Asynchronous readers’ detections, raw inertial sensor data
Output: Updated Absolute Tag Location (ATL)
1: initialize tag memory: empty Detections, IS, TDV, and ATL tables
2: while (tag is not detected)
3:   Do   record data from inertial sensors in IS table
4: End While
5: Read Detections and IS tables // a tag is detected
6: Update Detections table with lkn
7: If (Detections table has k > 0 entries)
8:  Calculate displacement vector(s) v(k1)k based on IS table
9: End If
10: If (Detections table has k = 2)  // check for enough detections to perform trilateration
11:  C0 = Circle around ATL0 coordinates in l0n by a radius of v01+v12
12:  C1 = Circle around ATL1 coordinates in l1n by a radius of v12
13:  C2 = the circle around the current reader by a radius of RSSI mapped detection range
14:  Calculate the current absolute tag location by trilateration of C0,C1, and C2
15:  Delete l0n and v01; // delete first entry in Detections and TDV tables
16:  If (solution is unique)
17:   Report current ATL (ATLi) to a central database server
18:   Update ATL table; go to 2  // add the new ATL to previous ATL entries
19:  Else
20:   go to 2
21:  End If
22: Else (Detections table has k = 1)
23:   C1 = Circle around L2 coordinates in l2n by a radius of v12
24:   C2 = the circle around the current reader by a radius of RSSI mapped detection range
25:   Calculate the current absolute tag location(s) by intersecting C1 and C2
26: Else
27:  Update Detections table with lkn and TDV table with v(k1)k, go to 2
28: End If