function [thdot] = fan_solve(t, th)
%
% given angles of components, find:
% thdot  -- angular velocities
%
global r r2 rg lthg;
global iwk iwu1 iwu2 ium;
global w_data;
global gc g_by_gc; 
global m ai;
%
nlink = 3;
if (length(th) ~= 3);
	disp('error, th of wrong length');
	return;
end;
%
% get unit vectors
[nvec, tvec] = linkage_vec(th);
%
% solve for angular velocitiess
A = [r(iwu1)*tvec(:,iwu1) r(iwu2)*tvec(:,iwu2)];
y = [w_data(iwk)*r(iwk)*tvec(:,iwk)];
x = -A\y;
%
% set values in thdot
thdot = zeros(3,1);
thdot(iwk)  = w_data(iwk);
thdot(iwu1) = x(1);
thdot(iwu2) = x(2);
%
% 
