More work in ptogress ...

This commit is contained in:
Joe Taylor 2020-12-27 14:14:10 -05:00
parent d246a23948
commit 48297e068b
2 changed files with 17 additions and 39 deletions

View File

@ -143,7 +143,7 @@ subroutine q65_avg(nutc,ntrperiod,mode_q65,LL,nfqso,ntol,lclearave, &
call q65_dec_fullaplist(s3avg,s3prob,codewords,ncw,esnodb,dat4,plog,irc)
if(irc.ge.0 .and. plog.ge.PLOG_MIN) then
snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment
id1=1
id1=1 !###
write(c77,3050) dat4(1:12),dat4(13)/2
3050 format(12b6.6,b5.5)
call unpack77(c77,0,avemsg,unpk77_success) !Unpack to get msgsent
@ -157,5 +157,16 @@ subroutine q65_avg(nutc,ntrperiod,mode_q65,LL,nfqso,ntol,lclearave, &
endif
enddo
do ibw=ibwa,ibwb
b90=1.72**ibw
call q65_intrinsics_ff(s3avg,nsubmode,b90/baud,nFadingModel,s3prob)
call q65_dec(s3avg,s3prob,APmask,APsymbols,esnodb,dat4,irc)
if(irc.ge.0) then
id2=iaptype+2
print*,'G',id2
exit
endif
enddo ! ibw (b90 loop)
900 return
end subroutine q65_avg

View File

@ -24,19 +24,18 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
integer dat4(13)
integer ijpk(2)
logical unpk77_success
logical lavg,lclearave
logical lclearave
character*77 c77,decoded*37
real, allocatable :: s1(:,:) !Symbol spectra, 1/8-symbol steps
real, allocatable :: s3(:,:) !Data-symbol energies s3(LL,63)
real, allocatable,save :: s3avg(:,:) !Averaged data-symbol energies
real, allocatable :: ccf(:,:) !CCF(freq,lag)
real, allocatable :: ccf1(:) !CCF(freq) at best lag
real s3prob(0:63,63) !Symbol-value probabilities
real sync(85) !sync vector
complex, allocatable :: c0(:) !Complex spectrum of symbol
data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
data sync(1)/99.0/,LL0/-1/
save sync,navg,LL0
data sync(1)/99.0/
save sync
snr1=0.
id1=0
@ -56,20 +55,9 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
allocate(s1(iz,jz))
allocate(s3(-64:LL-65,63))
if(LL.ne.LL0) then
if(allocated(s3avg)) deallocate(s3avg)
allocate(s3avg(-64:LL-65,63))
navg=0
LL0=LL
endif
allocate(c0(0:nfft-1))
allocate(ccf(-ia2:ia2,-53:214))
allocate(ccf1(-ia2:ia2))
if(lclearave) then
s3avg=0.
navg=0
endif
if(sync(1).eq.99.0) then !Generate the sync vector
sync=-22.0/63.0 !Sync tone OFF
@ -189,7 +177,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
baud=12000.0/nsps
ibwa=1.8*log(baud*mode_q65) + 2
ibwb=min(10,ibwa+4)
lavg=.false.
10 do ibw=ibwa,ibwb
b90=1.72**ibw
@ -198,10 +185,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
!###
write(*,3001) 'A',ibw,irc,xdt,f0,plog,sum(s3)
3001 format(a1,2i3,f7.2,3f8.1)
if(irc.gt.0) then
s3avg=s3
go to 100
endif
if(irc.gt.0) go to 100
!###
if(irc.ge.0 .and. plog.ge.PLOG_MIN) then
snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment
@ -224,7 +208,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
go to 200
endif
enddo
if(lavg) go to 900
!######################################################################
! Establish xdt, f0, and snr1 using sync symbols (and perhaps some AP symbols)
@ -279,7 +262,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
n=n+1
if(j.ge.1 .and. j.le.jz) s3(-64:LL-65,n)=s1(i1:i2,j)
enddo
! s3=s3avg
write(*,3002) 'B',xdt,f0,sum(s3)
3002 format(a1,f7.2,2f8.1)
call q65_avg(nutc,ntrperiod,mode_q65,LL,nfqso,ntol,lclearave, &
@ -287,7 +269,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
endif
200 smax=maxval(ccf1)
if(lavg) id1=10+navg !If this is an average decode
! if(lavg) id1=10+navg !If this is an average decode
i1=-9999
i2=-9999
do i=-ia,ia
@ -301,21 +283,6 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps,nfqso,ntol,
enddo
close(17)
width=df*(i2-i1)
! if(id1.ge.1) then
! navg=0
! s3avg=0.
! if(lavg) go to 900
! elseif(iand(ndepth,16).eq.16) then
! s3avg=s3avg+s3
! navg=navg+1
! write(71,3071) nutc,navg,xdt,f0,snr1
!3071 format(2i5,3f10.2)
! if(navg.ge.2) then
! s3=s3avg/navg
! lavg=.true.
! go to 10
! endif
! endif
900 return
end subroutine q65_sync