Skip to main content
. 2021 Aug 1;21(15):5223. doi: 10.3390/s21155223
Algorithm 1 Function GD-Taylor()
Input Locations of anchors (x1, y1), (x2, y2), …, (xn, yn)
Received timestamps 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 (t2t1), (t3t1), …, (tnt1);
2 Set weight to 10−10;
3 Set (x, y) to (xinit, yinit);
4 whiletimes < max_iter do
5 d1, d2, …, dn are the distances from anchors to (x, y);
6 use (8) and (11) to calculate δTaylor and δGD;
7 Set δGD-Taylor to (δTaylor + δGD);
8 Set weight to (weight + δGD-Taylor, x2 + δGD-Taylor, y2);
9 Set x to (x + δGD-Taylor, x /(weight)1/2);
10 Set y to (y + δGD-Taylor, y /(weight)1/2);
11 times++;
12 if ((δGD-Taylor, x2 + δGD-Taylor, y2)/weight)1/2 < 0.001 then
13 break
14 endif
15 endwhile
16 return (x, y)