t1=-pi/2;
t2=-pi;

% pan_range=pan_min:0.1:pan_max;
% tilt_range=tilt_min:0.1:tilt_max;

l1=0.03;
l2=0.07;
l3=0.05;

J=[-sin(t1)*(cos(t2)*l3+l2*sin(t2)) cos(t1)*(-l3*sin(t2)+l2*cos(t2));...
    cos(t1)*(cos(t2)*l3+l2*sin(t2)) sin(t1)*(-l3*sin(t2)+l2*cos(t2))];

inv_J=[-sin(t1)/(l2*sin(t2)+l3*cos(t2)) cos(t1)/(l2*sin(t2)+l3*cos(t2));...
    cos(t1)/(l2*cos(t2)-l3*sin(t2)) sin(t1)/(l2*cos(t2)-l3*sin(t2))];

J*inv_J
