Nonlinear observer and output feedback attitude control of spacecraft