## 4 Conclusions, Discussion, and Future Work  
In this work, the calibration of the time constant of the complementary filter for the AHRS system was performed. The presented methodology allowed for the selection of the optimal time constant value, which directly impacted measurement accuracy. The main objective of the study was to determine the time constant at which the error is minimized. After optimal tuning, the complementary filter transmitted the signal with an absolute error smaller than the maximum permissible absolute error. Both objectives were achieved, and most importantly, the signal remained entirely within the required error range with a significant margin. The complementary filter, despite its simplicity, provides high accuracy when the time constant is properly selected, which is sufficient for flight control tasks. Therefore, it can be successfully used in low-cost AHRS systems and implemented in relatively simple and inexpensive microprocessor-based systems. The methodology presented in this work is a tool that can be applied for scaling and evaluating AHRS systems in static conditions, without complicating the scaling process. For the scaling process, it is necessary to collect attitude in static conditions at seven different attitude angles, which does not require specialized test equipment. It was proposed to analyze attitude angles of 0, 5, 10, 15, 20, 25, and 30 degrees. In practice, it may even be possible to reduce the number of analyzed attitude angles. Limiting the data allows for more efficient tuning, which reduces the duration of system calibration. As a result of this research, we will develop software with the ability to analyze even larger amounts of data. As the first step of the algorithm, it will identify a unit-length interval containing the minima and recommend conducting measurements for such time constants with a step of 0.01. Finally, it will provide the optimization result. Each calculation step should take no more than one minute. The results of this study show that the proposed algorithm to select the time constant provided the desired accuracy of measurements with a significant margin, and the maximum error did not exceed the range of the maximum tolerable error. The errors were \begin{table}
\begin{tabular}{c c c c c c c c} \hline
**P\_Ang** & **Pr\_Up** & **Pr\_Down** & **Pr** & **R\_Ang** & **Pr\_Up** & **Pr\_Down** & **Pr** \\ \hline
0 & 0.000467 & 0.001133 & 0.001600 & 0 & 0.000467 & 0.001200 & 0.001667 \\
5 & 0.000867 & 0.001200 & 0.002067 & 5 & 0.002000 & 0.000133 & 0.002133 \\
10 & 0.000933 & 0.001733 & 0.002666 & 10 & 0.002067 & 0.000067 & 0.002133 \\
15 & 0.000400 & 0.000533 & 0.000933 & 15 & 0.000667 & 0.000067 & 0.000733 \\
20 & 0.001200 & 0.000933 & 0.002133 & 20 & 0.002133 & 0.000133 & 0.002267 \\
25 & 0.001533 & 0.000933 & 0.002467 & 25 & 0.001200 & 0.000200 & 0.001400 \\
30 & 0.000867 & 0.001000 & 0.001867 & 30 & 0.000867 & 0.000067 & 0.000933 \\ \hline \end{tabular}
\end{table} 
Table 4: Crossing probability for pitch and roll angles. concentrated around zero, and the maximum values were small. To assess the properties of the measured signal more precisely, an additional measure was proposed. A methodology to narrow the error values was demonstrated, which facilitates the evaluation of system properties. The probability of exceeding such a proposed range could serve as a new measure of the quality of measurement systems that meet predefined total error conditions. This can be useful, for instance, when comparing two different measurement systems that meet the specified requirements. Our future research will focus on using the stationary test results as a baseline for identifying and compensating for errors in angle measurements during flight. The presented methodology does not account for errors caused by system vibrations. These baseline errors will act as a \"reference signature\", enabling the development of correction mechanisms to mitigate the effects of vibration-induced disturbances.