Spacecraft Attitude Stabilization with Piecewise