diff --git a/jt9.txt b/jt9.txt index b5a436886..8d29b1151 100644 --- a/jt9.txt +++ b/jt9.txt @@ -44,7 +44,7 @@ Receiving --------- 1. Apply noise blanking with the timf2 method 2. Filter to 1000 Hz bandwidth and downsample (1/8) to 1500 Hz, saving - complex data to array c0(1350000). (FIR? FFT2?) + complex data to array c0(1350000). (use FIR? NFFT2/NFFT2A?) 3. Compute symbol-length spectra at half-symbol steps. Use for waterfall display s(22000) and save in ss(184,22000) and savg(22000), for detecting sync vectors. diff --git a/libm65/Makefile.MinGW b/libm65/Makefile.MinGW index 8cc614a8b..0358891ca 100644 --- a/libm65/Makefile.MinGW +++ b/libm65/Makefile.MinGW @@ -47,7 +47,7 @@ OBJS3 = jt9sim.o gran.o jt9sim.exe: $(OBJS3) libm65.a $(FC) -o jt9sim.exe $(OBJS3) libm65.a -OBJS2 = jt9.o symspec.o timf2x.o timer.o +OBJS2 = jt9.o symspec.o timf2x.o timer.o sync9.o jt9.exe: $(OBJS2) libm65.a $(FC) -o jt9.exe $(OBJS2) libm65.a ../libfftw3f_win.a diff --git a/libm65/jt9.f90 b/libm65/jt9.f90 index b5d04a47a..6bdafb299 100644 --- a/libm65/jt9.f90 +++ b/libm65/jt9.f90 @@ -82,7 +82,7 @@ program jt9 if(nhsym.ge.1 .and. nhsym.ne.nhsym0) then ! Emit signal readyForFFT call timer('symspec ',0) - call symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb,s, & + call symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb,s,df3, & ihsym,nzap,slimit,lstrong) call timer('symspec ',1) nhsym0=nhsym @@ -94,6 +94,7 @@ program jt9 nutc=nutc0 nstandalone=1 + call sync9(ss,df3) ! call decode0(dd,ss,savg,nstandalone,nfsample) enddo diff --git a/libm65/symspec.f90 b/libm65/symspec.f90 index 91b251930..66e7a9f51 100644 --- a/libm65/symspec.f90 +++ b/libm65/symspec.f90 @@ -1,5 +1,5 @@ -subroutine symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb,s,ihsym, & - nzap,slimit,lstrong) +subroutine symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb,s,df3, & + ihsym,nzap,slimit,lstrong) ! Input: ! k pointer to the most recent new data @@ -141,9 +141,16 @@ subroutine symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb,s,ihsym, & if(ihsym.eq.168) then do i=1,iz - write(71,3001) i*df3,savg(i),10.0*log10(savg(i)) -3001 format(f12.6,e12.3,f12.3) + write(71,3001) i,i*df3,savg(i),10.0*log10(savg(i)) +3001 format(i8,3f12.3) enddo + + i0=673 + do j=1,ihsym + write(72,3002) j,(ss(j,i),i=i0,i0+8) +3002 format(i3,9f8.3) + enddo + endif 999 return diff --git a/libm65/sync9.f90 b/libm65/sync9.f90 new file mode 100644 index 000000000..4a7fdb40a --- /dev/null +++ b/libm65/sync9.f90 @@ -0,0 +1,55 @@ +subroutine sync9(ss,df3) + + parameter (NSMAX=22000) !Max length of saved spectra + real ss(184,NSMAX) + + integer ii(16) + integer isync(85) !Sync vector + data isync/ & + 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0, & + 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0, & + 0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0, & + 0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0, & + 1,0,0,0,1/ + + ii=0 + k=0 + do i=1,85 + if(isync(i).eq.1) then + k=k+1 + ii(k)=2*i-1 + endif + enddo + + nz=1000.0/df3 + + smax=0. + lagmax=10 + do n=1,nz + do lag=-lagmax,lagmax + sum=0. + do i=1,16 + k=ii(i) + lag + if(k.ge.1) sum=sum + ss(k,n) + enddo + if(sum.gt.smax) then + smax=sum + npk=n + endif + enddo + enddo + + print*,'npk:',npk + n=npk + do lag=-lagmax,lagmax + sum=0. + do i=1,16 + k=ii(i) + lag + if(k.ge.1) sum=sum + ss(k,n) + enddo + write(*,3000) lag,sum +3000 format(i3,f12.3) + enddo + + return +end subroutine sync9