function res = gpsfun2(rec, sat)
res = (rec(1) - sat(:,1)).^2;
res = res + (rec(2) - sat(:,2)).^2;
