A1 = 15600;
A2 = 18760;
A3 = 17610;
A4 = 19170;

B1 = 7540;
B2 = 2750;
B3 = 14630;
B4 = 610;

C1 = 20140;
C2 = 18610;
C3 = 13480;
C4 = 18390;

t1 = 0.07074;
t2 = 0.07220;
t3 = 0.07690;
t4 = 0.07242;

c = 299792.458;%Km/sec

Ux = [(2*A2 -2*A1); (2*A3 - 2*A1); (2*A4 -2*A1)];
Uy = [(2*B2-2*B1); (2*B3-2*B1); (2*B4-2*B1)];
Uz = [(2*C2-2*C1); (2*C3-2*C1);(2*C4-2*C1)];

Ud = [(2*c^2*(t1-t2));(2*c^2*(t1-t3));(2*c^2*(t1-t4))];
temp1 = A1^2-A2^2+B1^2-B2^2+C1^2-C2^2+c^2*t2^2-c^2*t1^2;
temp2 = A1^2-A3^2+B1^2-B3^2+C1^2-C3^2+c^2*t3^2-c^2*t1^2;
temp3 = A1^2-A4^2+B1^2-B4^2+C1^2-C4^2+c^2*t4^2-c^2*t1^2;
W = [temp1;temp2; temp3];

L1 = det([Uy,Uz,Ux]);
L2 = det([Uy,Uz,Ud]);
L3 = det([Uy,Uz,W]);

M1 = det([Ux,Uz,Uy]);
M2 = det([Ux,Uz,Ud]);
M3 = det([Ux,Uz,W]);

N1 = det([Ux,Uy,Uz]);
N2 = det([Ux,Uy,Ud]);
N3 = det([Ux,Uy,W]);

E1=-L2/L1;
E2=-L3/L1;
E3=-M2/M1;
E4=-M3/M1;
E5=-N2/N1;
E6=-N3/N1;

G=E1^2+E3^2+E5^2-c^2;
H=2*(E1*E2+E3*E4+E5*E6-A1*E1-B1*E3-C1*E5+c^2*t1);
I=E2^2+E4^2+E6^2-2*(A1*E2+B1*E4+C1*E6)-c^2*t1^2+A1^2+B1^2+C1^2;


d1=(-H+(H^2-4*G*I)^.5)/(2*G)
d2=(-H-(H^2-4*G*I)^.5)/(2*G)

x1=E1*d1+E2;
x2=E1*d2+E2;
y1=E3*d1+E4;
y2=E3*d2+E4;
z1=E5*d1+E6;
z2=E5*d2+E6;

[ [x1;y1;z1;] , [x2;y2;z2] ]