## 3 Experimental Results and Analysis
### Indoor and Outdoor Loop Datasets
This is the reason for why all frameworks except for ZUPT-EC performed similarly on indoor dataset 1. However, all frameworks showed differences in the medium- and large-scale datasets. Since a standalone EC is easily affected by magnetic disturbances, the EC-aided PNS (ZUPT-EC) had the worst performance. When tested on the small-scale indoor dataset 1, ZUPT-HDR and ZUPT had similar performances (see Table 5). However, ZUPT-HDR performed better than ZUPT on the medium- and large-scale datasets (see Table 6). We think that there are two possible reasons. One is that the straight-line path may not be absolutely straight. Improper correction by the HDR algorithm in a small-scale area may over-correct the heading drift. Considering that ZUPT-MED-EC is the same as ZUPT-AFM without the HDR, this may be the reason for why ZUPT-AFM did not perform well on indoor dataset 1 compared with ZUPT-MED-EC. Considering that ZUPT-HDR and ZUPT had similar performance on the small-scale dataset, another reason is that the HDR could not be triggered because of the frequent nonlinear motion. Therefore, in this case, \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Subject** & **Total Distance** & **Motion** \\ \hline Indoor dataset 1 & 24-group walking with four-shape paths & & \\  & (each type has 6 groups) & 1469 m & walking, slow running \\  & 24-group slow running with four-shape paths & & \\  & (each type has 6 groups) & & \\ \hline Indoor dataset 2 & 2-group 10-lap moving with mixed-motion & 668 m & walking, slow running, \\  & & & \multicolumn{1}{c}{c} \\ \hline Indoor dataset 3 & 3 three-lap walking sub-datasets & & \\  & 3 free walking sub-datasets & & \\ \hline Outdoor dataset & 3-group long-term walking & 3699 m & walking \\ \hline Indoor–outdoor dataset & 1.9 km sub-dataset & 4196 m & walking, slow running, \\  & 2.2 km sub-dataset & & climbing stairs, \\  & & & walking down stairs \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Description of the indoor and outdoor loop datasets. ZUPT-HDR was equivalent to ZUPT. This may be another reason for why ZUPT-AFM and ZUPT-MED-EC performed similarly on indoor dataset 1. Table 5 also shows that ZUPT-MED-EC was a little better than ZUPT-HDR, and Table 6 shows that ZUPT-MED-EC outperformed ZUPT-HDR. First, MED-EC may have more chance to correct the heading drift regardless of linear or nonlinear motion. Second, MED-EC is a correction method that uses absolute information, while HDR uses relative information. Therefore, it is easy for HDR to accumulate errors. Since human motion is complex and random, only HDR was unable to sufficiently correct heading error. Therefore, complementary correction of the heading error using inertial and filtered magnetic data is a more robust and effective way to mitigate heading drift. Actually, the ZUPT-MED-EC is a framework that utilizes complementary information, namely, filtered magnetic data are used to enhance heading accuracy, while inertial data are used to compute gyro heading. Therefore, ZUPT-MED-EC and ZUPT-AFM outperformed the remaining methods. However, when magnetic data were unavailable, gyro heading errors could not be corrected. Therefore, on large-scale datasets (i.e., the indoor free walking sub-dataset, outdoor dataset, and indoor-outdoor dataset), the disadvantage of ZUPT-MED-EC appeared to be exposed. The performance metrics computed using all indoor and outdoor loop datasets are presented in Table 7, and the CDF curves of their TTDEs are drawn in Figure 16. From the performances of the five frameworks, it is evident that ZUPT-AFM \(>\) ZUPT-MED-EC \(>\) ZUPT-HDR \(>\) ZUPT \(>\) ZUPT-EC on sufficient datasets.