Path: SC/Attitude
% Rotate about a body axis to align a body vector with an inertial vector
1. Begin with an initial quaternion
2. Rotate about a body-frame axis to align a body-frame vector with an
inertial target vector
3. Return the new quaternion
--------------------------------------------------------------------------
Form:
[q,rotAngle,sepAngle,angleRange,sepCon] = QAlignWithCon( q0, uBAxis, uBVec,...
uITarget, u1B, u2I, minSep )
--------------------------------------------------------------------------
------
Inputs
------
q0 (4,:) Beginning inertial to body quaternion
uBAxis (3,1) Body-frame axis to rotate about
uBVec (3,1) Body-frame vector to align
uITarget (3,:) Inertial-frame vector to point at
u1B (3,N) Vector u1 in body frame. Constraint is:
acos( Dot(u1,u2) ) >= minSep
u2I (3,:,N) Vector u2 in inertial frame.
minSep (1,N) Keep angle between u1 and u2 greater than minSep.
-------
Outputs
-------
q (4,:) Resulting Inertial-to-Body quaternion after rotation
rotAngle (1,:) Angle of rotation [rad]
sepAngle (1,:) Separation angle between body vector and target [rad]
angleRange (:,4) Range of valid rotation angles
sepCon (1,N) Separation angle between u1 and u2
--------------------------------------------------------------------------
SC: Attitude/QRotateToAlignWithCon Common: Graphics/NewFig Common: Quaternion/QForm Common: Quaternion/QMult Common: Quaternion/QPose Common: Quaternion/QTForm
Back to the SC Module page