Attitude Control of a Spacecraft Using Three CMGs