Path: AerospaceUtils/Coord
% Rotate about an axis to align "ua" as close as possible to target "ut" -------------------------------------------------------------------------- Form: qRot,ub,rotAngle,sepAngle] = QVectorAlign( axis, ua, ut) -------------------------------------------------------------------------- ------ Inputs ------ axis (3,1) Axis of rotation ua (3,1) Vector to align ut (3,:) Target vector to be aligned with ------- Outputs ------- qRot (4,1) Quaternion that rotates ua to ub about axis ub (3,1) Vector achieved after rotation rotAngle (4,1) Angular rotation about the axis sepAngle (4,1) Separation angle between ub and ut --------------------------------------------------------------------------
Math: Linear/Cross Math: Linear/Unit
Back to the AerospaceUtils Module page