# An ARCore-Based Augmented Reality Campus Navigation System
## 3 Key Technology
### VIO State Estimation  
The visual inertial odometer (VIO) is for realizing localization and navigation of the mobile device by integrating the inertial measurement unit (IMU) data with vision. It has good performance in indoor navigation. Its advantages are strong complementarity, high localization accuracy and good robustness. It has a wide application range and good application effect in the combined indoor and outdoor navigation system. The VIO method uses the filtering-based extended Kalman filter [21] method in this paper. In essence, it can be understood as a state estimation problem [22].  
The observation equation and the motion equation are usually used to describe the moving carrier. The relationship between the camera and the marker is shown in Figure 1.  
In Figure 1, the small black dot represents the marker, and the triangle represents the pose of the camera. At each pose, the markers within its range can be observed. Usually, the sensor collects surrounding information through time intervals. Here, a period of time is divided into discrete moments, denoted as \(t=1,2,\ldots,k\). The parameter \(X\) is used to represent the pose of the carrier itself; thus, \(x_{1},x_{2},\ldots,x_{k}\) constitutes the trajectory of the carrier. Assuming that there are \(n\) markers in total denoted as \(y_{1},y_{2},\ldots,y_{n}\), the mathematical model abstracted from sensor movement and observation is defined as Equation (1):  
\[x_{k}=f(x_{k-1},u_{k})+\omega_{k-1} \tag{1}\]  
where \(u_{k}\) represents the input value of the sensor, and \(\omega_{k-1}\) denotes motion noise.  
When the carrier observes \(y_{j}\) at the position of \(x_{k}\), the function of this process can be defined as follows:  
\[z_{k,j}=g\big{(}y_{j},x_{k}\big{)}+v_{k,j} \tag{2}\]  
where \(v_{k,j}\) is the observation noise. Equation (1) denotes the equation of motion, and Equation (2) denotes the equation of observation. The existence of noise obeys Gaussian  
Figure 1: Schematic diagram of carrier movement.  
distribution. The estimation of state is composed of real value and noise value, which also obeys Gaussian distribution.  
In order to express the motion equation and observation equation concisely, let \(s_{k}\) represents the unknown quantity at time \(k\), and \(z_{k}\) represents the measured value at time \(k\); thus, \(s_{k}=\{x_{k},y_{1},y_{2},\ldots,y_{m}\}\). The motion equation and observation equation are defined as follows.  
\[\begin{array}{l}s_{k}=f(s_{k-1},u_{k})+\omega_{k-1}\\ z_{k}=g(s_{k})+v_{k}\end{array} \tag{3}\]  
By using data from past 0 to \(k-1\), the current state distribution can be estimated by Bayesian formula, which is defined as follows.  
\[P(s_{k}\mid s_{0;k},u_{1;k},z_{1;k})\propto P(z_{k}\mid s_{k})P(s_{k}\mid s_{0 ;k},u_{1;k},z_{1;k-1}) \tag{4}\]  
In Bayesian formula, the left part is called posterior probability, the first term on the right denotes likelihood and the second term denotes prior probability. According to the moment \(s_{k-1}\), the conditional probability can be expanded as follows.  
\[P(s_{k}\mid s_{0;k},u_{1;k},z_{1;k-1})=\int P(s_{k}\mid s_{k-1},s_{0},u_{1;k},z _{1;k-1})P(s_{k-1}\mid s_{0},u_{1;k},z_{1;k-1})ds_{k-1} \tag{5}\]  
For subsequent processing, there are two general choices. One is to use the filter-based method, and the other is to use the nonlinear optimization method. In this paper, the extended Kalman filter is selected as the representative filter-based method. According to the first-order Markov property, the state at time \(k\) is only related to the state at time \(k-1\), and it is independent of the previous state. Based on this assumption, the state of the next moment can be deduced from the state estimation at the current moment.