mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-24 22:25:17 -04:00
FST4 and FST4W decoder: get freq range from nfqso and ntol; remove BCD submodes, i.e. hmod=2, 4, 8.
This commit is contained in:
parent
844fe26368
commit
01a1688b32
@ -194,9 +194,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nsubmode=0
|
params%nsubmode=0
|
||||||
call timer('dec240 ',0)
|
call timer('dec240 ',0)
|
||||||
call my_fst4%decode(fst4_decoded,id2,params%nutc, &
|
call my_fst4%decode(fst4_decoded,id2,params%nutc, &
|
||||||
params%nQSOProgress,params%nfqso,params%nfa,params%nfb, &
|
params%nQSOProgress,params%nfqso,ndepth,params%ntr, &
|
||||||
params%nsubmode,ndepth,params%ntr,params%nexp_decode, &
|
params%nexp_decode,params%ntol,params%emedelay, &
|
||||||
params%ntol,params%emedelay, &
|
|
||||||
logical(params%lapcqonly),mycall,hiscall,iwspr)
|
logical(params%lapcqonly),mycall,hiscall,iwspr)
|
||||||
call timer('dec240 ',1)
|
call timer('dec240 ',1)
|
||||||
go to 800
|
go to 800
|
||||||
@ -208,9 +207,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
iwspr=1
|
iwspr=1
|
||||||
call timer('dec240 ',0)
|
call timer('dec240 ',0)
|
||||||
call my_fst4%decode(fst4_decoded,id2,params%nutc, &
|
call my_fst4%decode(fst4_decoded,id2,params%nutc, &
|
||||||
params%nQSOProgress,params%nfqso,params%nfa,params%nfb, &
|
params%nQSOProgress,params%nfqso,ndepth,params%ntr, &
|
||||||
params%nsubmode,ndepth,params%ntr,params%nexp_decode, &
|
params%nexp_decode,params%ntol,params%emedelay, &
|
||||||
params%ntol,params%emedelay, &
|
|
||||||
logical(params%lapcqonly),mycall,hiscall,iwspr)
|
logical(params%lapcqonly),mycall,hiscall,iwspr)
|
||||||
call timer('dec240 ',1)
|
call timer('dec240 ',1)
|
||||||
go to 800
|
go to 800
|
||||||
|
@ -29,9 +29,9 @@ module fst4_decode
|
|||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
subroutine decode(this,callback,iwave,nutc,nQSOProgress,nfqso, &
|
subroutine decode(this,callback,iwave,nutc,nQSOProgress,nfqso, &
|
||||||
nfa,nfb,nsubmode,ndepth,ntrperiod,nexp_decode,ntol, &
|
ndepth,ntrperiod,nexp_decode,ntol,emedelay,lapcqonly,mycall, &
|
||||||
emedelay,lapcqonly,mycall,hiscall,iwspr)
|
hiscall,iwspr)
|
||||||
|
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
use packjt77
|
use packjt77
|
||||||
@ -64,7 +64,7 @@ contains
|
|||||||
integer naptypes(0:5,4) ! (nQSOProgress,decoding pass)
|
integer naptypes(0:5,4) ! (nQSOProgress,decoding pass)
|
||||||
integer mcq(29),mrrr(19),m73(19),mrr73(19)
|
integer mcq(29),mrrr(19),m73(19),mrr73(19)
|
||||||
|
|
||||||
logical badsync,unpk77_success,single_decode
|
logical badsync,unpk77_success
|
||||||
logical first,nohiscall,lwspr,ex
|
logical first,nohiscall,lwspr,ex
|
||||||
|
|
||||||
integer*2 iwave(30*60*12000)
|
integer*2 iwave(30*60*12000)
|
||||||
@ -76,14 +76,12 @@ contains
|
|||||||
data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, &
|
data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, &
|
||||||
1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, &
|
1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, &
|
||||||
0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/
|
0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/
|
||||||
data first/.true./
|
data first/.true./,hmod/1/
|
||||||
save first,apbits,nappasses,naptypes,mycall0,hiscall0
|
save first,apbits,nappasses,naptypes,mycall0,hiscall0
|
||||||
|
|
||||||
this%callback => callback
|
this%callback => callback
|
||||||
|
|
||||||
dxcall13=hiscall ! initialize for use in packjt77
|
dxcall13=hiscall ! initialize for use in packjt77
|
||||||
mycall13=mycall
|
mycall13=mycall
|
||||||
|
|
||||||
fMHz=1.0
|
fMHz=1.0
|
||||||
|
|
||||||
if(iwspr.ne.0.and.iwspr.ne.1) return
|
if(iwspr.ne.0.and.iwspr.ne.1) return
|
||||||
@ -157,57 +155,43 @@ contains
|
|||||||
endif
|
endif
|
||||||
!************************************
|
!************************************
|
||||||
|
|
||||||
hmod=2**nsubmode
|
|
||||||
if(nfqso+nqsoprogress.eq.-999) return
|
if(nfqso+nqsoprogress.eq.-999) return
|
||||||
Keff=91
|
Keff=91
|
||||||
nmax=15*12000
|
nmax=15*12000
|
||||||
single_decode=iand(nexp_decode,32).eq.32
|
|
||||||
if(ntrperiod.eq.15) then
|
if(ntrperiod.eq.15) then
|
||||||
nsps=720
|
nsps=720
|
||||||
nmax=15*12000
|
nmax=15*12000
|
||||||
ndown=18/hmod !nss=40,80,160,400
|
ndown=18 !nss=40,80,160,400
|
||||||
if(hmod.eq.4) ndown=4
|
|
||||||
if(hmod.eq.8) ndown=2
|
|
||||||
nfft1=int(nmax/ndown)*ndown
|
nfft1=int(nmax/ndown)*ndown
|
||||||
else if(ntrperiod.eq.30) then
|
else if(ntrperiod.eq.30) then
|
||||||
nsps=1680
|
nsps=1680
|
||||||
nmax=30*12000
|
nmax=30*12000
|
||||||
ndown=42/hmod !nss=40,80,168,336
|
ndown=42 !nss=40,80,168,336
|
||||||
nfft1=359856 !nfft2=8568=2^3*3^2*7*17
|
nfft1=359856 !nfft2=8568=2^3*3^2*7*17
|
||||||
if(hmod.eq.4) then
|
|
||||||
ndown=10
|
|
||||||
nfft1=nmax
|
|
||||||
endif
|
|
||||||
if(hmod.eq.8) then
|
|
||||||
ndown=5
|
|
||||||
nfft1=nmax
|
|
||||||
endif
|
|
||||||
else if(ntrperiod.eq.60) then
|
else if(ntrperiod.eq.60) then
|
||||||
nsps=3888
|
nsps=3888
|
||||||
nmax=60*12000
|
nmax=60*12000
|
||||||
ndown=96/hmod !nss=36,81,162,324
|
ndown=108
|
||||||
if(hmod.eq.1) ndown=108
|
|
||||||
nfft1=7500*96 ! nfft2=7500=2^2*3*5^4
|
nfft1=7500*96 ! nfft2=7500=2^2*3*5^4
|
||||||
else if(ntrperiod.eq.120) then
|
else if(ntrperiod.eq.120) then
|
||||||
nsps=8200
|
nsps=8200
|
||||||
nmax=120*12000
|
nmax=120*12000
|
||||||
ndown=200/hmod !nss=40,82,164,328
|
ndown=205 !nss=40,82,164,328
|
||||||
if(hmod.eq.1) ndown=205
|
|
||||||
nfft1=7200*200 ! nfft2=7200=2^5*3^2*5^2
|
nfft1=7200*200 ! nfft2=7200=2^5*3^2*5^2
|
||||||
else if(ntrperiod.eq.300) then
|
else if(ntrperiod.eq.300) then
|
||||||
nsps=21504
|
nsps=21504
|
||||||
nmax=300*12000
|
nmax=300*12000
|
||||||
ndown=512/hmod !nss=42,84,168,336
|
ndown=512 !nss=42,84,168,336
|
||||||
nfft1=7020*512 ! nfft2=7020=2^2*3^3*5*13
|
nfft1=7020*512 ! nfft2=7020=2^2*3^3*5*13
|
||||||
else if(ntrperiod.eq.900) then
|
else if(ntrperiod.eq.900) then
|
||||||
nsps=66560
|
nsps=66560
|
||||||
nmax=900*12000
|
nmax=900*12000
|
||||||
ndown=1664/hmod !nss=40,80,160,320
|
ndown=1664 !nss=40,80,160,320
|
||||||
nfft1=6480*1664 ! nfft2=6480=2^4*3^4*5
|
nfft1=6480*1664 ! nfft2=6480=2^4*3^4*5
|
||||||
else if(ntrperiod.eq.1800) then
|
else if(ntrperiod.eq.1800) then
|
||||||
nsps=134400
|
nsps=134400
|
||||||
nmax=1800*12000
|
nmax=1800*12000
|
||||||
ndown=3360/hmod !nss=40,80,160,320
|
ndown=3360 !nss=40,80,160,320
|
||||||
nfft1=6426*3360 ! nfft2=6426=2*3^3*7*17
|
nfft1=6426*3360 ! nfft2=6426=2*3^3*7*17
|
||||||
end if
|
end if
|
||||||
nss=nsps/ndown
|
nss=nsps/ndown
|
||||||
@ -218,7 +202,7 @@ contains
|
|||||||
dt2=1.0/fs2
|
dt2=1.0/fs2
|
||||||
tt=nsps*dt !Duration of "itone" symbols (s)
|
tt=nsps*dt !Duration of "itone" symbols (s)
|
||||||
baud=1.0/tt
|
baud=1.0/tt
|
||||||
sigbw=4.0*hmod*baud
|
sigbw=4.0*baud
|
||||||
nfft2=nfft1/ndown !make sure that nfft1 is exactly nfft2*ndown
|
nfft2=nfft1/ndown !make sure that nfft1 is exactly nfft2*ndown
|
||||||
nfft1=nfft2*ndown
|
nfft1=nfft2*ndown
|
||||||
nh1=nfft1/2
|
nh1=nfft1/2
|
||||||
@ -232,8 +216,7 @@ contains
|
|||||||
jittermax=2
|
jittermax=2
|
||||||
norder=3
|
norder=3
|
||||||
elseif(ndepth.eq.2) then
|
elseif(ndepth.eq.2) then
|
||||||
nblock=1
|
nblock=3
|
||||||
if(hmod.eq.1) nblock=3
|
|
||||||
jittermax=0
|
jittermax=0
|
||||||
norder=3
|
norder=3
|
||||||
elseif(ndepth.eq.1) then
|
elseif(ndepth.eq.1) then
|
||||||
@ -249,17 +232,11 @@ contains
|
|||||||
! The big fft is done once and is used for calculating the smoothed spectrum
|
! The big fft is done once and is used for calculating the smoothed spectrum
|
||||||
! and also for downconverting/downsampling each candidate.
|
! and also for downconverting/downsampling each candidate.
|
||||||
call four2a(c_bigfft,nfft1,1,-1,0) !r2c
|
call four2a(c_bigfft,nfft1,1,-1,0) !r2c
|
||||||
! call blank2(nfa,nfb,nfft1,c_bigfft,iwave)
|
|
||||||
|
|
||||||
nhicoh=1
|
nhicoh=1
|
||||||
nsyncoh=8
|
nsyncoh=8
|
||||||
if(iwspr.eq.1) then
|
fa=max(100,nint(nfqso+1.5*baud-ntol))
|
||||||
fa=1400.0
|
fb=min(4800,nint(nfqso+1.5*baud+ntol))
|
||||||
fb=1600.0
|
|
||||||
else
|
|
||||||
fa=max(100,nint(nfqso+1.5*hmod*baud-ntol))
|
|
||||||
fb=min(4800,nint(nfqso+1.5*hmod*baud+ntol))
|
|
||||||
endif
|
|
||||||
minsync=1.20
|
minsync=1.20
|
||||||
if(ntrperiod.eq.15) minsync=1.15
|
if(ntrperiod.eq.15) minsync=1.15
|
||||||
|
|
||||||
@ -485,7 +462,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
nsnr=nint(xsnr)
|
nsnr=nint(xsnr)
|
||||||
qual=0.
|
qual=0.
|
||||||
fsig=fc_synced - 1.5*hmod*baud
|
fsig=fc_synced - 1.5*baud
|
||||||
if(ex) then
|
if(ex) then
|
||||||
write(21,3021) nutc,icand,itry,nsyncoh,iaptype, &
|
write(21,3021) nutc,icand,itry,nsyncoh,iaptype, &
|
||||||
ijitter,ntype,nsync_qual,nharderrors,dmin, &
|
ijitter,ntype,nsync_qual,nharderrors,dmin, &
|
||||||
@ -791,7 +768,6 @@ contains
|
|||||||
complex, allocatable :: cwave(:) !Reconstructed complex signal
|
complex, allocatable :: cwave(:) !Reconstructed complex signal
|
||||||
complex, allocatable :: g(:) !Channel gain, g(t) in QEX paper
|
complex, allocatable :: g(:) !Channel gain, g(t) in QEX paper
|
||||||
real,allocatable :: ss(:) !Computed power spectrum of g(t)
|
real,allocatable :: ss(:) !Computed power spectrum of g(t)
|
||||||
real,allocatable,save :: ssavg(:) !Computed power spectrum of g(t)
|
|
||||||
integer itone(160) !Tones for this message
|
integer itone(160) !Tones for this message
|
||||||
integer*2 iwave(nmax) !Raw Rx data
|
integer*2 iwave(nmax) !Raw Rx data
|
||||||
integer hmod !Modulation index
|
integer hmod !Modulation index
|
||||||
|
Loading…
x
Reference in New Issue
Block a user