Home > . > oa2r.m

oa2r

PURPOSE ^

OA2R Convert O/A vectors to rotation matrix

SYNOPSIS ^

function r = oa2r(o, a)

DESCRIPTION ^

OA2R Convert O/A vectors to rotation matrix

     R = OA2R(O, A)

 Returns a rotation matrix for the specified orientation and 
 approach vectors formed from 3 vectors such that
 R = [N O A] and N = O x A.  
 The submatrix is guaranteed to be orthonormal so long as O and A are 
 not parallel.

 See also: RPY2R, EUL2R, OA2TR

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %OA2R Convert O/A vectors to rotation matrix
0002 %
0003 %     R = OA2R(O, A)
0004 %
0005 % Returns a rotation matrix for the specified orientation and
0006 % approach vectors formed from 3 vectors such that
0007 % R = [N O A] and N = O x A.
0008 % The submatrix is guaranteed to be orthonormal so long as O and A are
0009 % not parallel.
0010 %
0011 % See also: RPY2R, EUL2R, OA2TR
0012 
0013 % Copyright (C) 1993-2008, by Peter I. Corke
0014 %
0015 % This file is part of The Robotics Toolbox for Matlab (RTB).
0016 %
0017 % RTB is free software: you can redistribute it and/or modify
0018 % it under the terms of the GNU Lesser General Public License as published by
0019 % the Free Software Foundation, either version 3 of the License, or
0020 % (at your option) any later version.
0021 %
0022 % RTB is distributed in the hope that it will be useful,
0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0025 % GNU Lesser General Public License for more details.
0026 %
0027 % You should have received a copy of the GNU Leser General Public License
0028 % along with RTB.  If not, see <http://www.gnu.org/licenses/>.
0029 
0030 function r = oa2r(o, a)
0031     n = cross(o, a);
0032     o = cross(a, n);
0033     r = [unit(n(:)) unit(o(:)) unit(a(:))];

Generated on Sun 15-Feb-2009 18:09:29 by m2html © 2003