# Movable Platform-Based Topology Detection for a Geographic Routing Wireless Sensor Network
## 3 Workflow
### Topology Modeling  
When studying two location-based routing protocols, we found that although each node has a different path to the station in the two protocols under the same scenario, the number of hops from each node to station is basically the same once energy consumption is not considered. From another perspective this phenomenon can be interpreted like this: when the number of hops from node to station is certain, routing node of GEM routing protocol should be the node that is closest to the transmitting node among all nodes of last hop, within the communication range of transmitting node; while the routing node of GEAR routing protocol should be the node that is the closest to the station among all nodes of last hop, within the communication range of transmitting node. It provides ideas for topology modeling. We constructed an universal cost equation to explain location-based routing protocol. Figure 7: The figure is the trace diagram about how the platform seeks for station based on above rules in 1 time of simulation, where the red circle represents station position and the red rhombus is the starting position of platform (randomly), and the black lines represent the motion trace of the platform when it seeks for address. After entering the target network randomly, the platform in the diagram will detect according to the pre-determined trace (the pre-determined trace is not unique). Even if the upstream node is judged wrong in the early stage, there will be one dimension facing the station after boundary reflection, and reaching station node after many times of boundary reflection. (Platform motion trace is marked out for the purpose of better explaining how the platform seeks for station). Supposing the transmitting node has N neighbour node (s), and the node with the minimum cost should be selected from all of them as the middle node. The cost of the \(i\)th neighbour code is expressed as  
\[D_{i}=H_{i}\times\alpha+L_{i}\times\beta+R_{i}\times\gamma \tag{3}\]  
\(D_{i}\) is the total cost of node \(i\), \(H_{i}\) is the number of hops of node \(i\) from the station, \(L_{i}\) is the distance from node \(i\) to the station, \(R_{i}\) is the distance from node \(i\) to source node, \(\alpha,\beta\) and \(\gamma\) are coefficients of \(H_{i},L_{i}\), and \(R_{i}\). Different location-based routing protocols \(\alpha,\beta\), and \(\gamma\) have different proportions. To sum up, we think the topology structure of the target network can be rebuilt, as long as the proportional relationship among \(\alpha,\beta\), and \(\gamma\) in the cost Equation (3) of the target network is re-constructed according to the acquired information. Supposing the platform detects M node couple (s), all of which are under the connection with minimum costs determined by target network according to Equation (3), and that the node of centering routing node in the \(i\)th is \(g_{i}\), and minimum number of hops of each neighbour node of the transmitting node from station is \(\lambda\), and there are S node(s) that are \(\lambda\) hop (s) from the station, then the cost of node \(g_{i}\) is express as  
\[D_{g_{i}}=H_{g_{i}}\times\alpha+L_{g_{i}}\times\beta+R_{g_{i}}\times\gamma \tag{4}\]  
The costs of the rest S-1 neighbour node(s) are respectively expressed as  
\[ \begin{split}& D_{1}=H_{1}\times\alpha+L_{1}\times\beta+R_{1} \times\gamma\\ & D_{2}=H_{2}\times\alpha+L_{2}\times\beta+R_{2}\times\gamma\\ &\cdots\cdots\cdots\\ & D_{s-1}=H_{s-1}\times\alpha+L_{s-1}\times\beta+R_{s-1}\times \gamma\end{split}  \tag{5}\]  
where, \(H_{1}=H_{2}=\cdots=H_{S-1}=\lambda\). According to the setting that \(D_{g_{i}}<D_{1},D_{g_{i}}<D_{2}\cdot\ldots\ldots\cdot D_{g_{i}}<D_{s-1}\), it can be calculated that  
\[ \begin{split}& L_{g_{i}}\times\beta+R_{g_{i}}\times\gamma<L_{1} \times\beta+R_{1}\times\gamma\\ & L_{g_{i}}\times\beta+R_{g_{i}}\times\gamma<L_{2}\times\beta+R_{ 2}\times\gamma\\ & L_{g_{i}}\times\beta+R_{g_{i}}\times\gamma<L_{s-1}\times\beta+R _{s-1}\times\gamma\end{split}