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