## 4 Development of ViPER+ for Construction Vehicles and Equipment Pose Estimation
### Localization Subsystem
#### 4.2.2 Input Correction and Location Estimation
To implement this in real-time tracking, the system needs to add an intentional delay before the input correction to collect TDOA inputs that came after the input that the system wants to localize. The amount of this delay depends on the requirement of the application and sometimes it is impossible to add this delay. The correction method is also unable to correct the TDOA input of an anchor if there is missing data for that anchor. The presence of large machines can block anchors and prevent them from receiving beacon messages. These gaps reduce the performance of these solutions, making them not practical for real-time location tracking. Our new solution for input correction replaces LPF with an exponentially weighted moving average (EWMA) to eliminate the requirement for future TDOA input. To handle missing TDOA inputs, our new approach tries to synthesize the missing data instead of disregarding incomplete inputs. This allows the input correction method to be more robust against scenarios with anchors being blocked. Figure 2 describes the architecture of our new correction method. Like ViPER, our correction method collects the timestamps from anchors as one of the inputs. If the number of timestamps for a beacon packet is less than four, the system does not have enough data to localize the beacon packet, thus, it will discard the timestamp for that beacon packet. Instead of disregarding incomplete inputs, we are only eliminating inputs that we are unable to localize. To handle the missing data point, our approach uses the last location of the tag to generate the TDOA inputs from the previous input. In addition to the inputs from anchors, we also import the final location of the tag which is the latest output of the localization subsystem. Having the previous location allows us to approximate the values of the TDOA inputs for the previous beacon message and replace those approximations with the missing TDOA inputs. For the anchor and reference selection method in our approach, we first select an anchor as the reference anchor and calculate the TDOA inputs for each timestamp using Equation (1). Then, the correction method uses EWMA to correct the errors of the current TDOA input. Equation (5) describes the correction method. In this equation, \(I_{a}^{current}\) represents the current TDOA input, and \(I_{a}^{previous}\) is the previous TDOA input for anchors \(a\). For anchors that failed to report the received signal's timestamp, we used the previous value as the current value. \[I_{a}^{correct}= \propto I_{a}^{current}+(1-\infty)I_{a}^{previous} \tag{5}\] \[\propto =0.8\]  
Once all the corrected inputs are calculated, the anchor and reference selection method estimate the residual value based on the corrected input. If the residual value is within  
Figure 2: Overview of the TDOA input correction in ViPER+. an acceptable range (in our case under 10), the correction method reports the calculated location of the tag. Otherwise, the algorithm chooses another anchor as the reference and repeats the process until the error falls below the threshold. If the system was unable to obtain the desired residual error after trying all anchors as a reference, the system terminates the localization without any result. Since there is no one-to-one mapping between the residual value and localization estimation error, we empirically tuned this threshold for our system.