In this paper an Unscented Kalman filter based procedure for the bias estimation of both the magnetometers and the gyros, which are carried onboard by 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 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 Unscented Kalman Filter is used as the estimation algorithm.