In this paper an unscented Kalman filter based procedure for the bias estimation of both the magnetometers and the gyros carried onboard a pico satellite, is proposed. At the initial phase, biases of three orthogonally located magnetometers are estimated as well as the attitude and attitude rates of the satellite. During the initial period after the orbit injection, gyro measurements are accepted as bias free since the precise gyros are working accurately and the accumulated gyro biases are negligible. At the second phase estimated constant magnetometer bias components are taken into account and the algorithm is run for the estimation of the gyro biases that are cumulatively increased by time. As a result, six different bias terms for two different sensors are obtained in two stages, where attitude and attitude rates are estimated regularly. For both estimation phases of the procedure an unscented Kalman filter is used as the estimation algorithm.