

function F = myfun(x)

P=[ 0 0 0;0 0 10; 20 0 0;20 20 0;0 20 0;20 0 10; 20 20 10]; %x/y/z koordinaten der sender 2-7
P_0=[5 5 10];
c_w=1480; %Geschwindigkeit [m/s]
time=[    0.0082    0.0049    0.0140    0.0119    0.0144    0.0127    0.0150]; %Zeit[s]

F=[sqrt((x(1)-P(2,1)).^2+(x(2)-P(2,2)).^2+(x(3)-P(2,3))^2)-x(4)-(time(2)-time(1))*c_w;
  sqrt((x(1)-P(3,1)).^2+(x(2)-P(3,2)).^2+(x(3)-P(3,3))^2)-x(4)-(time(3)-time(1))*c_w;
  sqrt((x(1)-P(4,1)).^2+(x(2)-P(4,2)).^2+(x(3)-P(4,3))^2)-x(4)-(time(4)-time(1))*c_w;
  sqrt((x(1)-P(5,1)).^2+(x(2)-P(5,2)).^2+(x(3)-P(5,3))^2)-x(4)-(time(5)-time(1))*c_w;
  sqrt((x(1)-P(5,1)).^2+(x(2)-P(5,2)).^2+(x(3)-P(5,3))^2)-x(4)-(time(5)-time(1))*c_w;
  sqrt((x(1)-P(6,1)).^2+(x(2)-P(6,2)).^2+(x(3)-P(6,3))^2)-x(4)-(time(6)-time(1))*c_w;
  sqrt((x(1)-P(7,1)).^2+(x(2)-P(7,2)).^2+(x(3)-P(7,3))^2)-x(4)-(time(7)-time(1))*c_w];


