mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-29 04:42:28 -04:00
Correct several flaws in message averaging. Still may want to handle MAXAVE better?
This commit is contained in:
parent
2194f3096a
commit
5b0975bf45
@ -157,8 +157,9 @@ contains
|
|||||||
if(idec.gt.0) go to 100 !Successful decode, we're done
|
if(idec.gt.0) go to 100 !Successful decode, we're done
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! No single-transmission decode.
|
! There was no single-transmission decode.
|
||||||
if(iand(ndepth,16).eq.16) then
|
if(iand(ndepth,16).eq.16) then
|
||||||
|
! Try for an average decode.
|
||||||
call q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, &
|
call q65_avg2(ntrperiod,ntol,baud,nsubmode,nQSOprogress,lapcqonly, &
|
||||||
ibwa,ibwb,codewords,ncw,xdt,f0,snr1,snr2,dat4,idec)
|
ibwa,ibwb,codewords,ncw,xdt,f0,snr1,snr2,dat4,idec)
|
||||||
endif
|
endif
|
||||||
|
@ -11,7 +11,6 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
character*1 cused(MAXAVE)
|
character*1 cused(MAXAVE)
|
||||||
character*6 cutc
|
character*6 cutc
|
||||||
real s3(-64:LL-65,63) !Symbol spectra
|
real s3(-64:LL-65,63) !Symbol spectra
|
||||||
integer iused(MAXAVE)
|
|
||||||
integer dat4(13)
|
integer dat4(13)
|
||||||
integer codewords(63,206)
|
integer codewords(63,206)
|
||||||
integer apmask1(78),apsymbols1(78)
|
integer apmask1(78),apsymbols1(78)
|
||||||
@ -19,13 +18,8 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
data first/.true./
|
data first/.true./
|
||||||
save
|
save
|
||||||
|
|
||||||
if(first .or. LL.ne.LL0 .or.lclearave) then
|
if(LL.ne.LL0) then
|
||||||
iutc=-1
|
|
||||||
iseq=-1
|
|
||||||
f0save=0.0
|
|
||||||
nsave=0
|
|
||||||
LL0=LL
|
LL0=LL
|
||||||
first=.false.
|
|
||||||
if(allocated(s3save)) deallocate(s3save)
|
if(allocated(s3save)) deallocate(s3save)
|
||||||
if(allocated(s3avg)) deallocate(s3avg)
|
if(allocated(s3avg)) deallocate(s3avg)
|
||||||
allocate(s3save(-64:LL-65,63,MAXAVE))
|
allocate(s3save(-64:LL-65,63,MAXAVE))
|
||||||
@ -33,6 +27,15 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
s3save=0.
|
s3save=0.
|
||||||
s3avg=0.
|
s3avg=0.
|
||||||
endif
|
endif
|
||||||
|
if(first .or. lclearave) then
|
||||||
|
iutc=-1
|
||||||
|
iseq=-1
|
||||||
|
f0save=0.0
|
||||||
|
nsave=0
|
||||||
|
first=.false.
|
||||||
|
s3save=0.
|
||||||
|
s3avg=0.
|
||||||
|
endif
|
||||||
|
|
||||||
if(ntrperiod.eq.15) then
|
if(ntrperiod.eq.15) then
|
||||||
dtdiff=0.038
|
dtdiff=0.038
|
||||||
@ -52,7 +55,7 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
|
|
||||||
! Save data for message averaging
|
! Save data for message averaging
|
||||||
nsave=nsave+1
|
nsave=nsave+1
|
||||||
nsave=mod(nsave-1,MAXAVE)+1
|
if(nsave.gt.MAXAVE) nsave=nsave-MAXAVE
|
||||||
n=nutc
|
n=nutc
|
||||||
if(ntrperiod.ge.60) n=100*n
|
if(ntrperiod.ge.60) n=100*n
|
||||||
write(cutc,'(i6.6)') n
|
write(cutc,'(i6.6)') n
|
||||||
@ -62,7 +65,7 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
iutc(nsave)=nutc !UTC, hhmm or hhmmss
|
iutc(nsave)=nutc !UTC, hhmm or hhmmss
|
||||||
snr1save(nsave)=snr1 !SNR from sync
|
snr1save(nsave)=snr1 !SNR from sync
|
||||||
xdtsave(nsave)=xdt !DT
|
xdtsave(nsave)=xdt !DT
|
||||||
f0save(nsave)=f0 !f0
|
f0save(nsave)=f0 !f0
|
||||||
s3save(:,:,nsave)=s3(:,:) !Symbol spectra
|
s3save(:,:,nsave)=s3(:,:) !Symbol spectra
|
||||||
|
|
||||||
10 return
|
10 return
|
||||||
@ -93,9 +96,7 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
xdtsum=xdtsum + xdtsave(i)
|
xdtsum=xdtsum + xdtsave(i)
|
||||||
fsum=fsum + f0save(i)
|
fsum=fsum + f0save(i)
|
||||||
navg=navg+1
|
navg=navg+1
|
||||||
iused(navg)=i
|
|
||||||
enddo
|
enddo
|
||||||
if(navg.lt.MAXAVE) iused(navg+1)=0
|
|
||||||
|
|
||||||
! Find averages of snr1, xdt, and f0 used in this decoding attempt.
|
! Find averages of snr1, xdt, and f0 used in this decoding attempt.
|
||||||
snr1ave=0.
|
snr1ave=0.
|
||||||
@ -108,7 +109,8 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! Write parameters for display to User in the Message Averaging (F7) window.
|
! Write parameters for display to User in the Message Averaging (F7) window.
|
||||||
do i=1,nsave
|
do i=1,MAXAVE
|
||||||
|
if(iutc(i).lt.0) cycle
|
||||||
if(ntrperiod.le.30) write(14,1000) cused(i),iutc(i),snr1save(i), &
|
if(ntrperiod.le.30) write(14,1000) cused(i),iutc(i),snr1save(i), &
|
||||||
xdtsave(i),f0save(i)
|
xdtsave(i),f0save(i)
|
||||||
1000 format(a1,i7.6,f6.1,f6.2,f7.1)
|
1000 format(a1,i7.6,f6.1,f6.2,f7.1)
|
||||||
@ -183,7 +185,7 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3)
|
|||||||
100 return
|
100 return
|
||||||
|
|
||||||
entry q65_clravg
|
entry q65_clravg
|
||||||
|
|
||||||
iutc=-1
|
iutc=-1
|
||||||
iseq=-1
|
iseq=-1
|
||||||
snr1save=0.
|
snr1save=0.
|
||||||
|
@ -60,7 +60,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, &
|
|||||||
allocate(ccf(-ia2:ia2,-53:214))
|
allocate(ccf(-ia2:ia2,-53:214))
|
||||||
allocate(ccf1(-ia2:ia2))
|
allocate(ccf1(-ia2:ia2))
|
||||||
allocate(ccf2(-ia2:ia2))
|
allocate(ccf2(-ia2:ia2))
|
||||||
|
s3=0.
|
||||||
if(sync(1).eq.99.0) then !Generate the sync vector
|
if(sync(1).eq.99.0) then !Generate the sync vector
|
||||||
sync=-22.0/63.0 !Sync tone OFF
|
sync=-22.0/63.0 !Sync tone OFF
|
||||||
do k=1,22
|
do k=1,22
|
||||||
|
Loading…
x
Reference in New Issue
Block a user