  A time optimal attitude control problem is studied for the dynamics of a
rigid body. The objective is to minimize the time to rotate the rigid body to a
desired attitude and angular velocity while subject to constraints on the
control input. Necessary conditions for optimality are developed directly on
the special orthogonal group using rotation matrices. They completely avoid
singularities associated with local parameterizations such as Euler angles, and
they are expressed as compact vector equations. In addition, a discrete control
method based on a geometric numerical integrator, referred to as a Lie group
variational integrator, is proposed to compute the optimal control input. The
computational approach is geometrically exact and numerically efficient. The
proposed method is demonstrated by a large-angle maneuver for an elliptic
cylinder rigid body.
