%IINVPUMATESTER   Tests invpuma6dof.m
% Tests invpuma.m a times
%
% Syntax:  invpumatester(a)
%
% Inputs:
%    a - number of times to test
%
% Other m-files required: invpuma6dof.m

% Author: Travis Hydzik
% Last revision: 19 October 2004

function invpumatester(a)

    for i=1:a
        
        disp('--------------------------------------------');
        
        param = [2 2 2 .2];

        theta  = [pi*rand    pi*rand   pi*rand   pi*rand   pi*rand   pi*rand]
        
        T = puma6dof(theta, param , [0 0 0]);
        
        
        thetanew = invpuma6dof(T, param)
        
        T1 = puma6dof(thetanew(1,:), param , [0 0 0])
        toleq(T,T1,0.001);
        
        T2 = puma6dof(thetanew(2,:), param , [0 0 0])
        toleq(T,T2,0.001);
        
        T3 = puma6dof(thetanew(3,:), param , [0 0 0])
        toleq(T,T3,0.001);
        
        T4 = puma6dof(thetanew(4,:), param , [0 0 0])
        toleq(T,T4,0.001);

    end