## 6 Conclusions  
CubeSats have limitations, as mentioned in the introduction section. Thus, magnetometers are not separated from electrical circuits inside the satellites. Therefore, magnetometers should be calibrated properly before flight. However, most CubeSat developers do not have the facilities to calibrate magnetometers with in-orbit conditions. Magnetometers are important sensors used in attitude determination and control systems. In this study, we investigated the magnetometer data collected by the BIRDS-3 CubeSats Raavana-1, NepaliSat-1, and Uguisu that flew with an orbit of 51.6-degree inclination and approximately 400 km altitude. There was a heavy variation in the magnetometer data collected when compared to a magnetic model. The genetic algorithm was used in this study to calibrate the magnetometer data. We focused on non-orthogonality angles, offsets, and gains to calibrate the on-orbit magnetometer data. According to the results, applying the genetic algorithm to low-latitude regions and interchanging the answers with other available on-orbit data collected by the same satellite is possible. We defined the error as the difference from the WMM value, regarding the WMM value as a \"true\" solution. We use the error as the evaluation function of the genetic algorithm; the smaller, the better. According to the results, we could reduce the error with the genetic algorithm compared to the error in the measured magnetometer data. We were able to show that the high oscillations in the total magnetic field are mostly due to the gain and the offset. Next, we discussed using frequency amplitude in the genetic algorithm to reduce the oscillations. In this case, we defined two errors. One was the difference from the WMM value. The other was the oscillation amplitude of frequency, which was higher than expected due to satellite rotation. In this case, we used entire data sets of whole orbits. According to the results, we show that only using the difference from the WMM value for low-latitude data as the evaluation function gives better calibration results than using both the high-frequency oscillation and the difference from the WMM value as the evaluation function. We tested the genetic algorithm for flight magnetometer data collected by three satellites and confirmed that the method is sufficient in calibrating on-orbit magnetometer data. The calibration method outlined in this paper still has room for improvement. We could not remove the oscillations in the total magnetic field completely. Finding a better way to reduce oscillations remains a goal of future work. The following supporting information can be downloaded at Withanage, Dulani (2023), \"On-orbit magnetometer data observed by BIRDS-3 CubeSats\", Mendeley Data, V1, doi: 10.17632/2b2 rvccyx.1, available online: [[https://data.mendeley.com/datasets/2b2](https://data.mendeley.com/datasets/2b2) rvccyx/1]([https://data.mendeley.com/datasets/2b2](https://data.mendeley.com/datasets/2b2) rvccyx/1), accessed on 27 April 2023. Conceptualization, D.C.W., M.T. and M.C. ; methodology, D.C.W., M.T. and M.C. ; software D.C.W., M.T. and M.C. ; validation D.C.W., M.T. and M.C. ; formal analysis, D.C.W. ; investigation, D.C.W. ; resources, M.T. and M.C. ; data curation, D.C.W. ; writing--original draft preparation, D.C.W. ; writing--review and editing, D.C.W., M.T. and M.C. ; visualization, D.C.W. ; supervision, M.T. and M.C. ; project administration, M.C. ; funding acquisition, M.C. All authors have read and agreed to the published version of the manuscript. This research was partially funded by the JSPS Core-to-Core Program B: Asia-Africa Science Platforms. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Satellite** & **Offsets [mG]** & & & **Gains** & & & **Non-Orthogonal Angles** \\  & **X** & **Y** & **Z** & **a** & **b** & **c** & **\(\lambda\)** & \(\rho\)** & \(\phi\)** \\ \hline NepaliSat-1 & 127.91 & 62.61 & \(-\)77.12 & 0.87 & 0.80 & 0.88 & 4.54 & \(-\)1.80 & 0.38 \\ \hline \hline \end{tabular}
\end{table}