# Multi-Condition Constrained Pedestrian Localization Algorithm Based on IMU
## 2 Methods
### Multi-Condition Constraint Fusion Algorithm  
Due to the accumulation of sensor errors, the locations calculated by the IMU may deviate significantly from the actual location. Over extended periods of drift, this will directly cause the reconstructed pedestrian trajectory to diverge substantially from the actual path, leading to the inability to accurately locate the pedestrian. In recent years, various drift suppression methods have been proposed, but each has its limitations. For example, the single-foot constraint cannot account for the relative motion between the two feet and relies solely on the motion data of one foot for location correction. While the dual-feet constraint can ensure that the distance between the two feet remains within a reasonable range, it cannot correct the out-of-range stride length of the single-foot in real time.  
Therefore, to obtain a walking trajectory closer to the real situation, a multi-condition constraint algorithm (MCC) that combines zero-velocity interval constraints (ZC), single-foot (SC) and dual-feet fusion constraint (DC) algorithm is innovatively proposed. This method not only integrates constraint conditions to update location and velocity estimates but also effectively suppresses sensor noise and error accumulation, thereby constructing a complete pedestrian navigation system. Figure 7 illustrates the simplified framework of this system.  
The zero-velocity interval constraint algorithm has been detailed in Section 2.2. The process of the single-foot and dual-feet fusion constraint algorithm is shown in Figure 8.  
In this fusion algorithm, the location information obtained from the zero-velocity update of the two IMUs at the i-th moment is first transmitted to individual step constraints. Then, the two location results are transmitted to the dual-feet centroid constraint. Finally, the result is the \"new\" location information that satisfies both conditions.  
Specifically, when a single-foot is in motion, there must exist a last zero-velocity moment. By calculating the difference between the location at each motion moment and the last stationary moment, whether the current walking distance in this gait cycle exceeds the ideal step length threshold can be determined. If it exceeds, the location information at the current moment will be corrected using Equation (8); if not, the original value will be retained. It is noteworthy that when a location correction is made during the alternating motion of zero-velocity and non-zero-velocity moments, all values in the subsequent zero-velocity interval will be updated to the corrected value at that moment. For the single-foot  
Figure 7: Algorithm Framework Diagram.  
constraint algorithm shown in Figure 8, the _x refers to the data related to the left and right feet, with flexible referencing based on the source of the input data. For the dual-feet constraint algorithm shown in Figure 8, whether the distance between the dual-feet locations exceeds the ideal dual-feet distance threshold first needs to be checked. If it exceeds, the location information for both feet at the current moment will be corrected using Equation (13); if not, the original values will be retained.