From cb503e89f1e185f9ec9e35bb227a15d9988e5c7f Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Mon, 1 Jan 2018 17:03:55 +0000 Subject: [PATCH] Make nutc print correctly when processing simulated JT65 files. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8386 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- CMakeLists.txt | 35 ++++++++++++++++++++++++++++++----- lib/fsk4hf/wspr5d.f90 | 9 ++++++--- lib/fsk4hf/wspr5d_exp.f90 | 6 ++++-- lib/fsk4hf/wspr_fsk8d.f90 | 6 +++--- lib/fsk4hf/wsprlfsim.f90 | 5 +++-- mainwindow.cpp | 2 +- 6 files changed, 47 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd74059f2..b94b023cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -459,6 +459,8 @@ set (wsjt_FSRCS lib/fsk4hf/genmskhf.f90 lib/fsk4hf/genwsprlf.f90 lib/fsk4hf/genwspr_fsk8.f90 + lib/fsk4hf/genwsprmsk.f90 + lib/fsk4hf/genwspr5.f90 lib/fsk4hf/getfc1.f90 lib/fsk4hf/getfc2.f90 lib/fsk4hf/getfc1w.f90 @@ -584,6 +586,14 @@ set (wsjt_FSRCS lib/fsk4hf/wspr_fsk8_wav.f90 lib/fsk4hf/wspr_fsk8_downsample.f90 lib/fsk4hf/wsprlfsim.f90 + lib/fsk4hf/wsprmskd.f90 + lib/fsk4hf/wspr5_wav.f90 + lib/fsk4hf/wspr5_downsample.f90 + lib/fsk4hf/wspr5sim.f90 + lib/fsk4hf/wspr5d.f90 + lib/fsk4hf/wspr5d_exp.f90 + lib/fsk4hf/wsprmsksim.f90 + lib/fsk4hf/wsprmsk_wav.f90 lib/wspr_downsample.f90 lib/zplot9.f90 ) @@ -640,7 +650,7 @@ set (wsprsim_CSRCS ) set (wsprd_CSRCS - lib/wsprd/wsprd.c + lib/wsprd/wsprd_exp.c lib/wsprd/wsprsim_utils.c lib/wsprd/wsprd_utils.c lib/wsprd/fano.c @@ -1187,9 +1197,9 @@ add_executable (wsprcode lib/wsprcode/wsprcode.f90 lib/wsprcode/nhash.c wsjtx.rc) target_link_libraries (wsprcode wsjt_fort wsjt_cxx) -add_executable (wsprd ${wsprd_CSRCS}) -target_include_directories (wsprd PRIVATE ${FFTW3_INCLUDE_DIRS}) -target_link_libraries (wsprd ${FFTW3_LIBRARIES}) +add_executable (wsprd_exp ${wsprd_CSRCS}) +target_include_directories (wsprd_exp PRIVATE ${FFTW3_INCLUDE_DIRS}) +target_link_libraries (wsprd_exp ${FFTW3_LIBRARIES}) add_executable (wsprsim ${wsprsim_CSRCS}) @@ -1223,9 +1233,24 @@ target_link_libraries (fsk4hf wsjt_fort wsjt_cxx) add_executable (ft8sim lib/ft8/ft8sim.f90 wsjtx.rc) target_link_libraries (ft8sim wsjt_fort wsjt_cxx) +add_executable (wspr5sim lib/fsk4hf/wspr5sim.f90 wsjtx.rc) +target_link_libraries (wspr5sim wsjt_fort wsjt_cxx) + +add_executable (wspr5d lib/fsk4hf/wspr5d.f90 wsjtx.rc) +target_link_libraries (wspr5d wsjt_fort wsjt_cxx) + +add_executable (wspr5d_exp lib/fsk4hf/wspr5d_exp.f90 wsjtx.rc) +target_link_libraries (wspr5d_exp wsjt_fort wsjt_cxx) + add_executable (wsprlfsim lib/fsk4hf/wsprlfsim.f90 wsjtx.rc) target_link_libraries (wsprlfsim wsjt_fort wsjt_cxx) +add_executable (wsprmsksim lib/fsk4hf/wsprmsksim.f90 wsjtx.rc) +target_link_libraries (wsprmsksim wsjt_fort wsjt_cxx) + +add_executable (wsprmskd lib/fsk4hf/wsprmskd.f90 wsjtx.rc) +target_link_libraries (wsprmskd wsjt_fort wsjt_cxx) + add_executable (wspr_fsk8d lib/fsk4hf/wspr_fsk8d.f90 wsjtx.rc) target_link_libraries (wspr_fsk8d wsjt_fort wsjt_cxx) @@ -1416,7 +1441,7 @@ install (TARGETS udp_daemon message_aggregator ) install (TARGETS jt9 jt65code qra64code qra64sim jt9code jt4code - msk144code wsprd wspr_fsk8d fmtave fcal fmeasure + msk144code wsprd_exp wspr_fsk8d fmtave fcal fmeasure RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) diff --git a/lib/fsk4hf/wspr5d.f90 b/lib/fsk4hf/wspr5d.f90 index 7b50fff2f..c47a06fa2 100644 --- a/lib/fsk4hf/wspr5d.f90 +++ b/lib/fsk4hf/wspr5d.f90 @@ -63,7 +63,8 @@ program wspr5d open(13,file=trim(data_dir)//'/ALL_WSPR.TXT',status='unknown', & position='append') - maxn=8 !Default value +! maxn=8 !Default value + maxn=20 twopi=8.0*atan(1.0) fs=NSPS*12000.0/NSPS0 !Sample rate dt=1.0/fs !Sample interval (s) @@ -203,12 +204,14 @@ jpk=fs*xdt call wqdecode(idat,message,itype) nsnr=nint(xsnr) ! freq=fMHz + 1.d-6*(fc1+fc2) - freq=fMHz + 1.d-6*(fc1+fpks(itry)) +! freq=fMHz + 1.d-6*(fc1+fpks(itry)) + freq=fc1+fpks(itry) nfdot=0 write(13,1110) datetime,0,nsnr,xdt,freq,message,nfdot 1110 format(a11,2i4,f6.2,f12.7,2x,a22,i3) write(*,1112) datetime(8:11),nsnr,xdt,freq,nfdot,message,itry -1112 format(a4,i4,f5.1,f11.6,i3,2x,a22,i4) +!1112 format(a4,i4,f5.1,f11.6,i3,2x,a22,i4) +1112 format(a4,i4,f8.3,f8.3,i3,2x,a22,i4) endif enddo ! ifile loop write(*,1120) diff --git a/lib/fsk4hf/wspr5d_exp.f90 b/lib/fsk4hf/wspr5d_exp.f90 index 10193fa7a..4cb1f6246 100644 --- a/lib/fsk4hf/wspr5d_exp.f90 +++ b/lib/fsk4hf/wspr5d_exp.f90 @@ -208,12 +208,14 @@ program wspr5d idat(7)=ishft(idat(7),6) call wqdecode(idat,message,itype) nsnr=nint(xsnr) - freq=fMHz + 1.d-6*(fc1+fc2) +! freq=fMHz + 1.d-6*(fc1+fc2) + freq=fc1+fc2 nfdot=0 write(13,1210) datetime,0,nsnr,xdt,freq,message,nfdot 1210 format(a11,2i4,f6.2,f12.7,2x,a22,i3) write(*,1212) datetime(8:11),nsnr,xdt,freq,nfdot,message,'*',idf,nseq,is,niterations -1212 format(a4,i4,f5.1,f11.6,i3,2x,a22,a1,i3,i3,i3,i4) +!1212 format(a4,i4,f5.1,f11.6,i3,2x,a22,a1,i3,i3,i3,i4) +1212 format(a4,i4,f8.3,f8.3,i3,2x,a22,a1,i3,i3,i3,i4) goto 888 endif enddo !iseq diff --git a/lib/fsk4hf/wspr_fsk8d.f90 b/lib/fsk4hf/wspr_fsk8d.f90 index c107f8481..313b3eda1 100644 --- a/lib/fsk4hf/wspr_fsk8d.f90 +++ b/lib/fsk4hf/wspr_fsk8d.f90 @@ -147,8 +147,8 @@ program wspr_fsk8d do j=1,ND k=j+7 ps=s(0:7,k) - ! ps=sqrt(ps) !### ??? ### - ps=log(ps) + ps=sqrt(ps) !### ??? ### +! ps=log(ps) r1=max(ps(1),ps(3),ps(5),ps(7))-max(ps(0),ps(2),ps(4),ps(6)) r2=max(ps(2),ps(3),ps(6),ps(7))-max(ps(0),ps(1),ps(4),ps(5)) r4=max(ps(4),ps(5),ps(6),ps(7))-max(ps(0),ps(1),ps(2),ps(3)) @@ -161,7 +161,7 @@ program wspr_fsk8d rx2av=sum(rxdata*rxdata)/ND rxsig=sqrt(rx2av-rxav*rxav) rxdata=rxdata/rxsig - s0=0.84 + s0=1.1 llr=2.0*rxdata/(s0*s0) apmask=0 max_iterations=40 diff --git a/lib/fsk4hf/wsprlfsim.f90 b/lib/fsk4hf/wsprlfsim.f90 index 542d4816e..6ee0710bb 100644 --- a/lib/fsk4hf/wsprlfsim.f90 +++ b/lib/fsk4hf/wsprlfsim.f90 @@ -124,7 +124,7 @@ program wsprlfsim call system_clock(count2,clkfreq) do iter=1,iters !Loop over requested iterations c=c0 - +write(*,*) 'iter ',iter call system_clock(count0,clkfreq) if(delay.ne.0.0 .or. fspread.ne.0.0) then call watterson(c,NZ,fs,delay,fspread) @@ -151,9 +151,10 @@ program wsprlfsim call system_clock(count1,clkfreq) t(5)=t(5)+float(count1-count0)/float(clkfreq) nc(5)=nc(5)+1 - +write(*,*) 'fc1 ',fc1 call system_clock(count0,clkfreq) call getfc2w(c,csync,fs,fc1,fc2,fc3) !Refined freq +write(*,*) 'fc1,fc2,fc3 ',fc1,fc2,fc3 call system_clock(count1,clkfreq) t(6)=t(6)+float(count1-count0)/float(clkfreq) nc(6)=nc(6)+1 diff --git a/mainwindow.cpp b/mainwindow.cpp index 87be52711..378d3d787 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2381,7 +2381,7 @@ void MainWindow::read_wav_file (QString const& fname) dec_data.params.newdat = 0; } - if(basename.mid(0,10)=="000000_000") { + if(basename.mid(0,10)=="000000_000" && m_mode == "FT8") { dec_data.params.nutc=15*basename.mid(10,3).toInt(); }