Skip to main content
. 2020 Apr 11;20(8):2173. doi: 10.3390/s20082173
Algorithm 1 Algorithm description of escape guidance path developing
1: Input: st
2: Output: Psth
3: Initialize: h = 1, node i = target node, node u = target node
4: while (node i != source node) do
5:  if node i has next trustable anchor node n then
6:   calculate the distance d between node i and node n
7:   add the path ph to Psth
8:   h = h + 1
9:   node u = node i, node i = node n
10:  else
11:    node i = node u
12:  end if
13: end while
14: for j = 1 to h do
15:  sum all d in ph, calculate result dsum
16:  choose the shortest dsum as path ph
17: end for
18: return Psth