2013-07-08 13:17:22 +00:00
|
|
|
subroutine softsym(id2,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt, &
|
2015-03-04 17:07:15 +00:00
|
|
|
freq,drift,a3,schk,i1SoftSymbols)
|
2012-11-27 15:38:03 +00:00
|
|
|
|
2013-04-22 15:43:02 +00:00
|
|
|
! Compute the soft symbols
|
|
|
|
|
2015-12-27 15:40:57 +00:00
|
|
|
use timer_module, only: timer
|
|
|
|
|
2015-04-22 17:48:03 +00:00
|
|
|
parameter (NZ2=1512,NZ3=1360)
|
2015-12-29 23:52:55 +00:00
|
|
|
logical, intent(inout) :: newdat
|
2015-04-22 17:48:03 +00:00
|
|
|
complex c2(0:NZ2-1)
|
|
|
|
complex c3(0:NZ3-1)
|
|
|
|
complex c5(0:NZ3-1)
|
2013-04-22 15:08:20 +00:00
|
|
|
real a(3)
|
2012-11-27 15:38:03 +00:00
|
|
|
integer*1 i1SoftSymbolsScrambled(207)
|
|
|
|
integer*1 i1SoftSymbols(207)
|
|
|
|
include 'jt9sync.f90'
|
|
|
|
|
|
|
|
nspsd=16
|
|
|
|
ndown=nsps8/nspsd
|
|
|
|
|
2013-04-22 15:43:02 +00:00
|
|
|
! Mix, low-pass filter, and downsample to 16 samples per symbol
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('downsam9',0)
|
2015-04-22 17:48:03 +00:00
|
|
|
call downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2)
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('downsam9',1)
|
2012-11-27 15:38:03 +00:00
|
|
|
|
2015-04-22 17:48:03 +00:00
|
|
|
call peakdt9(c2,nsps8,nspsd,c3,xdt) !Find DT
|
2012-11-27 15:38:03 +00:00
|
|
|
|
|
|
|
fsample=1500.0/ndown
|
|
|
|
a=0.
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('afc9 ',0)
|
2016-01-08 20:55:17 +00:00
|
|
|
call afc9(c3,nz3,fsample,a,syncpk) !Find deltaF, fDot, extra DT
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('afc9 ',1)
|
2013-05-15 15:17:36 +00:00
|
|
|
freq=fpk - a(1)
|
|
|
|
drift=-2.0*a(2)
|
2016-01-08 20:55:17 +00:00
|
|
|
! write(*,3301) fpk,freq,a
|
|
|
|
!3301 format(2f9.3,3f10.4)
|
2015-03-04 17:07:15 +00:00
|
|
|
a3=a(3)
|
|
|
|
a(3)=0.
|
2012-11-27 15:38:03 +00:00
|
|
|
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('twkfreq ',0)
|
2013-07-08 13:17:22 +00:00
|
|
|
call twkfreq(c3,c5,nz3,fsample,a) !Correct for delta f, f1, f2 ==> a(1:3)
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('twkfreq ',1)
|
2012-11-27 15:38:03 +00:00
|
|
|
|
2013-04-22 15:43:02 +00:00
|
|
|
! Compute soft symbols (in scrambled order)
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('symspec2',0)
|
2013-05-15 15:17:36 +00:00
|
|
|
call symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
|
|
|
|
i1SoftSymbolsScrambled)
|
2013-07-09 16:22:25 +00:00
|
|
|
call timer('symspec2',1)
|
2012-11-27 15:38:03 +00:00
|
|
|
|
2013-04-22 15:43:02 +00:00
|
|
|
! Remove interleaving
|
2012-11-27 15:38:03 +00:00
|
|
|
call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols)
|
|
|
|
|
2013-05-20 14:09:02 +00:00
|
|
|
return
|
2013-04-22 15:43:02 +00:00
|
|
|
end subroutine softsym
|