## 3 Greedy Scanning Data Collection Strategy
### Data Collection
#### 3.3.2 Sink Trajectory Planning  
In our GSDCS, the mobile sink moves from one center point of a grid cell to another, and collects sensory data. As describe in previous subsection, each node routing the sensory data to the mobile sink. Hence, GSDCS needs to address two problems for mobile sink moving: (1) mobile sink moving pattern; (2) location information local updating. In our strategy, the moving pattern of the mobile sink is designed like scanning curve in CRT (Cathode Ray Tube) screen. That is why our strategy is called scanning strategy. The deployment area is divided into grid cells, and the mobile sink traverses along one column as one round trip, which is called one collecting period. After each collecting period, the sink switches to another column to start its next round trip based on our greedy strategy. In one collecting period, the sink moves to grid cell whose \(DN\) is 3, firstly. When the sink moves to a new grid cell, it parks in the center of the new grid cell for a while. The mobile sink may collect data when it is moving. After the mobile sink has parked in a boundary grid cell for a while, the sink moves to the opposite direction, as shown in Figure 9. When the mobile sink arrives at another boundary grid, it changes its direction again. If the mobile sink arrives at the gird cell where it starts the collecting period, the collecting period ends. Since the data packets contain the sensory data and the corresponding \(RCN\), the mobile sink can count the total source nodes in each row, in the current column, in the current column left area, and in the current column right area, respectively. The mobile sink decides the column to move to in the next collecting period based on this counted information. The counted information is also used by the mobile sink to decide the parking time in each grid. If one row which a grid is in has more source nodes, the mobile sink will park in this grid for a longer time, dynamically. \begin{table}
\begin{tabular}{c c c} \hline \hline \(DN\) **Value** & **Direction to Transmission** & **Column Selected in Neighbor Table** \\ \hline
1 & left & \(LG\) \\
2 & right & \(RG\) \\
3 & down & \(DG\) \\
4 & up & \(UG\) \\
0 & (broadcast in local grid) & (broadcast in local grid) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The way to choose a neighbor head node. Figure 8: Flow chart of routing process. Figure 9: The trajectory of the sink in one collecting period. We assume that the speed of the mobile sink is a constant \(v\), and the longitudinal length of network is \(L\). The time of moving in a period is \(T=2(L-a)/v\). We also assume that the total time of static state for parking is equal to the total time for moving in a collecting period. Hence, the total time of a collecting period is \(2T\). In the first collecting period, the mobile sink spends the same time in each grid cell. The time sink spends in a grid consists of parking time and moving time. The total time sink spends in each grid is \(2T/\left[L/a\right]\). When the sink has been in a non-boundary grid cell for \(T/\left[L/a\right]\), it moves into the next one. After the sink has been in a boundary grid cell for \(2T/\left[L/a\right]\), it also moves into the next one. The mobile sink maintains four kinds of counter, \(Counter(i)\), \(Counter_{left}\), \(Counter_{middle}\), \(Counter_{right}\). The \(i\) represents \(M_{r}\) of one row. As we have mentioned above, the data packet consists of \(RCN\), and sensory data. \(M_{r}\) and \(M_{c}\) of \(RCN\) give information about which row and column the data packet comes from. When the mobile sink gets one data packet, it adds the corresponding counter, respectively. The \(Counter(i)\) can reflect how many data packets are collected from each row. The mobile sink can deduce the direction this data packet comes from: left side columns, right side columns or the current column. When the first collecting period is completed, the mobile sink may switch the column based on our pervious description.