Revert "Fixed array alignment in decoder"

This reverts commit cfeed7fc87.
This commit is contained in:
Jordan Sherer 2019-11-29 20:46:18 -05:00
parent d3fa09f20b
commit eaff44aa38
3 changed files with 21 additions and 17 deletions

View File

@ -31,7 +31,6 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,trydecode logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,trydecode
integer*2 id0(NTMAX*12000) integer*2 id0(NTMAX*12000)
integer*2 id2(NTMAX*12000) integer*2 id2(NTMAX*12000)
integer pos,sz
type(params_block) :: params type(params_block) :: params
character(len=20) :: datetime character(len=20) :: datetime
character(len=12) :: mycall, hiscall character(len=12) :: mycall, hiscall

View File

@ -1,10 +1,13 @@
subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
!include 'js8_params.f90'
complex cx(0:NH1) complex cx(0:NH1)
real s(NH1,NHSYM) real s(NH1,NHSYM)
real savg(NH1) real savg(NH1)
real sbase(NH1) real sbase(NH1)
real x(NFFT1) real x(NFFT1)
real sync1d(-JZ:JZ) real sync2d(NH1,-JZ:JZ)
real red(NH1) real red(NH1)
real candidate0(3,200) real candidate0(3,200)
real candidate(3,200) real candidate(3,200)
@ -26,7 +29,7 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
icos7c = (/2,5,0,6,4,1,3/) !End Costas 7x7 tone pattern icos7c = (/2,5,0,6,4,1,3/) !End Costas 7x7 tone pattern
endif endif
! Compute symbol spectra, stepping by NSTEP steps. ! Compute symbol spectra, stepping by NSTEP steps.
savg=0. savg=0.
tstep=NSTEP/12000.0 tstep=NSTEP/12000.0
df=12000.0/NFFT1 df=12000.0/NFFT1
@ -42,7 +45,6 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
enddo enddo
savg=savg + s(1:NH1,j) !Average spectrum savg=savg + s(1:NH1,j) !Average spectrum
enddo enddo
call baselinejs8(savg,nfa,nfb,sbase) call baselinejs8(savg,nfa,nfb,sbase)
ia=max(1,nint(nfa/df)) ! min freq ia=max(1,nint(nfa/df)) ! min freq
@ -104,13 +106,17 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
t0=(t0-t)/6.0 t0=(t0-t)/6.0
sync_bc=t/t0 sync_bc=t/t0
sync1d(j)=max(sync_abc, sync_ab, sync_bc) !sync2d(i,j)=max(max(max(sync_abc, sync_ab), sync_ac), sync_bc)
sync2d(i,j)=max(sync_abc, sync_ab, sync_bc)
enddo enddo
enddo
ii=maxloc(sync1d(-JZ:JZ)) - 1 - JZ red=0.
do i=ia,ib
ii=maxloc(sync2d(i,-JZ:JZ)) - 1 - JZ
j0=ii(1) j0=ii(1)
jpeak(i)=j0 jpeak(i)=j0
red(i)=sync1d(j0) red(i)=sync2d(i,j0)
enddo enddo
iz=ib-ia+1 iz=ib-ia+1
@ -139,7 +145,8 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
enddo enddo
ncand=k ncand=k
! Save only the best of near-dupe freqs.
! Save only the best of near-dupe freqs.
do i=1,ncand do i=1,ncand
if(i.ge.2) then if(i.ge.2) then
do j=1,i-1 do j=1,i-1
@ -152,7 +159,7 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
endif endif
enddo enddo
! Put nfqso at top of list ! Put nfqso at top of list
do i=1,ncand do i=1,ncand
if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i) if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i)
enddo enddo
@ -160,13 +167,15 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
fac=20.0/maxval(s) fac=20.0/maxval(s)
s=fac*s s=fac*s
! Sort by sync ! Sort by sync
! call indexx(candidate0(3,1:ncand),ncand,indx) ! call indexx(candidate0(3,1:ncand),ncand,indx)
! Sort by frequency ! Sort by frequency
call indexx(candidate0(1,1:ncand),ncand,indx) call indexx(candidate0(1,1:ncand),ncand,indx)
k=1 k=1
! do i=ncand,1,-1
do i=1,ncand do i=1,ncand
j=indx(i) j=indx(i)
! if( candidate0(3,j) .ge. syncmin .and. candidate0(2,j).ge.-1.5 ) then
if( candidate0(3,j) .ge. syncmin ) then if( candidate0(3,j) .ge. syncmin ) then
candidate(1,k)=abs(candidate0(1,j)) candidate(1,k)=abs(candidate0(1,j))
candidate(2,k)=candidate0(2,j) candidate(2,k)=candidate0(2,j)
@ -175,6 +184,5 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
endif endif
enddo enddo
ncand=k-1 ncand=k-1
return return
end subroutine syncjs8 end subroutine syncjs8

View File

@ -43,13 +43,11 @@ contains
character*6 mygrid6,hisgrid6 character*6 mygrid6,hisgrid6
integer*2 iwave(NMAX) integer*2 iwave(NMAX)
integer apsym(KK) integer apsym(KK)
integer ncand
character datetime*13,message*22,msg37*37 character datetime*13,message*22,msg37*37
character*22 allmessages(100) character*22 allmessages(100)
integer allsnrs(100) integer allsnrs(100)
save s,dd save s,dd
ncand=0
bcontest=iand(nexp_decode,128).ne.0 bcontest=iand(nexp_decode,128).ne.0
this%callback => callback this%callback => callback
write(datetime,1001) nutc !### TEMPORARY ### write(datetime,1001) nutc !### TEMPORARY ###
@ -117,7 +115,6 @@ contains
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)
message=msg37(1:22) !### message=msg37(1:22) !###
nsnr=nint(xsnr) nsnr=nint(xsnr)
xdt=xdt-ASTART xdt=xdt-ASTART