This thesis presents attitude-independent magnetometer calibration using the Particle Swarm Optimization (PSO) algorithm. Typically the calibration parameters consist of bias, scale factor, and non-orthogonality correction. In this study the calibration parameters are extended to the magnetic torque coupling effect that the magnetic torque activation disturbs magnetometer measurement. Magnetometer calibration problem including the magnetic torque coupling effect is issued by the analysis of KOMPSAT-1 telemetry. On-orbit telemetry analysis shows that flight magnetometer measurement is disturbed from the activation of the magnetic torque rods. Therefore, the calibration considering the magnetic torque coupling effect allows the accurate magnetometer calibration. Attitude-independent magnetometer calibration problem is required to find optimal solution from a non-linear cost function. This nonlinear equation is derived from the effective measurement modeling of magnetometer. Especially, when including magnetic torque coupling effect, the solutions are increased to 12 calibration parameters. PSO algorithm based on the evolutionary optimization is chosen to find the global minimum of the cost function. The proposed method is verified through simulation study to evaluate the suitability of the PSO algorithm. Throughout simulation tests, it is successfully demonstrated that stochastic parameter optimization based on PSO algorithm could find the solution within a sufficiently rough initial boundary. KOMPSAT-1 magnetometer calibration is performed using flight data. Mean residual between the adjusted observation by the calibrated parameters and the geomagnetic reference vector is presented. It has been shown that the post calibration residuals of KOMPSAT-1 magnetometer are reduced.