[en] This study is a part of the Skoltech University project to deploy a swarm of four identical 3U CubeSats in LEO. The CubeSats are to be equipped with gamma-ray sensors and their collective behavior will be exhibited in detecting gamma-ray bursts and coordinated attitude control. We consider a fully magnetic attitude control system, comprising a magnetometer as a part of attitude determination routine and three orthogonal magnetorquers as actuators. Having implemented and tested the conventional three-axis magnetic attitude determination and control algorithms, we proceed to study how the performance of such ADCS may be enhanced by using measurements and state vectors exchange. We interpolate the exchanged data, using the Kriging algorithm in conjunction with Extended Kalman filter and Lyapunov-based controller, since it provides the auto correlation and variance information about the environment of the magnetic field, which is of utmost importance for heterogeneous and noisy fields. In our simulations we compare the performance of the controller for a single satellite to that of the satellite in the swarm of CubeSats, which maintains the form of a regular tetrahedron and carries out distributed measurements with interpolation. Improved attitude stabilization for the latter scenario is demonstrated by mean squared errors.