If you want the details, please see the write up at: http://www.billkamp.com/lws/Tetra/LSFSemblance.htm for the gory mathematical details.
The test program for this routine also provides some detail. See tst39.pro for that documentation.
This document provides the implementation details only.
The routine is called by
GetSlowness,tdMat, satLoc, toMat, slowness, rCond
N=4 satLoc=make_array(N, /float) satLoc = [[x],[y],[z],[w]]
This is a 4 satellite case, and the 3-dimensional vectors x, y, z, and w are the positions of the satellites.
newOrigin = make_array(3,/float,value=0b) mySatLoc = satLoc FOR i=0,nSat-1 DO BEGIN newOrigin[0]=newOrigin[0]+satLoc[0,i] newOrigin[1]=newOrigin[1]+satLoc[1,i] newOrigin[2]=newOrigin[2]+satLoc[2,i] ENDFOR FOR i=0,nSat-1 DO BEGIN mySatLoc[0,i]=satLoc[0,i] -newOrigin[0]/nSat mySatLoc[1,i]=satLoc[1,i] -newOrigin[1]/nSat mySatLoc[2,i]=satLoc[2,i] -newOrigin[2]/nSat ENDFOR
; Make the volumetric tensor R = make_array(3,3,/float,VALUE=0b) FOR i=0,2 DO BEGIN FOR j=0,2 DO BEGIN FOR alpha=0,nSat-1 DO BEGIN R[i,j] = R[i,j] + mySatLoc[i,alpha]*mySatLoc[j,alpha] ENDFOR ENDFOR ENDFOR R = R/nSat
rCond=cond(R)
rInv = invert(R)
pM = make_array(3,/float,VALUE=0b) ; This will be the three components of the space delay array spDelArr = make_array(nSat,nSat,3,/float,VALUE=0b) ; Also store the component separately, so we can multiply them by the slowness vector as a test. sdx = make_array(nSat, nSat,/float,value=0b) sdy = make_array(nSat, nSat,/float,value=0b) sdz = make_array(nSat, nSat,/float,value=0b) FOR alpha=0,nSat-1 DO BEGIN FOR beta=0,nSat-1 DO BEGIN sdx[alpha,beta] = mySatLoc[0,alpha]-mySatLoc[0,beta] sdy[alpha,beta] = mySatLoc[1,alpha]-mySatLoc[1,beta] sdz[alpha,beta] = mySatLoc[2,alpha]-mySatLoc[2,beta] FOR k=0,2 DO BEGIN spDelArr[alpha,beta,k] = mySatLoc[k,alpha]-mySatLoc[k,beta] pM[k]=pM[k]+tdMat[alpha,beta]*( mySatLoc[k,alpha]-mySatLoc[k,beta] ) ENDFOR ENDFOR ENDFOR pM=pM/(2*nSat*nSat)
slowness = transpose(pM#rInv)
toMat = slowness[0]*sdx toMat = slowness[1]*sdy + toMat toMat = slowness[2]*sdz + toMat