QRotateToAlignWithCon:

Path: SCPro/ProAttitude

% Calculate the alignment quaternion while applying constraints
 Rotate about an axis to align "ua" as close as possible to target "ut" with
 constraint that the angle between a rotated u1 vector and a fixed u2 vector be
 greater than minSep

 Type QRotateToAlignWithCon for a demo
--------------------------------------------------------------------------
   Form:
   [qRot,ub,rotAngle,sepAngle,angleRange,sepCon,sepBnd,sep0,rot0] = ...
                  QRotateToAlignWithCon( axis, ua, ut, u1, u2, minSep )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   axis       (3,1)  Axis of rotation
   ua         (3,1)  Vector to align
   ut         (3,:)  Target vector to be aligned with
   u1         (3,N)  Vector u1. Constraint is:
                       acos( Dot(u1,u2) ) >= minSep
   u2         (3,:,N)  Vector u2.
   minSep     (1,N)  Keep angle between u1 and u2 greater than minSep.

   -------
   Outputs
   -------
   qRot       (4,:)  Quaternion that rotates ua to ub about axis
   ub         (3,:)  Vector achieved after rotation
   rotAngle   (1,:)  Angular rotation about the axis
   sepAngle   (1,:)  Separation angle between ub and ut
   angleRange (:,2)  Range of valid rotation angles
   sepCon     (1,N)  Separation angle between u1 and u2

--------------------------------------------------------------------------

Children:

Common: CommonData/SwooshWatermark
Common: General/CellToMat
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/Coordinates
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PlotAngleRange
Common: Graphics/PltStyle
Common: Quaternion/QForm
Math: Geometry/AngleSepFromRotation
Math: Geometry/FindValidAngleRange
Math: Geometry/InsideAngleRange
Math: Geometry/MergeAngleRange
Math: Linear/Cross
Math: Linear/Unit
Math: Trigonometry/LinearSinCosToQuadCos
Math: Trigonometry/SolveLinearSinCos

Back to the SCPro Module page