# Vehicular Localization Enhancement via Consensus
## 3 Proposed Strategy
### Practical Implementation  
In the compensation phase, the anchor is responsible for the broadcast of the compensation information to the network. However, for a single broadcast to suffice, the connections among all pairs of vehicles are required. Some vehicles nevertheless may not be able to successfully receive information from the anchor because of the lack of direct connections. Furthermore, temporary connection malfunction between the anchor and the agents causes the failure in the compensation. In the current description of the proposed strategy, the vehicles postpone the next update until other vehicles receive the compensation successfully. Forcing a synchronous operation in such a way diminishes the purpose of the distributed algorithm.  
To overcome these issues, a slightly modified and practical method of conveying the compensation information is used. In the practical implementation, instead of waiting for the iteration halt and calculating the overall change in the location estimate, the anchor may execute a bit of the compensation upon each iteration. In other words, the anchor compares its location estimates before and after each update and then broadcasts the difference to the neighboring vehicles. The vehicles that successfully receive the broadcast then possess a portion of the compensation, which is repeatedly exchanged with other vehicles upon the next update. Through this modification, each vehicle asynchronously perform its updates regardless of receiving the broadcast from the anchor. Such an asynchronous mode can enhance the robustness to the connection failures or short communication ranges. Furthermore, the practical implementation does not degrade the accuracy of the protocol. In fact, when some single-hop distances are greater than the communication range, the practical can implementation enhance the accuracy by propagating the compensation throughout the network upon the repeated updates. The modification thus achieves the asynchronous operation without the performance loss or the restriction to applicability. The practical implementation of the proposed strategy with respect to vehicle \(v_{i}\), with the complexity of \(O(|\mathcal{N}(v_{i})|)\), is summarized in Algorithm 1.  
```
1:At time \(t=0\) initialization
2:Measure \(\mathbf{p}_{v_{i}}^{(t)}\)
3:while (11) does not hold do
4:\(t\gets t+1\)
5: Receive \(\mathbf{p}_{v}^{(t-1)}\) and measure \(\mathbf{d}_{v_{i},v}\) from \(v\in\mathcal{N}(v_{i})\)
6: Calculate \(\mathbf{p}_{v_{i}}\) by (1)
7:if broadcast from anchor received then
8:\(\mathbf{p}_{v_{i}}^{(t)}\leftarrow\mathbf{p}_{v_{i}}+\mathbf{p}_{v_{*}}^{(t-1) }-\mathbf{p}_{v_{*}}^{(t)}\)
9:else
10:\(\mathbf{p}_{v_{i}}\leftarrow\mathbf{p}_{v_{i}}^{(t)}\)
11:endif
12:endwhile
```  
**Algorithm 1** Strategy of improvement of localization of \(v_{i}\)  
It is noted that protocol-specific design details of the proposed strategy depend upon the choice of specific communication types. While this work aims for generic LTE V2X systems, tuning of the strategy and its parameters, such as latency, distance of reliable connection between two vehicles, and frequency of the messages, are properly modified according to the specific use cases.