## 3 Attitude Determination
### The Multivariate Model  
Let us consider the \(k\)-th platform equipped with a set of \(n_{k}+1\) antennas simultaneously tracking \(m+1\) satellites on \(f\) frequencies. The set of linearized double difference (DD) GNSS phase and code observations obtained on the \(n_{k}\) baselines formed by these antennas at an observation epoch forms a multivariate Gauss-Markov model [12,19]:  
\[\text{E}(Y^{k}) = AZ^{k}+GB^{k},\quad Z^{k}\in\mathbb{Z}^{fm\times n_{k}} \tag{1}\] \[\text{D}(\mathrm{vec}(Y^{k})) = Q_{\gamma^{k}\gamma^{k}}=P_{n_{k}}\otimes Q_{yy},\quad B^{k}\in \mathbb{R}^{3\times n_{k}} \tag{2}\]  
where \(\text{E}(\cdot)\) and \(\text{D}(\cdot)\) denote the expectation and dispersion operator, \(\otimes\) denotes the Kronecker product, \(Y^{k}=[y_{1}^{k},\ldots,y_{n_{k}}^{k}]\) the \(2 fm\times n_{k}\) matrix of \(n_{k}\) linearized (observed-minus-computed) DD observation vectors \(y_{r}^{k}\), \(Z^{k}=[z_{1}^{k},\ldots,z_{n_{k}}^{k}]\) the \(fm\times n_{k}\) matrix of \(n_{k}\) unknown DD integer ambiguity vectors \(z_{j}^{k}\), \(B^{k}=[b_{1}^{k},\ldots,b_{n_{k}}^{k}]\) the \(3\times n_{k}\) matrix of \(n_{k}\) unknown baseline vectors \(b_{j}\), \(G\) the \(2 fm\times 3\) geometry matrix that contains the unit line-of-sight vectors, \(A\) the \(2 fm\times fm\) matrix that links the DD data to the integer ambiguities and \(P_{n_{k}}\) and \(Q_{yy}\) the known matrices of order \(n_{k}\times n_{k}\) and \(2 fm\times 2 fm\), respectively. Here, \(\mathrm{vec}(\cdot)\) denotes the vec-operator, which transforms a matrix into a vector by stacking the columns of the matrix, one underneath the other. Note that, for the simplicity of the formulation, we assumed that all receivers/antennas track the same set of satellites. However, this restriction is relaxed in the software implemented using MATLAB. Since the unit line-of-sight vectors of two antennas to the same satellite on a short baseline considered in this work (\(\leq\)10 km) are the same for all practical purposes, the geometry matrix \(G\) is considered the same for different platforms, as well as for the between-platform baseline at a given time instant.  
For the stochastic model, we assumed that all receivers/antennas have similar (noise) characteristics. However, the results in the following are also applicable for dissimilar receivers/antennas [19]. The correlation matrix \(P_{n_{k}}\) takes care of the correlation that follows from the fact that the \(n_{k}\) baselines share the observations from the reference receiver. For similar receivers/antennas, it is given as:  
\[P_{n_{k}}=\frac{1}{2}\left(I_{n_{k}}+e_{n_{k}}e_{n_{k}}^{r}\right) \tag{3}\]  
with \(I_{n_{k}}\) the identity matrix of size \(n_{k}\) and \(e_{n_{k}}\) the \(n_{k}\)-vector of ones. Matrix \(Q_{yy}\) takes care of the precision of the phase and code data and is given as:  
\[Q_{yy}=\mathrm{blockdiag}\left(Q_{1},\;\ldots,\;Q_{f}\right) \tag{4}\]  
where:  
\[Q_{f}=2\times\mathrm{blockdiag}\left(Q_{f;p},\;Q_{f;\Phi}\right) \tag{5}\]with \(Q_{f:p}=D_{m}^{T}Q_{f:p}^{\prime}D_{m}\), \(Q_{f:\Phi}=D_{m}^{T}Q_{f:\Phi}^{\prime}D_{m}\), \(Q_{f:t}^{\prime}=\mathrm{diag}\left[\left(\sigma_{f:t}^{1}\right)^{2},\ \ldots,\ \left(\sigma_{f:t}^{m+1}\right)^{2}\right]\), \(D_{m}^{T}=\left[-e_{m}\ I_{m}\right]\) the single difference operator, \"blockdiag\" referring to the block diagonal matrix formed by given arguments and \"diag\" referring to the diagonal matrix formed by given arguments. The factor two in Equation (5) is due to the between-receiver difference of similar receivers. We assume elevation-dependent noise characteristics [23] for the undifferenced observables. That is, the standard deviation of the undifferenced observable can be written as:  
\[\sigma_{f:t}^{s} = \sigma_{f:t_{0}}\left(1+a_{f:t_{0}}\exp\left(\frac{-\theta^{s}}{ \theta_{f:t_{0}}}\right)\right) \tag{6}\]  
where \(\theta^{s}\) is the elevation angle of satellite \(s\) and \(\sigma_{f:t_{0}}\), \(a_{f:t_{0}}\) and \(\theta_{f:t_{0}}\) are the elevation-dependent model parameters.