# Autonomous and Earth-Independent Orbit Determination for a Lunar Navigation Satellite System
## 4 Lunar Orbital Filter
### Kalman Filter Application  
The Kalman Filter has been well-developed in the literature [67; 68; 39; 69], starting in the 1960s and extensively used across many positioning and navigation scenarios. The basic equations are provided for the sake of completeness. The measurement vector is dependent on the sensor used, as described by the architectures proposed in Section 3. The propagation update of the EKF for the state vector \(\mathbf{x}\) and the estimated state covariance \(P\) is described by  
\[\mathbf{x}_{k} =\mathbf{f}(\mathbf{x}_{k-1}), \tag{29}\] \[P_{k} =\Phi P_{k-1}\Phi^{\intercal}+Q, \tag{30}\]  
where the propagated linear approximation matrix \(\Phi\) was first defined in Equation (23). The propagation update error covariance is described by the matrix \(Q\). The measurement update of the EKF is given in an implicit form to accommodate for the measurement model of the horizon, as in Equation (5). This means the measurement model is of the form \(\mathbf{h}(\mathbf{x},\mathbf{y})=\mathbf{0}\), where \(\mathbf{y}\) is the measurement vector. This is then applied to the basic measurement update equations of EKF as  
\[K_{k} =P_{k}H_{k}^{\intercal}(H_{k}P_{k}H_{k}^{\intercal}+R)^{-1}, \tag{31}\] \[\mathbf{x}_{k}^{\intercal} =-Kh_{k},\] (32) \[P_{k}^{+} =(I-K_{k}H_{k})P_{k}, \tag{33}\]  
where the superscript \(+\) highlights the state and covariance estimate post-measurement update, \(I\) is the \(6\times 6\) identity matrix, \(R\) is the measurement noise matrix, and \(H\) is the linearised form of the measurement model \(\mathbf{h}(\mathbf{x},\mathbf{y})\). The measurement noise matrix is calculated by taking the partial derivative of the measurement model in terms of the measurement vector \(\mathbf{y}\) and performing a matrix multiplication by the predicted sensor noise \(\sigma_{y}\),  
\[R=\frac{\partial\mathbf{h}}{\partial\mathbf{y}}\sigma\frac{\partial\mathbf{h}^{\top}}{ \partial\mathbf{y}}. \tag{34}\]  
Similarly, the measurement matrix \(H\) is calculated by the partial derivative of the measurement model by \(\mathbf{x}\),  
\[H=\frac{\partial\mathbf{h}}{\partial\mathbf{x}}. \tag{35}\]  
Two options exist to manage the combination of multiple sensors. The first is to combine the measurements to a single measurement vector \(\mathbf{y}\). This approach is classified as simultaneous data fusion. For example, the combination of horizon points and lunar crater ellipse estimates, captured by the same camera, would take the form  
\[\mathbf{y}=\big{\{}\mathbf{s}_{1}{}^{\mathrm{ T}}\quad\ldots\quad\mathbf{s}_{m}^{\mathrm{ T}}\quad\mathbf{a}_{1}^{\mathrm{ T}}\quad\ldots\quad\mathbf{a}_{n}^{\mathrm{ T}}\big{\}}^{\mathrm{ T}}. \tag{36}\]  
The measurement model vector \(\mathbf{h}\), measurement matrix \(H\), and the measurement noise matrix \(R\) would be then expanded to include both models as separate blocks. The alternative model is to consider various points of sensor information separately, independently propagating and estimating with measurement steps as each signal is received. This is known as sequential data fusion and is more practical if different sensors return measurements at different time steps. For each measurement, Equations (31)-(33) are followed. Kalman Filter data fusion research does not follow conventions, so this difference is highlighted. A challenge to sequential data fusion arises if there is a significant difference in sensor noise, especially at varying time steps. This may take place, for example, if the observed lunar crater or horizon geometry changes between apoapsis and periapsis. This would lead to a radical change in the performance, and either sensor information should be ideally scheduled when performance is sufficient, or weights must be applied to reduce the impact poor-quality data may cause in the estimated position. One approach is the federated filter, which is described in detail in [68] and is usually applied to automotive sensor fusion.