## 2 GPS Attitude Baseline Determination
### GPS Baseline Float Solution  
In the first step of the ambiguity resolution, the ambiguities are estimated as real values in the float solution. This estimation is realized in a total state space extended Kalman filter (EKF). Beside the single-difference (SD) [34] ambiguities \(\mathbf{N}^{j}_{AB}\), the state vector \(\mathbf{x}_{SD}\) of this filter also contains the baseline parameters \(\Delta\mathbf{x}^{e}_{b}\) and the first time derivative of the baseline parameters \(\Delta\dot{\mathbf{x}}^{e}_{b}\):  
\[\mathbf{x}_{SD}=\left[\Delta\mathbf{x}^{e,T}_{b}\quad\Delta\dot{\mathbf{x}}^{e,T}_{b}\quad\mathbf{N}^{j,T}_{AB}\right]^{T} \tag{1}\]  
where \(A\) and \(B\) are the notations for both GPS antennas of the baseline and \(j\) is the notation for the satellites. The reason for estimating SD instead of double-difference (DD) [34] ambiguities is to avoid the hand over problem that would arise for DD ambiguities, when the reference satellite changes [35]. Measurement model: As observations DD carrier phases \(\phi^{jk}_{AB}\) and DD pseudoranges \(P^{jk}_{AB}\) on the GPS L1 frequency (L1=1575.42 MHz) are used:  
\[\phi^{jk}_{AB}(t_{k}) =\frac{1}{\lambda}\rho^{jk}_{AB}(t_{k})+\left(N^{j}_{AB}-N^{k}_{ AB}\right)+\vartheta_{\phi} \tag{2}\] \[P^{jk}_{AB}(t_{k}) =\rho^{jk}_{AB}(t_{k})+\vartheta_{P} \tag{3}\]  
where \(\rho^{jk}_{AB}(t_{k})\) is the geometric range DD, \(\lambda\) is the GPS L1 wavelength and \(\vartheta\) is the noise. Figure 1: Flowchart of the attitude determination calculation steps. “Pos/IMU/Mag/Base” abbreviates a Kalman filtering, where a position measurement (Pos), IMU (inertial measurement unit) readings, magnetic field observations (Mag) and the GPS baseline (Base) are integrated. MLAMBDA is the modified LAMBDA method [33], and the AFM is the ambiguity function method [32]. To improve the ambiguity resolution, the prior information about the attitude, known from the Pos/IMU/Mag solution (Section 3), is added to the observation vector. For this, the known body-frame (b-frame) baseline parameters \(\Delta\mathbf{x}_{b}^{b}\) are transformed into the e -frame (earth centered, earth fixed), using the \(\mathbf{C}_{b}^{e}\) rotation matrix, which represents the attitudes from the Pos/IMU/Mag solution:  
\[\Delta\bar{\mathbf{x}}_{b}^{e}=\mathbf{C}_{b}^{e}\Delta\mathbf{x}_{b}^{b} \tag{4}\]  
Finally, the known baseline length \(s\) can be added as a constraint to the observation vector. Accordingly, the observation vector reads:  
\[\mathbf{z}_{k}= \begin{bmatrix}\phi_{AB}^{1k}&\ldots&\phi_{AB}^{mk}&P_{AB}^{1k}& \ldots&P_{AB}^{mk}&\Delta\bar{x}_{b,x}^{e}&\Delta\bar{x}_{b,y}^{e}&\Delta\bar{ x}_{b,z}^{e}&s\end{bmatrix}  \tag{5}\]  
A linearization of the measurement equations yields the measurement matrix:  
\[\mathbf{H}_{k}= \begin{bmatrix}\mathbf{A}_{n\times 3}&\mathbf{0}_{n\times 3}& \lambda\mathbf{D}_{n\times m}\\ \mathbf{A}_{n\times 3}&\mathbf{0}_{n\times 3}&\mathbf{0}_{n\times m}\\ \mathbf{I}_{3\times 3}&\mathbf{0}_{3\times 3}&\mathbf{0}_{3\times m}\\ \frac{\Delta\mathbf{x}_{b}^{e,T}}{\left|\Delta\mathbf{x}_{b}^{e,T}\right|}& \mathbf{0}_{1\times 3}&\mathbf{0}_{1\times m}\end{bmatrix} ,\mathbf{D}= \begin{bmatrix}1&-1&&\\ \vdots&&\ddots&\\ 1&&-1\end{bmatrix}  \tag{6}\]  
Therein, the matrix \(\mathbf{A}\) includes the satellite/receiver geometry [34], and the matrix \(\mathbf{D}\) is the double differencing matrix. \(n\) is the number of visible DD observations, and \(m=n+1\) is the number of visible satellites. As the stochastic model for the GPS observations, the following equation is used:  
\[\sigma_{\phi,P}^{2}=2\left(a^{2}f_{\phi,P}^{2}+(b/\sin el)^{2}f_{\phi,P}^{2}\right) \tag{7}\]  
where \(f\) is a factor, which is \(f_{P}=100\) for the pseudoranges and \(f_{\phi}=1\) for the carrier phases. \(el\) is the satellite elevation angle, and \(a\) and \(b\) are free parameters, weighting the influence of the elevation angle on the measurement noise.