Subroutine trakwit()
applies a weighting operator to each track.
This weighting operator is a little unusual because it
is not a scaling function but an operator.
Recall the unknown mean values or low-frequency noise in the data tracks.
Because of this noise,
there would be huge residuals if we tried to fit the solution altitude
to the crossing altimeter tracks
where they do not match at the point of crossing.
The proper method is to filter the residual
to eliminate the low-frequency noise in the data.
Many people filter observed data to eliminate noise in it,
but when we come to compare such data to modeled data
we need to filter it with the same filter.
Filtering the residual cleans both data sets at the same time,
with an assuredly identical filter.
The simplest filter that eliminates zero frequency is the
first-order, finite-difference operator (1,-1).
The next simplest is an operator with a narrower spectral notch
around zero frequency, namely (1,-1/3,-1/3,-1/3), etc.
I found that both worked about equally well in this case.
These are rough prior guesses of the filters that whiten the data.
A more general solution is to form the residuals
and then design a whitener for them.
A still more general solution is to find the residuals and the PEF
at the same time.
# Weight (filter) the track residuals. Also adjoint.
#
subroutine trakwit( adj, aa,a1,a2, rr, n1,n2, wr )
integer i1, nd, adj, a1,a2, n1,n2, n12, rn, rs, rh
real aa(a1,a2), rr( n1*n2*3), wr(n1*n2*3)
temporary real del(n1)
nd= 5; del( 1)= 1.
do i1 = 2, nd
del(i1) = - 1./( nd - 1.)
rn = 1; n12 = n1 * n2
rs = 1 + n12
rh = 1 + n12 + n12
call icai2( adj,0, 1,1, del, nd,1, rr(rn), n1,n2, wr(rn))
call icai2( adj,0, 1,1, del, 1,nd, rr(rs), n1,n2, wr(rs))
call icai2( adj,0, 1,1, aa,a1,a2, rr(rh), n1,n2, wr(rh))
return; end
The idea behind subroutine track() applies also to crooked survey lines. For use with crooked lines, however, subroutine trakwit() would need modification so that it could apply the data noise-whitening filter along the actual track and not simply along the coordinate axis.