function [F_W] = F_Weight(body,RB,n)




g = get(body,'g');
mass = get(body,'mass');
xG = get(body,'xG');
xB = get(body,'xB');
x = get(body,'sv');



massg = mass*g;

W = zeros(6);
W(4,4) = -massg*xG(3);
W(4,6) = massg*xG(1);
W(5,6) = massg*xG(2);
W(5,5) = -massg*xG(3);


F_W = zeros(1,6);

F_W(3) = -massg;
F_W(4) = +massg*xG(2);
F_W(5) = -massg*xG(1);

for i = 1:6
  for j = 1:6
    F_W(i) = F_W(i)-W(i,j)*x(j);
  end
end


