## 1 Introduction  
The attitude determination and control system (ADCS) is a subsystem in satellites. Magnetometers are sensors commonly used in the ADCS. If the magnetometer data are not calibrated properly, using simulations of on-orbit operating conditions with the running satellite, these data can be affected by residual magnetic fields. CubeSats have limited volume, space, and power. Due to the limitations of CubeSats, their magnetometers are not separated from other electrical circuits installed inside the satellite. Incorrect magnetometer data can lead to malfunction of the attitude determination and control system. However, not every CubeSat developer has the facilities to calibrate the magnetometers precisely. Therefore, not every CubeSat is able to calibrate its magnetometers correctly before flight. Magnetometers can provide unexpected results due to scaling factors, offsets, and non-orthogonality errors. Due to the residual magnetic field inside the satellite, the magnetometers require an additional calibration. That is, despite being calibrated by the ground test, magnetometers need to be calibrated again with on-orbit data. Previous studies have demonstrated calibration methods to calibrate on-orbit magnetometer data. [PERSON] et al. [1] described the performance characteristics of the UWE-3 pico-satellite's attitude determination and control system. According to the on-orbit results, attitude estimation was not accurate. It was found that the magnetometer data were not calibrated properly. Oscillations in total magnetic field, \(|\)B\(|\), were identified. [PERSON]'s study attempted to calibrate the on-orbit magnetometer data and set the correct parameters using standard minimization algorithms. Gain, cross-axis effects, and offsets were considered in the calibration method. A study presented by [PERSON] [2] shows an extension of the two-step estimation algorithm to calibrate solid-state strap-down magnetometers. Additionally, the authors stated that this algorithm can be applied to any two- or three-axis sensor. This method was not tested for magnetometers installed in a whole vehicle or spacecraft. [PERSON] et al. [3] presented the calibration of magnetometers using the hyper least square (HyperLS) method. This method was tested with a Honeywell HMC5883L magnetometer. The authors mentioned that magnetometer outputs were affected by various disturbances due to manufacturing faults and limits as well as environmental impacts, requiring calibration for meaningful application. The authors defined the errors as hard iron errors, soft iron errors, bias, scale factors, and misalignment in their study. [PERSON] et al. presented a calibration method utilizing a back propagation (BP) neural network [4]. The trained BP neural network is able to predict the true magnetic field, referring to the observational data. This method provided an error of less than 10 nT. The authors trained the network with the Levenberg-Marquardt (LMBP) algorithm, considering the non-orthogonal error, measurement noise, and constant drift. This calibration method is verified by a simulation. Previous studies used the genetic algorithm to calibrate magnetometers. [PERSON] et al. [5] presented a calibration method for a three-axis magnetometer using the genetic algorithm. In this study, three-axis non-orthogonal error, sensitivity error, and the residual magnetic effect are considered. This method was tested by numerical simulation and experimentation using a fluxgate magnetometer. The author mentioned that it is difficult to achieve high accuracy with methods such as the least square method for model parameter estimation. In our study, we used on-orbit data collected by three satellites, with the evaluation function as the error (defined as in Equation (5) shown in the methodology). Moreover, we focused on low-latitude regions where the deviation of the true magnetic field from a model magnetic field is expected to be small and applied the genetic algorithm. [PERSON] et al.