% Demonstrate gimballed boom actuation with set gimbal commands.
   This demo uses the PlateWithBoom CAD model. The gimbals have a 
   1-2 sequence, first around the X axis and then around the Y axis. 
   The boom is nominally aligned with the body X axis. Note that the  
   inner gimbal zeros itself before the outer gimbal is rotated to  
   avoid intermediate torques. There are two sets of gimbal angles 
   describing every boom position, and GimbalRates will choose the 
   closest path, which may differ from the commanded angles.
   The command sequence is:
   [alpha]  = [0 0.0 pi/2 5pi/4 0],  outer gimbal (1)
   [beta ]    [0 0.5 0.5 h 0.8   0],  inner gimbal (2)
   The commands change at 100 second intervals.

   When interpreting the torques recall that
       T = (Cp - Cm) x F
   where in this case F is nominally along the -X axis, Cp is the center of
   pressure which is the origin, and Cm is the center of mass.

   This means that we would expect the following Cm displacement:
       [0, -Z, +Y, -Y and +Z, 0]
   with the following torques:
       [0, -Y, -Z, +Y and +Z, 0] 
   The attitude dynamics assume fixed gimbal rates. 
   The CAD model is a perfectly specular plate with a control boom.

   Functions demonstrated:

   Since version 7.
  See also ACPlot, CrossSection, DrawSCPlanPlugIn, Eul2Mat, QMult, QPose, 
  Constant, WaitBarManager, Plot2D, TimeLabl, Cross, Mag, RK4, Unit, JD2000, 
  El2RV, GimbalRates, HGimballedBoom, ConeClockToQConstrained, QSail, 
  QToConeClock, HingeRotationMatrix, SailDisturbance, SailEnvironment
	  Copyright (c) 2005,2006 Princeton Satellite Systems, Inc. 
   All rights reserved.


AeroUtils: CAD/CrossSection
AeroUtils: CAD/DrawSCPlanPlugIn
Common: Database/Constant
Common: General/WaitBarManager
Common: Graphics/Plot2D
Common: Graphics/TimeLabl
Common: Quaternion/QMult
Common: Quaternion/QPose
Common: Time/JD2000
Common: Transform/Eul2Mat
Math: Integration/RK4
Math: Linear/Cross
Math: Linear/Mag
Math: Linear/Unit
OrbitMiniToolbox: Support/El2RV
Sail: Actuator/GimbalRates
Sail: AttitudeDynamics/HGimballedBoom
Sail: Coordinates/ConeClockToQConstrained
Sail: Coordinates/QSail
Sail: Coordinates/QToConeClock
Sail: Disturbances/HingeRotationMatrix
Sail: Disturbances/SailDisturbance
Sail: Disturbances/SailEnvironment