Send both idec and navg to the q65 callback routine.

This commit is contained in:
Joe Taylor 2021-01-14 13:23:09 -05:00
parent fca6d482f7
commit 02d410d4f7
2 changed files with 10 additions and 17 deletions

View File

@ -758,7 +758,8 @@ contains
return return
end subroutine fst4_decoded end subroutine fst4_decoded
subroutine q65_decoded (this,nutc,snr1,nsnr,dt,freq,decoded,idec,ntrperiod) subroutine q65_decoded (this,nutc,snr1,nsnr,dt,freq,decoded,idec, &
navg,ntrperiod)
use q65_decode use q65_decode
implicit none implicit none
@ -771,20 +772,14 @@ contains
real, intent(in) :: freq real, intent(in) :: freq
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: idec integer, intent(in) :: idec
integer, intent(in) :: navg
integer, intent(in) :: ntrperiod integer, intent(in) :: ntrperiod
integer iaptype,navg
character*3 cflags character*3 cflags
cflags=' ' cflags=' '
if(idec.ge.0) then if(idec.ge.0) then
iaptype=idec
navg=0
if(idec.ge.100) then
iaptype=idec/100
navg=mod(idec,100)
endif
cflags='q ' cflags='q '
write(cflags(2:2),'(i1)') iaptype write(cflags(2:2),'(i1)') idec
if(navg.ge.2) write(cflags(3:3),'(i1)') navg if(navg.ge.2) write(cflags(3:3),'(i1)') navg
endif endif

View File

@ -8,7 +8,7 @@ module q65_decode
abstract interface abstract interface
subroutine q65_decode_callback (this,nutc,snr1,nsnr,dt,freq, & subroutine q65_decode_callback (this,nutc,snr1,nsnr,dt,freq, &
decoded,nap,ntrperiod) decoded,idec,navg,ntrperiod)
import q65_decoder import q65_decoder
implicit none implicit none
class(q65_decoder), intent(inout) :: this class(q65_decoder), intent(inout) :: this
@ -18,7 +18,8 @@ module q65_decode
real, intent(in) :: dt real, intent(in) :: dt
real, intent(in) :: freq real, intent(in) :: freq
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: idec
integer, intent(in) :: navg
integer, intent(in) :: ntrperiod integer, intent(in) :: ntrperiod
end subroutine q65_decode_callback end subroutine q65_decode_callback
end interface end interface
@ -112,8 +113,6 @@ contains
emedelay,xdt,f0,snr1,width,dat4,snr2,idec) emedelay,xdt,f0,snr1,width,dat4,snr2,idec)
call timer('q65_dec0',1) call timer('q65_dec0',1)
print*,'AAA',idec
if(idec.ge.0) then if(idec.ge.0) then
xdt1=xdt !We have a list-decode result xdt1=xdt !We have a list-decode result
f1=f0 f1=f0
@ -175,7 +174,6 @@ contains
endif endif
100 decoded=' ' 100 decoded=' '
print*,'BBB',idec
if(idec.ge.0) then if(idec.ge.0) then
! ------------------------------------------------------ ! ------------------------------------------------------
@ -195,14 +193,14 @@ contains
1000 format(12b6.6,b5.5) 1000 format(12b6.6,b5.5)
call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent
nsnr=nint(snr2) nsnr=nint(snr2)
call this%callback(nutc,snr1,nsnr,xdt1,f1,decoded,idec,ntrperiod) call this%callback(nutc,snr1,nsnr,xdt1,f1,decoded,idec,navg,ntrperiod)
call q65_clravg call q65_clravg
else else
! Report snr1, even if no decode. ! Report snr1, even if no decode.
nsnr=db(snr1) - 35.0 nsnr=db(snr1) - 35.0
idec=-1 idec=-1
call this%callback(nutc,snr1,nsnr,xdt1,f1,decoded, & call this%callback(nutc,snr1,nsnr,xdt1,f1,decoded, &
idec,ntrperiod) idec,navg,ntrperiod)
endif endif
return return