# In-Orbit Attitude Determination of the UVSQ-SAT CubeSat Using TRIAD and MEKF Methods
## 4 Results
### Discussion and Perspectives  
The TRIAD and MEKF methods were applied to in-orbit data. The objective is to compare the two methods. To visualize the improvement expected from the MEKF method, it can be wise to superpose the results from the different methods in Figure 10. Three indicators to compare the methods are described in this part. The first indicator is based on the variations of the attitude itself while the second one is derived from the measurements of a sensor that was not used as an input by the two methods. The last indicator is the uncertainty of each method. The satellite attitude computed with the Kalman filter is continuous, which corresponds to a realistic case in orbit. Discontinuities mostly come from noise in the measurement process. It is therefore relevant to quantify the fast changes in attitude. This can be done studying the gradient of the Sun LOS or nadir components. Studying the standard deviation of the gradient is representative of the short variations that could be due to the attitude determination error. The average of the standard deviations of the Sun LOS gradients is equal to \(5.17\times 10^{-3}\) s\({}^{-1}\) for the TRIAD method compared to \(4.1\times 10^{-3}\) s\({}^{-1}\) for the MEKF method (UVSQ-SAT data on the 2 and 3 February 2021). Therefore, the MEKF method seems to represent the satellite attitude variations better based on the previous indicator as it reduces discontinuities thanks to its smoothing asset. Figure 9: First lights of the Sun LOS (**a**) and nadir (**b**) components in the satellite body frame based on MEKF on 2 March 2021 (representative period in the case of measurements at 30 s intervals almost continuously with eclipse phase in gray). A more accurate analysis can be established based on the measurements of a sensor not used in the attitude determination process. UV sensors (UVSs) with a narrow field of view (FOV) are used to compare the results based on the two methods. Those sensors are primarily sensitive to solar radiation. Therefore, the sensors should detect when the Sun appears in the FOV. It is therefore a great indicator to evaluate the precision and accuracy of both methods. This allows us to determine which method is the most adequate to find the orientation of the satellite (in the majority of cases). It is important to note that this study has limitations as it is realized only in the phases of sunlight and in some configurations. The reference cases are related to direct solar observations. The accuracy and precision values are computed for each method. The accuracy value is defined in Equation (41a) as the proximity of a measured value to a real value. The value of precision in Equation (41b) refers to the proximity of two or more measurements to each other. This allows us to monitor the presence of a bias in the attitude determination. \[Accuracy=\frac{TP+TN}{TP+FP+FN+TN} \tag{41a}\]  
\[Precision=\frac{TP}{TP+FP} \tag{41b}\]  
where \(TP\), \(FN\), \(FP\), and \(TN\) are defined in Table 2.  
Figure 10: First lights of the Sun LOS and nadir coordinates in the satellite body frame based on MEKF and TRIAD on 2 March 2021 (representative period in the case of measurements at 30 s intervals almost continuously with eclipse phase in gray). These values are calculated in the case of the TRIAD method in Figure 11 and then for MEKF in Figure 12.  
The indicators are plotted according to different FOV. Indeed, the FOV of the instrument can be different from the theoretical FOV due to uncertainties of measurements and misalignments. This is the reason why we choose to calculate the accuracy and precision for different values of angle threshold (theoretical FOV). When the angle between the normal to the sensor and the Sun LOS determined by each method is below a certain threshold (FOV), it is verified that the UVS sensor receives a signal corresponding to the incident solar flux. This is an indicator that the considered face is facing the Sun.