## 3 Proposed Protocol
### Data Forwarding Algorithm
#### Determining the Base Path  
We use dynamic base path that is probabilistically chosen from a set of base path candidates. Suppose \(N\) and \(M\) be two nodes in the network, we denote \(\mathcal{X}(N)=\mathbb{C}(\overline{N},\overline{M})\cup\mathcal{H}(M)\cup \mathcal{H}(N)\) if \(N\) is a \(M\)-aware node, and \(\mathcal{X}(N)=\mathbb{C}(\overline{N})\cup\mathcal{H}(N)\), otherwise. **Definition 1** (\(\Gamma\)-bounded path). : _An \(\Gamma\)-bounded path from \(N\) to \(M\) is a Euclidean paths bypassing all elements of \(\mathcal{X}(N)\) and satisfying the following conditions:_  
* _Its length does not exceed_ \(\Gamma\)_._
* _The angle between any segment connecting its two consecutive vertices and vector_ \(\overrightarrow{NM}\) _is an obtuse angle._
* \(M\) and \(N\) are said to be visible to each other if \(MN\) does not intersect the interior of \(\mathbb{C}(\overline{s},\overline{t})\), \(\mathcal{H}(s)\) and \(\mathcal{H}(t)\). Below is the algorithm to determine the base path. First, \(s\) constructs the visibility graph \(G=(V,E)\) as follows. If \(s\) is a \(t\)-aware node, then \(V\) consists of \(s\), \(t\) and all the vertices of \(\mathbb{C}(\overline{s},\overline{t})\), \(\mathcal{H}(t)\) and \(\mathcal{H}(s)\). Otherwise, if \(s\) is a \(t\)-blind node, then \(V\) consists of \(s\), and all the vertices of \(\mathbb{C}(\overline{s})\) and \(\mathcal{H}(s)\). Two vertices of \(V\) is connected if they are visible to each other. \(s\) applies the breath-first search algorithm on graph \(G\) to determine the base path candidates as follows. * If \(s\) is a \(t\)-aware node, the base path candidates are all paths from \(s\) to \(t\) that are either the shortest path or \(\sin\frac{(n-2)\pi}{2n}(1+\epsilon)|\mathcal{L}(s,t)|\)-bounded paths, where \(\mathcal{L}(s,t)\) is the shortest path from \(s\) to \(t\), \(n\) is the minimum number of vertices of the core polygons. * If \(s\) is a \(t\)-blind node, the base path candidates are all paths from \(s\) to a vertices on \(\mathcal{C}(t)\) that are \((\Gamma_{1}\times|\mathcal{L}\left(s,\mathcal{C}(t)\right)|)\)-bounded paths, where \(\Gamma_{1}=Max\left\{1,\frac{\sin\frac{(n-2)\pi}{2n}\left((1+\epsilon)d_{ \mathcal{C}(t)}(s)-\frac{\mathcal{P}(t)}{2}\right)}{d_{\mathcal{C}(t)}(s)+ \frac{\mathcal{C}(t)}{2}}\right\}\) and \(\mathcal{L}\left(s,\mathcal{C}(t)\right)\) denotes the shortest length of the shortest paths from \(s\) to a vertex of \(\mathcal{C}(t)\). Second, all base path candidates are assigned priority indexes as follows. Let \(\mathbb{B}\) be the set of all base path candidate and \(\mathcal{B}_{1},\mathcal{B}_{2},....,\mathcal{B}_{|\mathbb{B}|}\) be the base path candidates. Denote \(B^{i}_{1},...,B^{i}_{|\mathcal{B}_{i}|}\) as all the vertices of \(\mathcal{B}_{i}\). Let \(\mathbb{P}\) be the set of all core polygons and \(\mathcal{P}_{1},\mathcal{P}_{2},....,\mathcal{P}_{|\mathbb{P}|}\) be the core polygons. Denote \(P^{u}_{1},...,P^{u}_{|\mathcal{P}_{u}|}\) as all the vertices of \(\mathcal{P}_{u}\). We define the margin of a base path \(\mathcal{B}_{i}\), denoted as \(m_{\mathcal{B}_{i}}\), by the minimum distance from a vertex of \(\mathcal{B}_{i}\) to an edge of a core polygon and the distance of a vertex of a core polygon to an edge of \(\mathcal{B}_{i}\). More specifically,  
\[m_{\mathcal{B}_{i}}=\underset{j=1,|\mathcal{B}_{i}|=\overline{1},|\mathcal{B} _{i}|=\overline{1},|\mathbb{P}|=\overline{1},|\mathcal{P}_{u}|}{\left\{d(B^{i }_{j},P^{u}_{v},P^{u}_{v+1}),d(P^{u}_{v},B^{i}_{j}B^{i}_{j+1})\right\}}\]  
where \(d(A,l)\) depicts the Euclidean distance from a point \(A\) to a line segment \(l\). The priority index of \(\mathcal{B}_{i}\) is defined as \(1-\frac{m_{\mathcal{B}_{i}}}{\sum_{i=1}^{|\mathcal{B}_{i}|}m_{\mathcal{B}_{i}}}\)  
Finally, \(s\) probabilistically chooses from the base path candidate set a base path such that the probability for a base path candidate to be chosen is proportional with its priority index. Algorithm 1 describes the pseudo code for determining the base path candidate.