% GPSrun.m
% DATA = [x1 x2 x3 x4; y1 y2 y3 y4; z1 z2 z3 z4; d1 d2 d3 d4];
% where di is the apparent elapse time of signal.
% Distance is in meters.
% Time is in nanoseconds.
% K. Ming Leung, 02/07/04

DATA = [ ...
    1.876371950559744e6  1.097666464137408e7  2.458513954435968e7  3.854136195752833e6;
   -1.064143413406656e7 -1.308142752230029e7 -4.335023426659201e6  7.248575943442946e6;
    2.426976465661440e7  2.035116937827073e7  9.086300320217470e6  2.526630462778753e7;
    0.07234683200e9      0.06730845726e9      0.06738499643e9      0.07651971839e9   ];

F = 'GPSfunction';
JF = 'GPSjacobian';
Xinitial = zeros(4,1);
tol = 1e-8;
maxIt = 40;
X = NewtonD04(F,JF,Xinitial,tol,maxIt,DATA),


        