mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Merge branch 'feat-fst280' of bitbucket.org:k1jt/wsjtx into feat-fst280
This commit is contained in:
commit
cc0aa373a9
@ -197,9 +197,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
if(params%nmode.eq.66) then
|
||||
! We're in QRA66 mode
|
||||
call timer('decqra66',0)
|
||||
call my_qra66%decode(qra66_decoded,id2,params%nutc,params%nfa, &
|
||||
params%nfb,params%nfqso,params%ndepth,logical(params%lapcqonly), &
|
||||
mycall,hiscall,hisgrid)
|
||||
call my_qra66%decode(qra66_decoded,id2,params%nutc,params%nfqso, &
|
||||
params%ntol,params%ndepth,mycall,hiscall,hisgrid)
|
||||
call timer('decqra66',1)
|
||||
go to 800
|
||||
endif
|
||||
|
@ -28,7 +28,7 @@ module qra66_decode
|
||||
|
||||
contains
|
||||
|
||||
subroutine decode(this,callback,iwave,nutc,nfa,nfb,nfqso,ndepth,lapdx, &
|
||||
subroutine decode(this,callback,iwave,nutc,nfqso,ntol,ndepth, &
|
||||
mycall,hiscall,hisgrid)
|
||||
|
||||
use timer_module, only: timer
|
||||
@ -41,12 +41,9 @@ contains
|
||||
character(len=6) :: hisgrid
|
||||
character*37 decoded
|
||||
integer*2 iwave(NFFT1) !Raw data
|
||||
integer ipk(1)
|
||||
integer dat4(12)
|
||||
logical lapdx,ltext
|
||||
complex c00(0:NFFT1-1) !Spectrum, then analytic signal
|
||||
complex c0(0:NFFT1-1) !Snalytic signal
|
||||
real s(900)
|
||||
complex c0(0:NFFT1-1) !Analytic signal, 6000 S/s
|
||||
real s3(-64:127,63)
|
||||
real a(5)
|
||||
data nc1z/-1/,nc2z/-1/,ng2z/-1/,maxaptypez/-1/
|
||||
@ -67,12 +64,11 @@ contains
|
||||
b90=20.0 !8 to 25 is OK; not very critical
|
||||
nFadingModel=1
|
||||
|
||||
! These probably need work:
|
||||
! AP control could be done differently, but this works well:
|
||||
maxaptype=0
|
||||
if(ndepth.eq.2) maxaptype=3
|
||||
if(ndepth.eq.3) maxaptype=5
|
||||
|
||||
! Prime the decoder for possible AP decoding
|
||||
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
|
||||
maxaptype.ne.maxaptypez) then
|
||||
do naptype=0,maxaptype
|
||||
@ -87,60 +83,42 @@ contains
|
||||
endif
|
||||
naptype=maxaptype
|
||||
|
||||
! Compute the full-length spectrum
|
||||
! Downsample to give complex data at 6000 S/s
|
||||
fac=2.0/NFFT1
|
||||
c0=fac*iwave
|
||||
call four2a(c0,NFFT1,1,-1,1) !Forward c2c FFT
|
||||
|
||||
nadd=101
|
||||
nh=nadd/2
|
||||
df2=nh*df1
|
||||
iz=3000.0/df2
|
||||
do i=1,iz !Compute smoothed spectrum
|
||||
s(i)=0.
|
||||
j0=nh*i
|
||||
do j=j0-nh,j0+nh
|
||||
s(i)=s(i) + real(c0(j))**2 + aimag(c0(j))**2
|
||||
enddo
|
||||
enddo
|
||||
call smo121(s,iz)
|
||||
ia=1450/df2
|
||||
ib=1550/df2
|
||||
s(:ia)=0.
|
||||
s(ib:)=0.
|
||||
ipk=maxloc(s)
|
||||
f0=df2*ipk(1) - 0.5*baud !Candidate sync frequency
|
||||
|
||||
c0(NFFT2/2+1:NFFT2)=0. !Zero the top half
|
||||
c0(0)=0.5*c0(0)
|
||||
call four2a(c0,nfft2,1,1,1) !Inverse c2c FFT
|
||||
|
||||
ntol=100
|
||||
call timer('sync66 ',0)
|
||||
call sync66a(iwave,15*12000,nsps,nfqso,ntol,xdt,f0,snr1)
|
||||
jpk=(xdt+0.5)*6000 - 384 !### Empirical ###
|
||||
call timer('sync66 ',1)
|
||||
jpk=(xdt+0.5)*6000 - 384 !### Empirical ###
|
||||
if(jpk.lt.0) jpk=0
|
||||
c00=c0
|
||||
a=0.
|
||||
a(1)=-(f0 + 2.0*baud) !For sync66a
|
||||
call twkfreq(c00,c0,15*6000,6000.0,a)
|
||||
a(1)=-(f0 + 2.0*baud) !Data tones start 2 bins higher
|
||||
call twkfreq(c0,c0,15*6000,6000.0,a)
|
||||
xdt=jpk/6000.0 - 0.5
|
||||
call spec66(c0(jpk:jpk+85*NSPS/2-1),s3)
|
||||
|
||||
do j=1,63
|
||||
do j=1,63 !Normalize to symbol baseline
|
||||
call pctile(s3(:,j),192,40,base)
|
||||
s3(:,j)=s3(:,j)/base
|
||||
enddo
|
||||
|
||||
! Apply AGC
|
||||
s3max=20.0
|
||||
do j=1,63
|
||||
do j=1,63 !Apply AGC to suppress pings
|
||||
xx=maxval(s3(-64:127,j))
|
||||
if(xx.gt.s3max) s3(-64:127,j)=s3(-64:127,j)*s3max/xx
|
||||
enddo
|
||||
|
||||
|
||||
!Call Nico's QRA64 decoder
|
||||
call timer('qra64_de',0)
|
||||
call qra64_dec(s3,nc1,nc2,ng2,naptype,0,nSubmode,b90, &
|
||||
nFadingModel,dat4,snr2,irc)
|
||||
snr2=snr2 + 6.0
|
||||
call timer('qra64_de',1)
|
||||
snr2=snr2 + 5.563 !10*log(6912/1920)
|
||||
if(irc.gt.0) call badmsg(irc,dat4,nc1,nc2,ng2)
|
||||
|
||||
decoded=' '
|
||||
|
@ -508,26 +508,26 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
||||
or m_mode=="QRA64" or m_mode=="QRA66" or m_mode=="FT8" or m_mode=="FT4"
|
||||
or m_mode.startsWith("FST4")) {
|
||||
|
||||
if(m_mode=="QRA64" or (m_mode=="JT65" and m_bVHF)) {
|
||||
if(m_mode=="QRA64" or m_mode=="QRA66" or (m_mode=="JT65" and m_bVHF)) {
|
||||
painter0.setPen(penGreen);
|
||||
x1=XfromFreq(m_rxFreq-m_tol);
|
||||
x2=XfromFreq(m_rxFreq+m_tol);
|
||||
painter0.drawLine(x1,28,x2,28);
|
||||
painter0.drawLine(x1,26,x2,26);
|
||||
x1=XfromFreq(m_rxFreq);
|
||||
painter0.drawLine(x1,24,x1,30);
|
||||
painter0.drawLine(x1,20,x1,26);
|
||||
|
||||
if(m_mode=="JT65") {
|
||||
painter0.setPen(penOrange);
|
||||
x3=XfromFreq(m_rxFreq+20.0*bw/65.0); //RO
|
||||
painter0.drawLine(x3,24,x3,30);
|
||||
painter0.drawLine(x3,20,x3,26);
|
||||
x4=XfromFreq(m_rxFreq+30.0*bw/65.0); //RRR
|
||||
painter0.drawLine(x4,24,x4,30);
|
||||
painter0.drawLine(x4,20,x4,26);
|
||||
x5=XfromFreq(m_rxFreq+40.0*bw/65.0); //73
|
||||
painter0.drawLine(x5,24,x5,30);
|
||||
painter0.drawLine(x5,20,x5,26);
|
||||
}
|
||||
painter0.setPen(penGreen);
|
||||
x6=XfromFreq(m_rxFreq+bw); //Highest tone
|
||||
painter0.drawLine(x6,24,x6,30);
|
||||
painter0.drawLine(x6,20,x6,26);
|
||||
|
||||
} else {
|
||||
// Draw the green "goal post"
|
||||
|
Loading…
Reference in New Issue
Block a user