1 subroutine fitgps(ngps,gps,nsig,vecs,driv,s0,updorb)
29 #include "nav_cnst.fin"
31 real*8 gps(6,maxlin), vecs(6,maxlin), driv(6,3,maxlin), updorb(6)
32 real*8 pd(3,maxlin), pe(3,maxlin), up(6), w(6,6), v(6), s0(6)
33 real*8 xtol, xmed, xiqr
34 integer*4 nsig(maxlin), ngps, nobs, n, min, i, j, k, l, ier
41 pd(j,i) = gps(j,i) - vecs(j,i)
45 driv(2,j,i) = driv(2,j,i)/1.d2
46 driv(5,j,i) = driv(5,j,i)*1.d2
51 call mediqr(pd,nobs,xmed,xiqr)
68 if((nsig(i).ge.min).and.
69 * (
abs(pd(1,i)-xmed).lt.xtol).and.
70 * (
abs(pd(2,i)-xmed).lt.xtol).and.
71 * (
abs(pd(3,i)-xmed).lt.xtol))
then
75 v(k) = v(k) + pd(j,i)*driv(k,j,i)
77 w(k,l) = w(k,l) + driv(k,j,i)*driv(l,j,i)
83 print *,
'FITGPS:',n,xmed,xiqr
87 w(k,k) = w(k,k) + s0(k)
91 call invert(w,v,6,6,up,ier)
99 pe(j,i) = pe(j,i) - up(k)*driv(k,j,i)
105 call mediqr(pe,nobs,xmed,xiqr)
122 if((nsig(i).ge.min).and.
123 * (
abs(pe(1,i)-xmed).lt.xtol).and.
124 * (
abs(pe(2,i)-xmed).lt.xtol).and.
125 * (
abs(pe(3,i)-xmed).lt.xtol))
then
129 v(k) = v(k) + pd(j,i)*driv(k,j,i)
131 w(k,l) = w(k,l) + driv(k,j,i)*driv(l,j,i)
137 print *,
'FITGPS:',n,xmed,xiqr
141 w(k,k) = w(k,k) + s0(k)
145 call invert(w,v,6,6,up,ier)