  This article solves an optimal control problem arising in attitude control of
a spacecraft under state and control constraints. We first derive the
discrete-time attitude dynamics by employing discrete mechanics. The
orientation transfer, with initial and final values of the orientation and
momentum and the time duration being specified, is posed as an energy optimal
control problem in discrete-time subject to momentum and control constraints.
Using variational analysis directly on the Lie group SO(3), we derive first
order necessary conditions for optimality that leads to a constrained two point
boundary value problem. This two point boundary value problem is solved via a
novel multiple shooting technique that employs a root finding Newton algorithm.
Robustness of the multiple shooting technique is demonstrated through a few
representative numerical experiments.
