Attitude control of spacecraft by using only angular positions