function [par,gm]=stltp(x)
%- X,a Nx2 matrix,is the vector of satellite's position
%- PAR,a 2x2 matrix,is the parameters vector of satellite's position eqution
%- GM is the coeffient matrix of eqution
%- STLTP ueses least square method to estimate the the parameters vector of satellite's position eqution
[lx,ly]=size(x);
if lx < 5,disp('input data is not enough'),return,end
if ly ~= 2,disp('input data dimension is not available'),return,end
xsq=x(:,1).^2;
xym=2*x(:,1).*x(:,2);
ysq=x(:,2).^2;
xp=x(:,1);
yp=x(:,2);
gm=[xsq,xym,ysq,xp,yp];
b=-ones(lx,1);
gms=inv(gm'*gm);
par=gms*gm'*b;