Working automatic time sync based on syncStats
This commit is contained in:
parent
b21f937481
commit
6bf4b41311
@ -97,7 +97,7 @@ extern struct dec_data {
|
|||||||
int nfSplit; // JT65 | JT9 split frequency
|
int nfSplit; // JT65 | JT9 split frequency
|
||||||
int nfb; // High decode limit (Hz) (filter max)
|
int nfb; // High decode limit (Hz) (filter max)
|
||||||
int ntol; // +/- decoding range around fQSO (Hz)
|
int ntol; // +/- decoding range around fQSO (Hz)
|
||||||
bool synconly; // only compute sync candidates
|
bool syncStats; // only compute sync candidates
|
||||||
int kin; // number of frames written to d2
|
int kin; // number of frames written to d2
|
||||||
int kposA; // starting position of decode for submode A
|
int kposA; // starting position of decode for submode A
|
||||||
int kposB; // starting position of decode for submode B
|
int kposB; // starting position of decode for submode B
|
||||||
|
@ -94,7 +94,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||||
mycall,mygrid,hiscall,hisgrid)
|
mycall,mygrid,hiscall,hisgrid,logical(params%syncStats))
|
||||||
|
|
||||||
write(*,*) '<DecodeDebug> mode I decode finished'
|
write(*,*) '<DecodeDebug> mode I decode finished'
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||||
mycall,mygrid,hiscall,hisgrid)
|
mycall,mygrid,hiscall,hisgrid,logical(params%syncStats))
|
||||||
|
|
||||||
write(*,*) '<DecodeDebug> mode E decode finished'
|
write(*,*) '<DecodeDebug> mode E decode finished'
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||||
mycall,mygrid,hiscall,hisgrid)
|
mycall,mygrid,hiscall,hisgrid,logical(params%syncStats))
|
||||||
|
|
||||||
write(*,*) '<DecodeDebug> mode C decode finished'
|
write(*,*) '<DecodeDebug> mode C decode finished'
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||||
mycall,mygrid,hiscall,hisgrid)
|
mycall,mygrid,hiscall,hisgrid,logical(params%syncStats))
|
||||||
|
|
||||||
write(*,*) '<DecodeDebug> mode B decode finished'
|
write(*,*) '<DecodeDebug> mode B decode finished'
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||||
mycall,mygrid,hiscall,hisgrid,logical(params%synconly))
|
mycall,mygrid,hiscall,hisgrid,logical(params%syncStats))
|
||||||
|
|
||||||
write(*,*) '<DecodeDebug> mode A decode finished'
|
write(*,*) '<DecodeDebug> mode A decode finished'
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
write(*,*) '<DecodeDebug> finished'
|
write(*,*) '<DecodeDebug> finished'
|
||||||
call flush(6)
|
call flush(6)
|
||||||
|
|
||||||
ndecoded = my_js8a%decoded + my_js8b%decoded + my_js8c%decoded + my_js8e%decoded
|
ndecoded = my_js8a%decoded + my_js8b%decoded + my_js8c%decoded + my_js8e%decoded + my_js8i%decoded
|
||||||
!call sleep_msec(3000)
|
!call sleep_msec(3000)
|
||||||
write(*,1010) ndecoded
|
write(*,1010) ndecoded
|
||||||
1010 format('<DecodeFinished>',i4)
|
1010 format('<DecodeFinished>',i4)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
! When modifying this file, please ensure the modifications are made in ft8_params.f90 too.
|
! When modifying this file, please ensure the modifications are made in ft8_params.f90 too.
|
||||||
|
|
||||||
|
parameter (NSUBMODE=0)
|
||||||
parameter (NCOSTAS=1) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
parameter (NCOSTAS=1) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
||||||
|
|
||||||
parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=36) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
parameter (NSPS=1920, NTXDUR=15, NDOWNSPS=32, NDD=100, JZ=36) ! 50 Hz 6.250 baud 16 wpm -25.0dB (1.0Eb/N0) 12.64s
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
parameter (NSUBMODE=1)
|
||||||
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
||||||
|
|
||||||
parameter (NSPS=1200, NTXDUR=10, NDOWNSPS=20, NDD=100, JZ=144) ! 80 Hz 10 baud 24 wpm -23.0dB (1.0Eb/N0) 7.90s
|
parameter (NSPS=1200, NTXDUR=10, NDOWNSPS=20, NDD=100, JZ=144) ! 80 Hz 10 baud 24 wpm -23.0dB (1.0Eb/N0) 7.90s
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
parameter (NSUBMODE=2)
|
||||||
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
||||||
|
|
||||||
parameter (NSPS=600, NTXDUR=6, NDOWNSPS=12, NDD=120, JZ=172) ! 160 Hz 20 baud 40 wpm -20.0dB (1.0Eb/N0) 3.95s
|
parameter (NSPS=600, NTXDUR=6, NDOWNSPS=12, NDD=120, JZ=172) ! 160 Hz 20 baud 40 wpm -20.0dB (1.0Eb/N0) 3.95s
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine js8dec(dd0,icos,newdat,synconly,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
subroutine js8dec(dd0,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
||||||
napwid,lsubtract,nagain,iaptype,mycall12,mygrid6,hiscall12,bcontest, &
|
napwid,lsubtract,nagain,iaptype,mycall12,mygrid6,hiscall12,bcontest, &
|
||||||
sync0,f1,xdt,xbase,apsym,nharderrors,dmin,nbadcrc,ipass,iera,msg37,xsnr)
|
sync0,f1,xdt,xbase,apsym,nharderrors,dmin,nbadcrc,ipass,iera,msg37,xsnr)
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ subroutine js8dec(dd0,icos,newdat,synconly,nQSOProgress,nfqso,nftx,ndepth,lapon,
|
|||||||
character*12 mycall12,hiscall12
|
character*12 mycall12,hiscall12
|
||||||
character*6 mycall6,mygrid6,hiscall6,c1,c2
|
character*6 mycall6,mygrid6,hiscall6,c1,c2
|
||||||
character*87 cbits
|
character*87 cbits
|
||||||
logical bcontest,synconly
|
logical bcontest,syncStats
|
||||||
real a(5)
|
real a(5)
|
||||||
real s1(0:7,ND),s2(0:7,NN),s1sort(8*ND)
|
real s1(0:7,ND),s2(0:7,NN),s1sort(8*ND)
|
||||||
real ps(0:7),psl(0:7)
|
real ps(0:7),psl(0:7)
|
||||||
@ -224,8 +224,8 @@ subroutine js8dec(dd0,icos,newdat,synconly,nQSOProgress,nfqso,nftx,ndepth,lapon,
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(synconly) then
|
if(syncStats) then
|
||||||
write(*,*) '<DecodeDebug> candidate X ', 'f1', f1, 'sync', nsync, 'xdt', xdt
|
write(*,*) '<DecodeDebug> candidate ', NSUBMODE, 'f1', f1, 'sync', nsync, 'xdt', xdt
|
||||||
flush(6)
|
flush(6)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -422,9 +422,8 @@ subroutine js8dec(dd0,icos,newdat,synconly,nQSOProgress,nfqso,nftx,ndepth,lapon,
|
|||||||
i3bit=4*decoded(73) + 2*decoded(74) + decoded(75)
|
i3bit=4*decoded(73) + 2*decoded(74) + decoded(75)
|
||||||
|
|
||||||
if(nbadcrc.eq.0) then
|
if(nbadcrc.eq.0) then
|
||||||
|
if(syncStats) then
|
||||||
if(synconly) then
|
write(*,*) '<DecodeDebug> decode ', NSUBMODE, 'f1', f1, 'sync', (sync*10), 'xdt', xdt2
|
||||||
write(*,*) '<DecodeDebug> decode X ', 'f1', f1, 'sync', (sync*10), 'xdt', xdt2
|
|
||||||
flush(6)
|
flush(6)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
parameter (NSUBMODE=4)
|
||||||
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
||||||
|
|
||||||
parameter (NSPS=3840, NTXDUR=28, NDOWNSPS=32, NDD=90, JZ=32) ! 25 Hz 3.125 baud 8 wpm -28.0dB (1.0Eb/N0) 25.28s
|
parameter (NSPS=3840, NTXDUR=28, NDOWNSPS=32, NDD=90, JZ=32) ! 25 Hz 3.125 baud 8 wpm -28.0dB (1.0Eb/N0) 25.28s
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
parameter (NSUBMODE=8)
|
||||||
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
parameter (NCOSTAS=2) !Which JS8 Costas Arrays to use (1=original, 2=three symmetrical costas)
|
||||||
|
|
||||||
parameter (NSPS=384, NTXDUR=4, NDOWNSPS=12, NDD=125, JZ=250) ! 250 Hz 31.25 baud 60 wpm -18.0dB (1.0Eb/N0) 2.52s
|
parameter (NSPS=384, NTXDUR=4, NDOWNSPS=12, NDD=125, JZ=250) ! 250 Hz 31.25 baud 60 wpm -18.0dB (1.0Eb/N0) 2.52s
|
||||||
|
@ -25,7 +25,7 @@ contains
|
|||||||
|
|
||||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
||||||
mycall12,mygrid6,hiscall12,hisgrid6,synconly)
|
mycall12,mygrid6,hiscall12,hisgrid6,syncStats)
|
||||||
! use wavhdr
|
! use wavhdr
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
! type(hdr) h
|
! type(hdr) h
|
||||||
@ -38,7 +38,7 @@ contains
|
|||||||
real candidate(3,NMAXCAND)
|
real candidate(3,NMAXCAND)
|
||||||
real dd(NMAX)
|
real dd(NMAX)
|
||||||
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
||||||
logical newdat,lsubtract,ldupe,bcontest,synconly
|
logical newdat,lsubtract,ldupe,bcontest,syncStats
|
||||||
character*12 mycall12, hiscall12
|
character*12 mycall12, hiscall12
|
||||||
character*6 mygrid6,hisgrid6
|
character*6 mygrid6,hisgrid6
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
@ -93,32 +93,10 @@ contains
|
|||||||
lsubtract=.false.
|
lsubtract=.false.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(synconly) then
|
|
||||||
if(NWRITELOG.eq.0) then
|
|
||||||
write(*,*) '<DecodeDebug> synconly'
|
|
||||||
flush(6)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
call timer('syncjs8 ',0)
|
call timer('syncjs8 ',0)
|
||||||
call syncjs8(dd,icos,ifa,ifb,syncmin,nfqso,s,candidate,ncand,sbase)
|
call syncjs8(dd,icos,ifa,ifb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||||
call timer('syncjs8 ',1)
|
call timer('syncjs8 ',1)
|
||||||
|
|
||||||
!if(NWRITELOG.eq.0) then
|
|
||||||
! write(*,*) '<DecodeDebug>', ncand, "candidates"
|
|
||||||
! flush(6)
|
|
||||||
|
|
||||||
! do icand=1,ncand
|
|
||||||
! sync=candidate(3,icand)
|
|
||||||
! f1=candidate(1,icand)
|
|
||||||
! xdt=candidate(2,icand)
|
|
||||||
! xbase=10.0**(0.1*(sbase(nint(f1/(12000.0/NFFT1)))-40.0)) ! 3.125Hz
|
|
||||||
|
|
||||||
! write(*,*) '<DecodeDebug> candidate', icand, 'f1', f1, 'sync', sync, 'xdt', xdt, 'xbase', xbase
|
|
||||||
! flush(6)
|
|
||||||
! enddo
|
|
||||||
!endif
|
|
||||||
|
|
||||||
do icand=1,ncand
|
do icand=1,ncand
|
||||||
sync=candidate(3,icand)
|
sync=candidate(3,icand)
|
||||||
f1=candidate(1,icand)
|
f1=candidate(1,icand)
|
||||||
@ -131,7 +109,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('js8dec ',0)
|
call timer('js8dec ',0)
|
||||||
call js8dec(dd,icos,newdat,synconly,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
call js8dec(dd,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
||||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||||
nbadcrc,iappass,iera,msg37,xsnr)
|
nbadcrc,iappass,iera,msg37,xsnr)
|
||||||
|
@ -25,7 +25,7 @@ contains
|
|||||||
|
|
||||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
||||||
mycall12,mygrid6,hiscall12,hisgrid6)
|
mycall12,mygrid6,hiscall12,hisgrid6,syncStats)
|
||||||
! use wavhdr
|
! use wavhdr
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
! type(hdr) h
|
! type(hdr) h
|
||||||
@ -38,7 +38,7 @@ contains
|
|||||||
real candidate(3,NMAXCAND)
|
real candidate(3,NMAXCAND)
|
||||||
real dd(NMAX)
|
real dd(NMAX)
|
||||||
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
||||||
logical newdat,lsubtract,ldupe,bcontest
|
logical newdat,lsubtract,ldupe,bcontest,syncStats
|
||||||
character*12 mycall12, hiscall12
|
character*12 mycall12, hiscall12
|
||||||
character*6 mygrid6,hisgrid6
|
character*6 mygrid6,hisgrid6
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
@ -114,7 +114,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('js8dec ',0)
|
call timer('js8dec ',0)
|
||||||
call js8dec(dd,icos,newdat,.false.,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
call js8dec(dd,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
||||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||||
nbadcrc,iappass,iera,msg37,xsnr)
|
nbadcrc,iappass,iera,msg37,xsnr)
|
||||||
|
@ -25,7 +25,7 @@ contains
|
|||||||
|
|
||||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
||||||
mycall12,mygrid6,hiscall12,hisgrid6)
|
mycall12,mygrid6,hiscall12,hisgrid6,syncStats)
|
||||||
! use wavhdr
|
! use wavhdr
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
! type(hdr) h
|
! type(hdr) h
|
||||||
@ -38,7 +38,7 @@ contains
|
|||||||
real candidate(3,NMAXCAND)
|
real candidate(3,NMAXCAND)
|
||||||
real dd(NMAX)
|
real dd(NMAX)
|
||||||
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
||||||
logical newdat,lsubtract,ldupe,bcontest
|
logical newdat,lsubtract,ldupe,bcontest,syncStats
|
||||||
character*12 mycall12, hiscall12
|
character*12 mycall12, hiscall12
|
||||||
character*6 mygrid6,hisgrid6
|
character*6 mygrid6,hisgrid6
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
@ -114,7 +114,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('js8dec ',0)
|
call timer('js8dec ',0)
|
||||||
call js8dec(dd,icos,newdat,.false.,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
call js8dec(dd,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
||||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||||
nbadcrc,iappass,iera,msg37,xsnr)
|
nbadcrc,iappass,iera,msg37,xsnr)
|
||||||
|
@ -25,7 +25,7 @@ contains
|
|||||||
|
|
||||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
||||||
mycall12,mygrid6,hiscall12,hisgrid6)
|
mycall12,mygrid6,hiscall12,hisgrid6,syncStats)
|
||||||
! use wavhdr
|
! use wavhdr
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
! type(hdr) h
|
! type(hdr) h
|
||||||
@ -38,7 +38,7 @@ contains
|
|||||||
real candidate(3,NMAXCAND)
|
real candidate(3,NMAXCAND)
|
||||||
real dd(NMAX)
|
real dd(NMAX)
|
||||||
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
||||||
logical newdat,lsubtract,ldupe,bcontest
|
logical newdat,lsubtract,ldupe,bcontest,syncStats
|
||||||
character*12 mycall12, hiscall12
|
character*12 mycall12, hiscall12
|
||||||
character*6 mygrid6,hisgrid6
|
character*6 mygrid6,hisgrid6
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
@ -114,7 +114,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('js8dec ',0)
|
call timer('js8dec ',0)
|
||||||
call js8dec(dd,icos,newdat,.false.,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
call js8dec(dd,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
||||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||||
nbadcrc,iappass,iera,msg37,xsnr)
|
nbadcrc,iappass,iera,msg37,xsnr)
|
||||||
|
@ -25,7 +25,7 @@ contains
|
|||||||
|
|
||||||
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, &
|
||||||
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
nutc,nfa,nfb,nexp_decode,ndepth,nagain,lft8apon,lapcqonly,napwid, &
|
||||||
mycall12,mygrid6,hiscall12,hisgrid6)
|
mycall12,mygrid6,hiscall12,hisgrid6,syncStats)
|
||||||
! use wavhdr
|
! use wavhdr
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
! type(hdr) h
|
! type(hdr) h
|
||||||
@ -38,7 +38,7 @@ contains
|
|||||||
real candidate(3,NMAXCAND)
|
real candidate(3,NMAXCAND)
|
||||||
real dd(NMAX)
|
real dd(NMAX)
|
||||||
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
logical, intent(in) :: lft8apon,lapcqonly,nagain
|
||||||
logical newdat,lsubtract,ldupe,bcontest
|
logical newdat,lsubtract,ldupe,bcontest,syncStats
|
||||||
character*12 mycall12, hiscall12
|
character*12 mycall12, hiscall12
|
||||||
character*6 mygrid6,hisgrid6
|
character*6 mygrid6,hisgrid6
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
@ -114,7 +114,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('js8dec ',0)
|
call timer('js8dec ',0)
|
||||||
call js8dec(dd,icos,newdat,.false.,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
call js8dec(dd,icos,newdat,syncStats,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
|
||||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||||
nbadcrc,iappass,iera,msg37,xsnr)
|
nbadcrc,iappass,iera,msg37,xsnr)
|
||||||
|
@ -21,7 +21,7 @@ program jt9
|
|||||||
!### ndepth was defined as 60001. Why???
|
!### ndepth was defined as 60001. Why???
|
||||||
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, &
|
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, &
|
||||||
fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=1,nexp_decode=0
|
fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=1,nexp_decode=0
|
||||||
logical :: read_files = .true., tx9 = .false., display_help = .false., synconly = .false.
|
logical :: read_files = .true., tx9 = .false., display_help = .false., syncStats = .false.
|
||||||
type (option) :: long_options(22) = [ &
|
type (option) :: long_options(22) = [ &
|
||||||
option ('help', .false., 'h', 'Display this help message', ''), &
|
option ('help', .false., 'h', 'Display this help message', ''), &
|
||||||
option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), &
|
option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), &
|
||||||
@ -50,7 +50,7 @@ program jt9
|
|||||||
!option ('jt65', .false., '6', 'JT65 mode', ''), &
|
!option ('jt65', .false., '6', 'JT65 mode', ''), &
|
||||||
!option ('jt9', .false., '9', 'JT9 mode', ''), &
|
!option ('jt9', .false., '9', 'JT9 mode', ''), &
|
||||||
option ('js8', .false., '8', 'JS8 mode', ''), &
|
option ('js8', .false., '8', 'JS8 mode', ''), &
|
||||||
option ('synconly', .false., 'y', 'Sync only', ''), &
|
option ('syncStats', .false., 'y', 'Sync only', ''), &
|
||||||
!option ('jt4', .false., '4', 'JT4 mode', ''), &
|
!option ('jt4', .false., '4', 'JT4 mode', ''), &
|
||||||
!option ('qra64', .false., 'q', 'QRA64 mode', ''), &
|
!option ('qra64', .false., 'q', 'QRA64 mode', ''), &
|
||||||
option ('sub-mode', .true., 'b', 'Sub mode, default SUBMODE=A', 'A'), &
|
option ('sub-mode', .true., 'b', 'Sub mode, default SUBMODE=A', 'A'), &
|
||||||
@ -120,7 +120,7 @@ program jt9
|
|||||||
case ('8')
|
case ('8')
|
||||||
mode = 8
|
mode = 8
|
||||||
case ('y')
|
case ('y')
|
||||||
synconly = .true.
|
syncStats = .true.
|
||||||
case ('T')
|
case ('T')
|
||||||
tx9 = .true.
|
tx9 = .true.
|
||||||
case ('w')
|
case ('w')
|
||||||
@ -257,7 +257,7 @@ program jt9
|
|||||||
shared_data%params%ljt65apon=.true.
|
shared_data%params%ljt65apon=.true.
|
||||||
shared_data%params%napwid=75
|
shared_data%params%napwid=75
|
||||||
shared_data%params%dttol=3.
|
shared_data%params%dttol=3.
|
||||||
shared_data%params%synconly=synconly
|
shared_data%params%syncStats=syncStats
|
||||||
|
|
||||||
! shared_data%params%minsync=0 !### TEST ONLY
|
! shared_data%params%minsync=0 !### TEST ONLY
|
||||||
! shared_data%params%nfqso=1500 !### TEST ONLY
|
! shared_data%params%nfqso=1500 !### TEST ONLY
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
integer(c_int) :: nfsplit
|
integer(c_int) :: nfsplit
|
||||||
integer(c_int) :: nfb
|
integer(c_int) :: nfb
|
||||||
integer(c_int) :: ntol
|
integer(c_int) :: ntol
|
||||||
logical(c_bool) :: synconly
|
logical(c_bool) :: syncStats
|
||||||
integer(c_int) :: kin
|
integer(c_int) :: kin
|
||||||
integer(c_int) :: kposA
|
integer(c_int) :: kposA
|
||||||
integer(c_int) :: kposB
|
integer(c_int) :: kposB
|
||||||
|
@ -4267,39 +4267,21 @@ bool MainWindow::decodeEnqueueReady(qint32 k, qint32 k0){
|
|||||||
// on an interval, issue a decode
|
// on an interval, issue a decode
|
||||||
|
|
||||||
static qint32 lastDecodeStartA = -1;
|
static qint32 lastDecodeStartA = -1;
|
||||||
|
static qint32 currentDecodeStartA = -1;
|
||||||
|
static qint32 nextDecodeStartA = -1;
|
||||||
|
|
||||||
qint32 startA = -1;
|
qint32 startA = -1;
|
||||||
qint32 szA = -1;
|
qint32 szA = -1;
|
||||||
qint32 cycleA = -1;
|
qint32 cycleA = -1;
|
||||||
bool couldDecodeA = false;
|
bool couldDecodeA = false;
|
||||||
qint32 oneSecondFrames = computeFramesPerCycleForDecode(Varicode::JS8CallNormal)/computePeriodForSubmode(Varicode::JS8CallNormal);
|
|
||||||
if(lastDecodeStartA == -1 || k < k0 || k - lastDecodeStartA > oneSecondFrames){
|
|
||||||
startA = k-computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
|
||||||
|
|
||||||
if(startA < 0){
|
|
||||||
// TODO: decoder doesn't copy wrap around ranges
|
|
||||||
startA += m_detector->period() * RX_SAMPLE_RATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
szA = computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
|
||||||
lastDecodeStartA = k;
|
|
||||||
couldDecodeA = true;
|
|
||||||
qDebug() << "? NORMAL " << startA << k << k0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static qint32 currentDecodeStartA = -1;
|
|
||||||
static qint32 nextDecodeStartA = -1;
|
|
||||||
qint32 startA = -1;
|
|
||||||
qint32 szA = -1;
|
|
||||||
qint32 cycleA = -1;
|
|
||||||
if(JS8_DEBUG_DECODE) qDebug() << "? NORMAL " << currentDecodeStartA << nextDecodeStartA;
|
if(JS8_DEBUG_DECODE) qDebug() << "? NORMAL " << currentDecodeStartA << nextDecodeStartA;
|
||||||
bool couldDecodeA = isDecodeReady(Varicode::JS8CallNormal, k, k0, ¤tDecodeStartA, &nextDecodeStartA, &startA, &szA, &cycleA);
|
couldDecodeA = isDecodeReady(Varicode::JS8CallNormal, k, k0, ¤tDecodeStartA, &nextDecodeStartA, &startA, &szA, &cycleA);
|
||||||
if(m_diskData){
|
if(m_diskData){
|
||||||
startA = 0;
|
startA = 0;
|
||||||
szA = NTMAX*RX_SAMPLE_RATE-1;
|
szA = NTMAX*RX_SAMPLE_RATE-1;
|
||||||
couldDecodeA = true;
|
couldDecodeA = true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static qint32 currentDecodeStartB = -1;
|
static qint32 currentDecodeStartB = -1;
|
||||||
static qint32 nextDecodeStartB = -1;
|
static qint32 nextDecodeStartB = -1;
|
||||||
@ -4357,11 +4339,28 @@ bool MainWindow::decodeEnqueueReady(qint32 k, qint32 k0){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
couldDecodeB = couldDecodeC = couldDecodeE = false;
|
|
||||||
|
|
||||||
int decodes = 0;
|
int decodes = 0;
|
||||||
|
|
||||||
|
// default to including sync stats
|
||||||
|
dec_data.params.syncStats = true;
|
||||||
|
|
||||||
|
// when no other mode is being decoded, do a sync stats decode for normal mode
|
||||||
|
if(!couldDecodeA && !couldDecodeB && !couldDecodeC && !couldDecodeE){
|
||||||
|
qint32 oneSecondFrames = computeFramesPerCycleForDecode(Varicode::JS8CallNormal)/computePeriodForSubmode(Varicode::JS8CallNormal);
|
||||||
|
if(lastDecodeStartA == -1 || k < k0 || k - lastDecodeStartA > oneSecondFrames){
|
||||||
|
startA = k-computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
||||||
|
|
||||||
|
if(startA < 0){
|
||||||
|
// decoder wraps around ranges
|
||||||
|
startA += m_detector->period() * RX_SAMPLE_RATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
szA = computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
||||||
|
lastDecodeStartA = k;
|
||||||
|
couldDecodeA = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(couldDecodeA){
|
if(couldDecodeA){
|
||||||
DecodeParams d;
|
DecodeParams d;
|
||||||
d.submode = Varicode::JS8CallNormal;
|
d.submode = Varicode::JS8CallNormal;
|
||||||
@ -4461,7 +4460,6 @@ bool MainWindow::decodeProcessQueue(qint32 *pSubmode){
|
|||||||
if(JS8_DEBUG_DECODE) qDebug() << "--> decoder skipping at least 1 decode cycle" << "count" << count << "max" << maxDecodes;
|
if(JS8_DEBUG_DECODE) qDebug() << "--> decoder skipping at least 1 decode cycle" << "count" << count << "max" << maxDecodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
dec_data.params.synconly = true;
|
|
||||||
dec_data.params.nsubmodes = 0;
|
dec_data.params.nsubmodes = 0;
|
||||||
|
|
||||||
while(!m_decoderQueue.isEmpty()){
|
while(!m_decoderQueue.isEmpty()){
|
||||||
@ -4880,6 +4878,10 @@ void MainWindow::processDecodedLine(QByteArray t){
|
|||||||
if(t.indexOf("f1") >= 0){
|
if(t.indexOf("f1") >= 0){
|
||||||
auto segs = QString(t.trimmed()).split(QRegExp("[\\s\\t]+"), QString::SkipEmptyParts);
|
auto segs = QString(t.trimmed()).split(QRegExp("[\\s\\t]+"), QString::SkipEmptyParts);
|
||||||
if(!segs.isEmpty()){
|
if(!segs.isEmpty()){
|
||||||
|
auto m1 = QString(segs.at(2));
|
||||||
|
auto m = int(m1.toInt());
|
||||||
|
auto period = computePeriodForSubmode(m);
|
||||||
|
|
||||||
auto f1 = QString(segs.at(4));
|
auto f1 = QString(segs.at(4));
|
||||||
auto f = int(f1.toFloat());
|
auto f = int(f1.toFloat());
|
||||||
|
|
||||||
@ -4891,40 +4893,43 @@ void MainWindow::processDecodedLine(QByteArray t){
|
|||||||
|
|
||||||
if(abs(xdt) <= 2){
|
if(abs(xdt) <= 2){
|
||||||
if(s < 10){
|
if(s < 10){
|
||||||
m_wideGraph->drawLine(QColor(Qt::darkCyan), f, f + computeBandwidthForSubmode(m_nSubMode));
|
m_wideGraph->drawLine(QColor(Qt::darkCyan), f, f + computeBandwidthForSubmode(m));
|
||||||
} else if (s <= 21){
|
} else if (s <= 21){
|
||||||
m_wideGraph->drawLine(QColor(Qt::white), f, f + computeBandwidthForSubmode(m_nSubMode));
|
m_wideGraph->drawLine(QColor(Qt::white), f, f + computeBandwidthForSubmode(m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(t.contains("decode X")){
|
if(t.contains("decode")){
|
||||||
auto now = QDateTime::currentDateTimeUtc();
|
auto now = QDateTime::currentDateTimeUtc();
|
||||||
|
|
||||||
float n = 0;
|
float n = 0;
|
||||||
float nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
float nPos = period - (now.time().second() % period);
|
||||||
float nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
float nNeg = (now.time().second() % period) - period;
|
||||||
float offset = m_TRperiod - computeFramesNeededForDecode(m_nSubMode)/RX_SAMPLE_RATE + xdt;
|
|
||||||
|
|
||||||
if(qAbs(nNeg) < nPos){
|
if(qAbs(nNeg) < nPos){
|
||||||
n = nNeg + offset;
|
n = nNeg;
|
||||||
} else {
|
} else {
|
||||||
n = nPos - offset;
|
n = nPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
n -= (float)period;
|
||||||
|
n += computeFramesNeededForDecode(m)/RX_SAMPLE_RATE;
|
||||||
|
n -= xdt;
|
||||||
|
|
||||||
int xdtmin = qMin(n*1000, (float)DriftingDateTime::drift());
|
int xdtmin = qMin(n*1000, (float)DriftingDateTime::drift());
|
||||||
int xdtmax = qMax(n*1000, (float)DriftingDateTime::drift());
|
int xdtmax = qMax(n*1000, (float)DriftingDateTime::drift());
|
||||||
|
|
||||||
m_wideGraph->drawLine(QColor(Qt::red), f, f + computeBandwidthForSubmode(m_nSubMode));
|
m_wideGraph->drawLine(QColor(Qt::red), f, f + computeBandwidthForSubmode(m));
|
||||||
|
|
||||||
int oldNewDrift = newDrift;
|
int oldNewDrift = newDrift;
|
||||||
newDrift = (xdtmin + (xdtmax-xdtmin)/2);
|
newDrift = (xdtmin + (xdtmax-xdtmin)/2);
|
||||||
newDrift = qMin(oldNewDrift, newDrift) + (qMax(oldNewDrift, newDrift)-qMin(oldNewDrift, newDrift))/2;
|
newDrift = qMin(oldNewDrift, newDrift) + (qMax(oldNewDrift, newDrift)-qMin(oldNewDrift, newDrift))/2;
|
||||||
hasNewDrift = true;
|
hasNewDrift = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(JS8_DEBUG_DECODE) qDebug() << "--> busy?" << m_decoderBusy << "lock exists?" << ( QFile{m_config.temp_dir ().absoluteFilePath (".lock")}.exists());
|
||||||
if(JS8_DEBUG_DECODE) qDebug() << "--> busy?" << m_decoderBusy << "lock exists?" << ( QFile{m_config.temp_dir ().absoluteFilePath (".lock")}.exists());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4934,11 +4939,11 @@ void MainWindow::processDecodedLine(QByteArray t){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(t.indexOf("<DecodeFinished>") >= 0) {
|
if(t.indexOf("<DecodeFinished>") >= 0) {
|
||||||
|
|
||||||
if(hasNewDrift){
|
if(hasNewDrift){
|
||||||
int oldDrift = DriftingDateTime::drift();
|
static int driftN = 1;
|
||||||
newDrift = qMin(oldDrift, newDrift) + (qMax(oldDrift, newDrift)-qMin(oldDrift, newDrift))/2;
|
newDrift = ((driftN-1)*DriftingDateTime::drift() + newDrift)/driftN;
|
||||||
setDrift(newDrift);
|
setDrift(newDrift);
|
||||||
|
if(driftN < 60) driftN++; // cap it to 60 observations
|
||||||
writeNoticeTextToUI(QDateTime::currentDateTimeUtc(), QString("Drift: %1").arg(newDrift));
|
writeNoticeTextToUI(QDateTime::currentDateTimeUtc(), QString("Drift: %1").arg(newDrift));
|
||||||
hasNewDrift = false;
|
hasNewDrift = false;
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,8 @@ void WideGraph::drawSwide(){
|
|||||||
swideLocal[i] = flagValue;
|
swideLocal[i] = flagValue;
|
||||||
}
|
}
|
||||||
ui->widePlot->draw(swideLocal,true,false);
|
ui->widePlot->draw(swideLocal,true,false);
|
||||||
|
} else if(lastSecondInPeriod != secondInPeriod) {
|
||||||
|
drawLine(Qt::gray, ui->widePlot->startFreq(), 10);
|
||||||
}
|
}
|
||||||
lastSecondInPeriod=secondInPeriod;
|
lastSecondInPeriod=secondInPeriod;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user