Work in progress, with lots of diagnostics. Do not use on the air!

This commit is contained in:
Joe Taylor 2020-12-27 15:27:26 -05:00
parent 48297e068b
commit 30ab29d9e3
4 changed files with 24 additions and 14 deletions

View File

@ -5,6 +5,7 @@ module q65
integer iutc(MAXAVE)
integer iseq(MAXAVE)
integer listutc(10)
integer apmask(13),apsymbols(13)
real f0save(MAXAVE)
real xdtsave(MAXAVE)
real snr1save(MAXAVE)

View File

@ -157,13 +157,17 @@ subroutine q65_avg(nutc,ntrperiod,mode_q65,LL,nfqso,ntol,lclearave, &
endif
enddo
APmask=0
APsymbols=0
read(41) LNZ,s3avg
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)
print*,'G',ibw,irc,sum(s3avg)
if(irc.ge.0) then
id2=iaptype+2
print*,'G',id2
exit
endif
enddo ! ibw (b90 loop)

View File

@ -42,6 +42,8 @@ contains
use timer_module, only: timer
use packjt77
use, intrinsic :: iso_c_binding
use q65
parameter (NMAX=300*12000) !Max TRperiod is 300 s
class(q65_decoder), intent(inout) :: this
procedure(q65_decode_callback) :: callback
@ -55,7 +57,6 @@ contains
integer dat4(13) !Decoded message as 12 6-bit integers
integer apsym0(58),aph10(10)
integer apmask1(78),apsymbols1(78)
integer apmask(13),apsymbols(13)
integer dgen(13)
integer codewords(63,206)
logical lclearave,lapcqonly,unpk77_success

View File

@ -17,7 +17,7 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode_q65,nsubmode,nFadingModel, &
integer cw4(63)
integer dat4(13) !Decoded message (as 13 six-bit integers)
integer nap(0:11) !AP return codes
data nap/0,2,3,2,3,4,2,3,6,4,6,6/,nsave/0/
data nap/0,2,3,2,3,4,2,3,6,4,6,6/
data cw4/0, 0, 0, 0, 8, 4,60,35,17,48,33,25,34,43,43,43,35,15,46,30, &
54,24,26,26,57,57,42, 3,23,11,49,49,16, 2, 6, 6,55,21,39,51, &
51,51,42,42,50,25,31,35,57,30, 1,54,54,10,10,22,44,58,57,40, &
@ -82,6 +82,9 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode_q65,nsubmode,nFadingModel, &
call timer('q65_dec ',0)
call q65_dec(s3,s3prob,APmask,APsymbols,esnodb,dat4,irc)
call timer('q65_dec ',1)
print*,'H',ibw,irc,iaptype,sum(s3(1:LL*NN))
! rewind 41
! write(41) LL*NN,s3(1:LL*NN)
if(irc.ge.0) id2=iaptype+2
!### Temporary ###
@ -107,17 +110,18 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode_q65,nsubmode,nFadingModel, &
enddo ! ibw (b90 loop)
enddo ! idt (DT loop)
enddo ! idf (f0 loop)
if(iaptype.eq.0) then
a=0.
a(1)=-f0
call twkfreq(c00,c0,npts2,6000.0,a)
jpk=3000 !### Are these definitions OK?
if(nsps.ge.3600) jpk=6000 !### TR >= 60 s
call spec64(c0,nsps,mode,mode_q65,jpk,s3,LL,NN)
call pctile(s3,LL*NN,40,base)
s3=s3/base
where(s3(1:LL*NN)>s3lim) s3(1:LL*NN)=s3lim
endif
! if(iaptype.eq.0) then
! a=0.
! a(1)=-f0
! call twkfreq(c00,c0,npts2,6000.0,a)
! jpk=3000 !### Are these definitions OK?
! if(nsps.ge.3600) jpk=6000 !### TR >= 60 s
! call spec64(c0,nsps,mode,mode_q65,jpk,s3,LL,NN)
! call pctile(s3,LL*NN,40,base)
! s3=s3/base
! where(s3(1:LL*NN)>s3lim) s3(1:LL*NN)=s3lim
! endif
100 if(irc.ge.0) then
snr2=esnodb - db(2500.0/baud)