Algorithm 1. Function of the GD–Taylor method. | |
Input | Locations of anchors (x1, y1), (x2, y2),…, (xn, yn) Received time stamps t1, t2,…, tn Maximal iteration time max_iter Initial location (xinit, yinit) |
Output | Estimated location of tag (xt, yt) |
1 | Calculate d21, d31, …, dn1 by multiplying light speed and time resolution to (t2 t1), (t3 t1), …, (tn t1); |
2 | Set weight to 10−10; |
3 | Set (x, y) to (xinit, yinit); |
4 | while times < max_iter do |
5 | d1, d2, …, dn are the distances from anchors to (x, y); |
6 | use (8) and (11) to calculate and ; |
7 | Set to (+); |
8 | Set weight to (weight+ + ); |
9 | Set x to (x+ /(weight)1/2); |
10 | Set y to (y+ /(weight)1/2); |
11 | times++; |
12 | if ((, x2+ , y2)/weight)1/2 < 0.001 then |
13 | break |
14 | end if |
15 | end while |
16 | return (x, y) |