diff --git a/libm65/CMakeLists.txt b/libm65/CMakeLists.txt index 1a9422eed..5376ca61d 100644 --- a/libm65/CMakeLists.txt +++ b/libm65/CMakeLists.txt @@ -133,6 +133,7 @@ set (FSRCS toxyz.f90 trimlist.f90 twkfreq.f90 + twkfreq_xy.f90 f77_wisdom.f ) diff --git a/libm65/decode1a.f90 b/libm65/decode1a.f90 index 91cd8dec5..3adcaec7b 100644 --- a/libm65/decode1a.f90 +++ b/libm65/decode1a.f90 @@ -82,9 +82,9 @@ subroutine decode1a(dd,newdat,f0,nflip,mode65,nfast,nfsample,xpol, & ! Now we are back to using the 1378.125 Hz sample rate, enough to ! accommodate the full JT65C bandwidth. - call timer('twkfreq ',0) - call twkfreq(cx,cy,n5,1378.125,a) - call timer('twkfreq ',1) + call timer('twkfreq_',0) + call twkfreq_xy(cx,cy,n5,a) + call timer('twkfreq_',1) ! Compute spectrum at best polarization for each half symbol. ! Adding or subtracting a small number (e.g., 5) to j may make it decode.\ diff --git a/libm65/ftninit.f90 b/libm65/ftninit.f90 index 056f4a465..8a7d28d12 100644 --- a/libm65/ftninit.f90 +++ b/libm65/ftninit.f90 @@ -12,7 +12,7 @@ ! 19 livecq.txt ! 20 ! 21 map65_rx.log -! 22 kvasd.dat +! 22 ! 23 CALL3.TXT ! 24 ! 25 @@ -34,14 +34,7 @@ subroutine ftninit(appd) open(13,file=appd//'/map65.log',status='unknown') open(19,file=appd//'/livecq.txt',status='unknown') open(21,file=appd//'/map65_rx.log',status='unknown',access='append',err=950) - open(22,file=appd//'/kvasd.dat',access='direct',recl=1024,status='unknown') - read(22,rec=2,err=12) junk - go to 18 -12 junk=0 - write(22,rec=1) junk - write(22,rec=2) junk - -18 open(26,file=appd//'/tmp26.txt',status='unknown') + open(26,file=appd//'/tmp26.txt',status='unknown') ! Import FFTW wisdom, if available: open(28,file=appd//'/fftwf_wisdom.dat',status='old',err=30) diff --git a/libm65/kvasd.exe b/libm65/kvasd.exe deleted file mode 100644 index 61bbb5d4c..000000000 Binary files a/libm65/kvasd.exe and /dev/null differ diff --git a/libm65/map65a.f90 b/libm65/map65a.f90 index 82fe0239f..5cb178563 100644 --- a/libm65/map65a.f90 +++ b/libm65/map65a.f90 @@ -353,7 +353,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & 1013 format('',2i4) flush(6) endif - if(nqd.eq.2) exit !### TESTING: do only QRA64 +! if(nqd.eq.2) exit !### TESTING: do only QRA64 if(nagain.eq.1 .and. nqd.eq.1) go to 999 enddo diff --git a/libm65/twkfreq_xy.f90 b/libm65/twkfreq_xy.f90 new file mode 100644 index 000000000..a5cc3769a --- /dev/null +++ b/libm65/twkfreq_xy.f90 @@ -0,0 +1,29 @@ +subroutine twkfreq_xy(c4aa,c4bb,n5,a) + + complex c4aa(n5) + complex c4bb(n5) + real a(5) + complex w,wstep + data twopi/6.283185307/ + +! Apply AFC corrections to the c4aa and c4bb data + w=1.0 + wstep=1.0 + x0=0.5*(n5+1) + s=2.0/n5 + do i=1,n5 + x=s*(i-x0) + if(mod(i,1000).eq.1) then + p2=1.5*x*x - 0.5 +! p3=2.5*(x**3) - 1.5*x +! p4=4.375*(x**4) - 3.75*(x**2) + 0.375 + dphi=(a(1) + x*a(2) + p2*a(3)) * (twopi/1378.125) + wstep=cmplx(cos(dphi),sin(dphi)) + endif + w=w*wstep + c4aa(i)=w*c4aa(i) + c4bb(i)=w*c4bb(i) + enddo + + return +end subroutine twkfreq_xy diff --git a/mainwindow.cpp b/mainwindow.cpp index dbbd80f1d..16ba488c8 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"