2015-04-22 13:48:03 -04:00
|
|
|
subroutine peakdt9(c2,nsps8,nspsd,c3,xdt)
|
2012-10-03 13:47:55 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
parameter (NZ2=1512,NZ3=1360)
|
|
|
|
complex c2(0:NZ2-1)
|
|
|
|
complex c3(0:NZ3-1)
|
2012-11-27 10:38:03 -05:00
|
|
|
complex z
|
|
|
|
real p(0:3300)
|
2012-10-22 15:18:24 -04:00
|
|
|
include 'jt9sync.f90'
|
2012-10-03 13:47:55 -04:00
|
|
|
|
2012-11-27 10:38:03 -05:00
|
|
|
p=0.
|
2015-04-22 13:48:03 -04:00
|
|
|
i0=5*nspsd
|
|
|
|
do i=0,NZ2-1
|
2013-07-08 09:17:22 -04:00
|
|
|
z=1.e-3*sum(c2(max(i-(nspsd-1),0):i))
|
|
|
|
p(i0+i)=real(z)**2 + aimag(z)**2 !Integrated symbol power at freq=0
|
2012-11-27 10:38:03 -05:00
|
|
|
enddo
|
2012-11-15 11:34:14 -05:00
|
|
|
|
2012-11-27 10:38:03 -05:00
|
|
|
call getlags(nsps8,lag0,lag1,lag2)
|
|
|
|
tsymbol=nsps8/1500.0
|
|
|
|
dtlag=tsymbol/nspsd
|
|
|
|
smax=0.
|
|
|
|
lagpk=0
|
|
|
|
do lag=lag1,lag2
|
|
|
|
sum0=0.
|
|
|
|
sum1=0.
|
|
|
|
j=-nspsd
|
|
|
|
do i=1,85
|
|
|
|
j=j+nspsd
|
|
|
|
if(isync(i).eq.1) then
|
|
|
|
sum1=sum1+p(j+lag)
|
|
|
|
else
|
|
|
|
sum0=sum0+p(j+lag)
|
|
|
|
endif
|
2012-10-03 13:47:55 -04:00
|
|
|
enddo
|
2012-11-27 10:38:03 -05:00
|
|
|
ss=(sum1/16.0)/(sum0/69.0) - 1.0
|
|
|
|
xdt=(lag-lag0)*dtlag
|
|
|
|
if(ss.gt.smax) then
|
|
|
|
smax=ss
|
|
|
|
lagpk=lag
|
2012-10-03 13:47:55 -04:00
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
|
2012-11-27 10:38:03 -05:00
|
|
|
xdt=(lagpk-lag0)*dtlag
|
2012-11-15 11:34:14 -05:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
do i=0,NZ3-1
|
2012-11-27 10:38:03 -05:00
|
|
|
j=i+lagpk-i0-nspsd+1
|
2015-04-22 13:48:03 -04:00
|
|
|
if(j.ge.0 .and. j.lt.NZ2) then
|
2012-11-27 10:38:03 -05:00
|
|
|
c3(i)=c2(j)
|
|
|
|
else
|
|
|
|
c3(i)=0.
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
|
2012-10-03 13:47:55 -04:00
|
|
|
return
|
|
|
|
end subroutine peakdt9
|