Added some decoder logging and js8 tone generation tweaks to ensure the right costas is getting generated for the right submode

This commit is contained in:
Jordan Sherer
2020-01-04 15:55:20 -05:00
parent ecf77ba04e
commit 3875de4950
13 changed files with 39 additions and 127 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
subroutine genjs8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
subroutine genjs8(msg,icos,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
! Encode an JS8 message, producing array itone().
@@ -11,20 +11,20 @@ subroutine genjs8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
parameter (ND=58) !Data symbols
parameter (NS=21) !Sync symbols (3 @ Costas 7x7)
parameter (NN=NS+ND) !Total channel symbols (79)
parameter (NCOSTAS=1)
character*68 alphabet
character*22 msg,msgsent
character*6 mygrid
character*87 cbits
logical bcontest,checksumok
integer icos
integer*4 i4Msg6BitWords(12) !72-bit message as 6-bit words
integer*1 msgbits(KK),codeword(3*ND)
integer*1, target:: i1Msg8BitBytes(11)
integer itone(NN)
integer icos7a(0:6), icos7b(0:6), icos7c(0:6)
if(NCOSTAS.eq.1) then
if(icos.eq.1) then !icos is used elsewhere as NCOSTAS parameter
icos7a = (/4,2,5,6,1,3,0/) !Beginning Costas 7x7 tone pattern
icos7b = (/4,2,5,6,1,3,0/) !Middle Costas 7x7 tone pattern
icos7c = (/4,2,5,6,1,3,0/) !End Costas 7x7 tone pattern
+7 -1
View File
@@ -55,6 +55,11 @@ subroutine js8dec(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
icos7c = (/2,5,0,6,4,1,3/) !End Costas 7x7 tone pattern
endif
if(NWRITELOG.eq.1) then
write(*,*) '<DecodeDebug> js8dec costas', icos7a, icos7b, icos7c
flush(6)
endif
if(first) then
mcq=2*mcq-1
mde=2*mde-1
@@ -452,7 +457,8 @@ subroutine js8dec(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
decoded=decoded0
message(1:12)=origmsg(1:12)
call genjs8(message,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
icos=NCOSTAS
call genjs8(message,icos,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
if(lsubtract) then
if(NWRITELOG.eq.1) then
write(*,*) '<DecodeDebug> subtract', f1, xdt2, itone
+8 -1
View File
@@ -19,6 +19,7 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
equivalence (x,cx)
integer icos7a(0:6), icos7b(0:6), icos7c(0:6)
if(NCOSTAS.eq.1) then
icos7a = (/4,2,5,6,1,3,0/) !Beginning Costas 7x7 tone pattern
icos7b = (/4,2,5,6,1,3,0/) !Middle Costas 7x7 tone pattern
@@ -29,6 +30,12 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
icos7c = (/2,5,0,6,4,1,3/) !End Costas 7x7 tone pattern
endif
if(NWRITELOG.eq.1) then
write(*,*) '<DecodeDebug> syncjs8 costas', icos7a, icos7b, icos7c
flush(6)
endif
! Compute symbol spectra, stepping by NSTEP steps.
savg=0.
tstep=NSTEP/12000.0
@@ -134,7 +141,7 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
n=ia + indx(iz+1-i) - 1
if(red(n).lt.syncmin.or.isnan(red(n))) exit
if(NWRITELOG.eq.1) then
write(*,*) '<DecodeDebug>', 'red candidate', red(n), n*df, (jpeak(n)-1)*tstep
write(*,*) '<DecodeDebug> red candidate', red(n), n*df, (jpeak(n)-1)*tstep
flush(6)
endif
k=k+1
+6
View File
@@ -16,6 +16,7 @@ subroutine syncjs8d(cd0,i0,ctwk,itwk,sync)
p(z1)=(real(z1)**2 + aimag(z1)**2) !Statement function for power
integer icos7a(0:6), icos7b(0:6), icos7c(0:6)
if(NCOSTAS.eq.1) then
icos7a = (/4,2,5,6,1,3,0/) !Beginning Costas 7x7 tone pattern
icos7b = (/4,2,5,6,1,3,0/) !Middle Costas 7x7 tone pattern
@@ -26,6 +27,11 @@ subroutine syncjs8d(cd0,i0,ctwk,itwk,sync)
icos7c = (/2,5,0,6,4,1,3/) !End Costas 7x7 tone pattern
endif
if(NWRITELOG.eq.1) then
write(*,*) '<DecodeDebug> syncjs8d costas', icos7a, icos7b, icos7c
flush(6)
endif
! Set some constants and compute the csync array.
if( first ) then
twopi=8.0*atan(1.0)