Skip to main content
. 2019 Nov 27;19(23):5204. doi: 10.3390/s19235204
Algorithm II. 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
2: while (tag is not detected)
3:   Do   record data from inertial sensors in IS table
4: End While
5: Read Detections, IS, and TDV tables // a tag is detected
6: Update Detections table with current detection
7: If (Detections table has 2 entries)
8:  Calculate displacement vector(s) v01 based on IS table
9:  C0 = Circle around ATL0 coordinates in l0n by a radius of v01
10:  C1 = the circle around the current reader by a radius of RSSI mapped detection range
11:  Calculate the set of intersection points between C0 and C1
12:  All intersection points I are reported to a central server as ATL1_i, iI
13: Else if (Detections table has 3 entries)  // check for enough detections to perform IBST
14:  Calculate displacement vector(s) v12 based on IS table
15:  C0 = Circle around ATL0 coordinates in l0n by a radius of v02
16:  C1 = Circle around ATL1 coordinates in l1n by a radius of v12
17:  C2 = the circle around the current reader by a radius of RSSI mapped detection range
18:  Calculate the set of intersection points A’s between C0 and C1
19:  Calculate the set of intersection points B’s between C1 and C2
20:   If (there are 2 intersections between C1 and C2)
21:    ATL2 = B. of min (A1B1,A1B2,A2B1A2B2),
22:   Else if (there are 4 intersections between C1 and C2)
23:    ATL2_1 = B. of min (A1B1A1B2A2B1A2B2),
24:    ATL2_2 = B. of min (A3B3A3B4A4B3A4B4),
25:    Update Detections table with l2n and TDV table with v12, go to 2
26:   Else (there is no intersection between C1 and C2)
27:    Find vector from Di=AiR2, find Di=AiR2 for i=1 to 4
28:    ATL2 = R2+d2.Di of min Di,
29:   End if
30:  Report ATLi to a central database server
31:  Update Detections table with l3n and TDV table with v12, go to 2
32: Else
33:  go to 2
34: End If