Attitude determination and control