## 2 Materials and Methods
### Adaptive GNSS-RTK/LIO Fusion  
The sensor fusion framework is constructed to estimate the motion states of the sensor carrier. Methods for such state estimation problems are extensively investigated which could be categorized as filter-based and non-linear optimization-based [45]. The filter-based method is typically a predictor and corrector architecture subjecting to the first-order  
Figure 2: Illustration of the individual steps of GNSS-RTK availability assessment method. (**a**) The local map around each GNSS RTK solution is extracted from the global map; (**b**) For each 3D point in the local map, the azimuth angle and the elevation angle are calculated for subregions division and mean elevation angle mask generation. For ease of visualization, the map point is depicted in the GNSS measurement frame. [PERSON] hypothesis [47]. The current state to be estimated is first predicted based on the last state and then corrected according to the motion model and the measurement model respectively [48]. The non-linear optimization-based method is typically a non-linear least-square problem. Concretely, the state estimation problem could be formulated as a Maximum A Posteriori (MAP) problem and then be converted to a Maximum likelihood Estimation (MLE) via Bayes' Theorem [49; 50]. With the assumption of the Gaussian noise model, through negative logarithmic transformation, it is finally expressed as a nonlinear least-squares problem [24]. Each known measurement, based on which the state estimation is performed, could be expressed as a function of the states to be estimated. The least-squares term, commonly called a residual term, is the Mahalanobis distance between the known measurements and its approximation derived from the states. The residuals are expected to be small and thus provide constraints to the states. The objective function during the non-linear optimization is the sum of all the residuals. A group of states that minimizes the objective function is considered as the best solution for the estimator [24]. As shown in our recent work [41], compared with the filter-based estimator such as EKF, the non-linear optimization-based ones can better employ the correlation between consecutive epochs of measurements simultaneously. Furthermore, the computational efficiency of non-linear optimization-based methods is enhanced by the sliding-window manner [51] which involves states over some time rather than all the states during an optimization. The non-linear optimization-based state estimation framework could be interpreted as a factor graph, namely FGO. States to be estimated are denoted as vertexes. Residuals constraining the states are expressed as edges and called factors in the graph. The FGO aims at finding a group of states that conform to all edges best [24]. The factor graph of the adaptive GNSS-RTK/LIO fusion procedure, that is the global FGO module in Figure 2, is displayed in Figure 3. The states to be estimated in one window is the 6D pose at the frequency of estimations from LIO represented as  
\[\mathbf{X}=\left\{\mathbf{x}_{0},\ \mathbf{x}_{1},\ \mathbf{x}_{2},\cdots,\mathbf{x}_{w-1} \right\}, \tag{5}\]  
\[\mathbf{x}_{k}=\left[ \begin{array}{cc}{}^{n}\mathbf{R}_{k}&{}^{n}\mathbf{p} _{k}\\ \mathbf{0}&\mathbf{1}\end{array} \right]\in\mathrm{SE}(3),k=0,\cdots,w-1, \tag{6}\]  
where \(w\) is the window size, \({}^{n}\mathbf{R}_{k}\in\mathrm{Special}\) Orthogonal Group (SO(3)) [45] is the relative rotation and \({}^{n}\mathbf{p}_{k}\in\mathbb{R}^{3}\) is the absolute translation. The \({}^{n}\mathbf{R}_{k}\) could be expressed in Lie algebra [52] for derivation calculation as:  
\[{}^{n}\mathbf{R}_{k}=\exp\bigl{(}\varphi_{k}{}^{\wedge}\bigr{)} \tag{7}\]  
\(\varphi_{k}\in\mathbb{R}^{3}\) is the correspondent Lie algebra of \({}^{n}\mathbf{R}_{k}\). \((\cdot)^{\wedge}\) is the skew-symmetric matrix of \(\varphi_{k}\). \(\exp(\cdot)\) represents the exponential transformation namely Rodrigues's Formula [53] between the two patterns.