From 43c38de8846a19aab9fd8e07d4e77353eb3a0a75 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 26 Mar 2019 14:00:32 -0400 Subject: [PATCH 1/6] Minor tweaks for FT4 debugging and possible tuning. --- lib/ft4/ft4_decode.f90 | 8 +++----- lib/ft4/ft4d.f90 | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ft4/ft4_decode.f90 b/lib/ft4/ft4_decode.f90 index 63cc6753e..4e4959b37 100644 --- a/lib/ft4/ft4_decode.f90 +++ b/lib/ft4/ft4_decode.f90 @@ -265,7 +265,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & ip=maxloc(s4(:,k+99)) if(icos4d(k-1).eq.(ip(1)-1)) is4=is4+1 enddo - nsync=is1+is2+is3+is4 !Number of hard sync errors, 0-16 + nsync=is1+is2+is3+is4 !Number of correct hard sync symbols, 0-16 if(smax .lt. 0.7 .or. nsync .lt. 8) cycle do nseq=1,3 !Try coherent sequences of 1, 2, and 4 symbols @@ -460,17 +460,15 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & fname=data_dir(1:l1+1)//'all_ft4.txt' open(24,file=trim(fname),status='unknown',position='append') write(24,1002) cdatetime0,nsnr,tsig,nint(freq),message, & - nharderror,nsync_qual,ipass,niterations,iaptype + nharderror,nsync_qual,ipass,niterations,iaptype,nsync if(hhmmss.eq.' ') write(*,1002) cdatetime0,nsnr, & tsig,nint(freq),message,nharderror,nsync_qual,ipass, & niterations,iaptype -1002 format(a17,i4,f5.1,i5,' Rx ',a37,5i5) +1002 format(a17,i4,f5.1,i5,' Rx ',a37,6i4) close(24) linex(ndecodes)=line if(ibest.ge.ibmax-15) msg0=message !Possible dupe candidate - exit - endif enddo !Sequence estimation enddo !Candidate list diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index f8e6dab71..13ed8d2cc 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -57,10 +57,10 @@ program ft4d j2=index(infile,'.wav') open(10,file=infile,status='old',access='stream') read(10) ihdr - npts=ihdr(11)/2 + npts=min(ihdr(11)/2,180000) read(10) iwave(1:npts) close(10) - cdatetime=infile(1:13)//'.000' + cdatetime=infile(j2-13:j2)//'000' istep=3456 nsteps=(npts-52800)/istep + 1 From 580fce83207f02ce469f2d1c919cd58df713d780 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 28 Mar 2019 09:21:01 -0400 Subject: [PATCH 2/6] Allow oddball file names for input to ft4d. --- lib/ft4/ft4d.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index 13ed8d2cc..7cb1cac01 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -54,14 +54,14 @@ program ft4d do ifile=iarg,nargs call getarg(ifile,infile) - j2=index(infile,'.wav') open(10,file=infile,status='old',access='stream') read(10) ihdr npts=min(ihdr(11)/2,180000) read(10) iwave(1:npts) close(10) - cdatetime=infile(j2-13:j2)//'000' - + cdatetime=infile + j2=index(infile,'.wav') + if(j2.ge.14) cdatetime=infile(j2-13:j2)//'000' istep=3456 nsteps=(npts-52800)/istep + 1 do n=1,nsteps From cfb36395e02819fa2a9db2e1b97815d700fbcd25 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 28 Mar 2019 09:22:29 -0400 Subject: [PATCH 3/6] Add some better usage examples for ft4sim. --- lib/ft4/ft4sim.f90 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ft4/ft4sim.f90 b/lib/ft4/ft4sim.f90 index 0a9a1dcbc..1481840c8 100644 --- a/lib/ft4/ft4sim.f90 +++ b/lib/ft4/ft4sim.f90 @@ -25,9 +25,8 @@ program ft4sim nargs=iargc() if(nargs.ne.7) then print*,'Usage: ft4sim "message" f0 DT fdop del nfiles snr' - print*,'Examples: ft4sim "K1ABC W9XYZ EN37" 1500.0 0.0 0.1 1.0 10 -15' - print*,' ft4sim "WA9XYZ/R KA1ABC/R FN42" 1500.0 0.0 0.1 1.0 10 -15' - print*,' ft4sim "K1ABC RR73; W9XYZ -11" 300 0 0 0 1 -10' + print*,'Examples: ft4sim "CQ W9XYZ EN37" 1500 0.0 0.1 1.0 10 -15' + print*,' ft4sim "K1ABC W9XYZ R 539 WI" 1500 0.0 0.1 1.0 10 -15' go to 999 endif call getarg(1,msg37) !Message to be transmitted From e571349c69203c3bbbe26a4b236f0c1889bd1358 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 28 Mar 2019 09:30:26 -0400 Subject: [PATCH 4/6] In FT4 mode, let the Tx# buttons start a transmission. --- widgets/mainwindow.cpp | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b318d2528..06d3f8c40 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4206,7 +4206,11 @@ void MainWindow::on_txb1_clicked() m_ntx=1; m_QSOProgress = REPLYING; ui->txrb1->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(1); + } else { + if(m_transmitting) m_restart=true; + } } else { on_txb2_clicked (); @@ -4227,7 +4231,11 @@ void MainWindow::on_txb2_clicked() m_ntx=2; m_QSOProgress = REPORT; ui->txrb2->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(2); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb3_clicked() @@ -4235,7 +4243,11 @@ void MainWindow::on_txb3_clicked() m_ntx=3; m_QSOProgress = ROGER_REPORT; ui->txrb3->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(3); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb4_clicked() @@ -4243,7 +4255,11 @@ void MainWindow::on_txb4_clicked() m_ntx=4; m_QSOProgress = ROGERS; ui->txrb4->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(4); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb4_doubleClicked() @@ -4261,7 +4277,11 @@ void MainWindow::on_txb5_clicked() m_ntx=5; m_QSOProgress = SIGNOFF; ui->txrb5->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(5); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb5_doubleClicked() @@ -4275,11 +4295,16 @@ void MainWindow::on_txb6_clicked() m_QSOProgress = CALLING; set_dateTimeQSO(-1); ui->txrb6->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(6); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) { +//Confusing: come here after double-click on left text window, not right window. if(m_mode=="FT4" and m_inQSOwith!="") return; set_dateTimeQSO(-1); // reset our QSO start time m_decodedText2=true; @@ -5149,6 +5174,7 @@ void MainWindow::clearDX () m_rptRcvd.clear (); m_qsoStart.clear (); m_qsoStop.clear (); + m_inQSOwith.clear(); genStdMsgs (QString {}); if (ui->tabWidget->currentIndex() == 1) { ui->genMsg->setText(ui->tx6->text()); From 1da4809e1b87742e1ac013846c157ffc8105afd9 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 28 Mar 2019 09:41:38 -0400 Subject: [PATCH 5/6] Do not disable double-clicking when m_inQSOwith is populated. (Correct???) --- widgets/mainwindow.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 06d3f8c40..b542edbe8 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4305,7 +4305,6 @@ void MainWindow::on_txb6_clicked() void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) { //Confusing: come here after double-click on left text window, not right window. - if(m_mode=="FT4" and m_inQSOwith!="") return; set_dateTimeQSO(-1); // reset our QSO start time m_decodedText2=true; doubleClickOnCall(modifiers); @@ -4314,7 +4313,6 @@ void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers) { - if(m_mode=="FT4" and m_inQSOwith!="") return; QTextCursor cursor; if(m_mode=="ISCAT") { MessageBox::information_message (this, From e4ebddcf133a816316c2e9b51ce74a24ee186154 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 28 Mar 2019 10:41:56 -0400 Subject: [PATCH 6/6] When Tx1 entry is disabled, Tx1 button should also be disabled. --- widgets/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b542edbe8..a741d901e 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3892,10 +3892,12 @@ void MainWindow::guiUpdate() SpecOp::RTTY==m_config.special_op_id()) ) { //We're in a contest-like mode other than EU_VHF: start QSO with Tx2. ui->tx1->setEnabled(false); + ui->txb1->setEnabled(false); } if(!ui->tx1->isEnabled() and SpecOp::EU_VHF==m_config.special_op_id()) { //We're in EU_VHF mode: start QSO with Tx1. ui->tx1->setEnabled(true); + ui->txb1->setEnabled(true); } }