From 6c018cb53fd84d05111bd572f9ae40cc5505c334 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 1 Dec 2022 12:36:48 -0500 Subject: [PATCH 1/6] Fix the Q65 submode indicator written to map65_rx.log. --- map65/libm65/q65b.f90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/map65/libm65/q65b.f90 b/map65/libm65/q65b.f90 index 92be6528a..15c0ea11b 100644 --- a/map65/libm65/q65b.f90 +++ b/map65/libm65/q65b.f90 @@ -181,8 +181,9 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, & if(nutc.ne.nutc00 .or. msg0(1:28).ne.msg00 .or. freq1.ne.freq1_00) then ! Write to file map65_rx.log: ndecodes=ndecodes+1 - write(21,1110) freq1,ndf,xdt0,npol,nsnr0,nutc,msg0(1:28),cq0 -1110 format(f8.3,i5,f5.1,2i4,i5.4,2x,a28,': A',2x,a3) + write(21,1110) freq1,ndf,xdt0,npol,nsnr0,nutc,msg0(1:28), & + cmode(2:2),cq0 +1110 format(f8.3,i5,f5.1,2i4,i5.4,2x,a28,': ',a1,2x,a3) nutc00=nutc msg00=msg0(1:28) freq1_00=freq1 From 0055222306ae7858f15a34e80db7b5d9b3bba757 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Dec 2022 09:18:52 -0500 Subject: [PATCH 2/6] Write MAP65 decodes to file 'wb_q65.txt', for use by WSJT-X. --- lib/map65_mmdec.f90 | 2 +- map65/libm65/ftninit.f90 | 1 + map65/libm65/m65.f90 | 4 ++-- map65/libm65/map65a.f90 | 2 ++ map65/libm65/q65b.f90 | 4 ++++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/map65_mmdec.f90 b/lib/map65_mmdec.f90 index 18334ecf9..e0456b788 100644 --- a/lib/map65_mmdec.f90 +++ b/lib/map65_mmdec.f90 @@ -40,7 +40,7 @@ subroutine map65_mmdec(nutc,id2,nqd,nsubmode,nfa,nfb,nfqso,ntol,newdat, & lagain=(nagain.ne.0) bVHF=.true. emedelay=2.5 - ndepth=3 !Does this make it too slow? + ndepth=2 !Does this make it too slow? ntrperiod=60 open(17,file=trim(temp_dir)//'/red.dat',status='unknown') diff --git a/map65/libm65/ftninit.f90 b/map65/libm65/ftninit.f90 index 90468319c..f97705942 100644 --- a/map65/libm65/ftninit.f90 +++ b/map65/libm65/ftninit.f90 @@ -10,6 +10,7 @@ subroutine ftninit(appd) addpfx=' ' call pfxdump(appd//'/prefixes.txt') + open(12,file=appd//'/wb_q65.txt',status='unknown') 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) diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90 index d878a3b49..4c6713ab0 100644 --- a/map65/libm65/m65.f90 +++ b/map65/libm65/m65.f90 @@ -7,9 +7,9 @@ program m65 ! ! 10 binary input data, *.tf2 files ! 11 prefixes.txt -! 12 +! 12 wb_w65.txt ! 13 map65.log -! 14 +! 14 ! 15 ! 16 tquick log ! 17 saved *.tf2 files diff --git a/map65/libm65/map65a.f90 b/map65/libm65/map65a.f90 index b0f43be7c..7403d9cbb 100644 --- a/map65/libm65/map65a.f90 +++ b/map65/libm65/map65a.f90 @@ -41,6 +41,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/,mousefqso0/-999/ save + rewind 12 ndecodes=0 ! Clean start for Q65 at early decode @@ -520,6 +521,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & ndecdone=2 900 close(23) + call flush(12) ndphi=0 mcall3b=mcall3a diff --git a/map65/libm65/q65b.f90 b/map65/libm65/q65b.f90 index 15c0ea11b..7df236d8d 100644 --- a/map65/libm65/q65b.f90 +++ b/map65/libm65/q65b.f90 @@ -187,6 +187,10 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, & nutc00=nutc msg00=msg0(1:28) freq1_00=freq1 + + f1=0.001*k0*df+nkhz_center-48.0+1.0 + write(12,1120) nutc,f1,xdt0,nsnr0,trim(msg0) +1120 format(i4.4,f9.3,f7.2,i5,2x,a) endif endif From 32411d1fd0d3fba939af3a6efd1458afe7ca19a8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Dec 2022 10:20:43 -0500 Subject: [PATCH 3/6] Send current self-dop from MAP65 mainwindow to decoder. --- map65/astro.cpp | 1 + map65/libm65/decode0.f90 | 4 ++-- map65/libm65/m65.f90 | 2 +- map65/libm65/m65a.f90 | 2 +- map65/libm65/map65a.f90 | 8 ++++---- map65/libm65/q65b.f90 | 10 ++++++---- map65/mainwindow.cpp | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/map65/astro.cpp b/map65/astro.cpp index 427518382..2583a32a7 100644 --- a/map65/astro.cpp +++ b/map65/astro.cpp @@ -70,6 +70,7 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, &azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon, &dgrd, &poloffset, &xnr, 6, 6); + datcom_.nfast=ndop00; //Send self Doppler to decoder, via datcom sprintf(cc, "Az: %6.1f\n" "El: %6.1f\n" diff --git a/map65/libm65/decode0.f90 b/map65/libm65/decode0.f90 index ba167cddf..438079f1d 100644 --- a/map65/libm65/decode0.f90 +++ b/map65/libm65/decode0.f90 @@ -12,7 +12,7 @@ subroutine decode0(dd,ss,savg,nstandalone) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime + ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime common/early/nhsym1,nhsym2,ldecoded(32768) common/decodes/ndecodes data neme0/-99/,mcall3b/1/ @@ -56,7 +56,7 @@ subroutine decode0(dd,ss,savg,nstandalone) mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & - ndiskdat,nxpol,nmode) + ndiskdat,nxpol,nmode,ndop00) call timer('map65a ',1) call timer('decode0 ',1) diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90 index 4c6713ab0..c93357c7e 100644 --- a/map65/libm65/m65.f90 +++ b/map65/libm65/m65.f90 @@ -41,7 +41,7 @@ program m65 common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime + ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime common/early/nhsym1,nhsym2,ldecoded(32768) nargs=iargc() diff --git a/map65/libm65/m65a.f90 b/map65/libm65/m65a.f90 index 5e9adc464..ffeb176a3 100644 --- a/map65/libm65/m65a.f90 +++ b/map65/libm65/m65a.f90 @@ -82,7 +82,7 @@ subroutine m65c(dd,ss,savg,nparams0) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, & + ndop00,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, & datetime,junk1,junk2 common/early/nhsym1,nhsym2,ldecoded(32768) equivalence (nparams,fcenter) diff --git a/map65/libm65/map65a.f90 b/map65/libm65/map65a.f90 index 7403d9cbb..1861467ad 100644 --- a/map65/libm65/map65a.f90 +++ b/map65/libm65/map65a.f90 @@ -2,7 +2,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & - ndiskdat,nxpol,nmode) + ndiskdat,nxpol,nmode,ndop00) ! Processes timf2 data from Linrad to find and decode JT65 signals. @@ -366,7 +366,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & call timer('q65b ',0) call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf, & ntol,xpol,mycall,mygrid, hiscall,hisgrid,mode_q65,f0,fqso, & - newdat,nagain,max_drift,nhsym,idec) + newdat,nagain,max_drift,nhsym,ndop00,idec) call timer('q65b ',1) if(idec.ge.0) candec(icand)=.true. enddo @@ -377,7 +377,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & call timer('q65b ',0) call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf, & ntol,xpol,mycall,mygrid,hiscall,hisgrid,mode_q65,f0,fqso, & - newdat,nagain,max_drift,nhsym,idec) + newdat,nagain,max_drift,nhsym,ndop00,idec) call timer('q65b ',1) endif endif @@ -421,7 +421,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & call timer('q65b ',0) call q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & xpol,mycall,mygrid,hiscall,hisgrid,mode_q65,f0,fqso,newdat, & - nagain,max_drift,nhsym,idec) + nagain,max_drift,nhsym,ndop00,idec) call timer('q65b ',1) if(idec.ge.0) candec(icand)=.true. enddo ! icand diff --git a/map65/libm65/q65b.f90 b/map65/libm65/q65b.f90 index 7df236d8d..55bdd1771 100644 --- a/map65/libm65/q65b.f90 +++ b/map65/libm65/q65b.f90 @@ -1,6 +1,6 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, & mycall0,mygrid,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, & - max_drift,nhsym,idec) + max_drift,nhsym,ndop00,idec) ! This routine provides an interface between MAP65 and the Q65 decoder ! in WSJT-X. All arguments are input data obtained from the MAP65 GUI. @@ -188,9 +188,11 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, & msg00=msg0(1:28) freq1_00=freq1 - f1=0.001*k0*df+nkhz_center-48.0+1.0 - write(12,1120) nutc,f1,xdt0,nsnr0,trim(msg0) -1120 format(i4.4,f9.3,f7.2,i5,2x,a) + ndop00=1575 !### TEMPORARY, for Nov 12 2022 at 0500 UTC ### + frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal + fsked=frx - 0.001*ndop00/2.0 - 1.5 + write(12,1120) nutc,fsked,xdt0,nsnr0,trim(msg0) +1120 format(i4.4,f9.3,f7.2,i5,2x,a,i6) endif endif diff --git a/map65/mainwindow.cpp b/map65/mainwindow.cpp index 4ab500f65..adddfeac2 100644 --- a/map65/mainwindow.cpp +++ b/map65/mainwindow.cpp @@ -1322,7 +1322,7 @@ void MainWindow::decode() //decode() datcom_.nxpol=0; if(m_xpol) datcom_.nxpol=1; datcom_.nmode=10*m_modeQ65 + m_modeJT65; - datcom_.nfast=1; //No longer used +// datcom_.nfast=1; //No longer used datcom_.nsave=m_nsave; datcom_.max_drift=ui->sbMaxDrift->value(); From 5daa5f301d48a286d4d3bb820d00d75da6ab6d65 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Dec 2022 11:35:52 -0500 Subject: [PATCH 4/6] Let MAP65 compute self Doppler using *.iq filename values for date and time. --- map65/libm65/astrosub.f90 | 12 ++++++++++++ map65/mainwindow.cpp | 20 +++++++++++++++++++- map65/mainwindow.h | 3 +++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/map65/libm65/astrosub.f90 b/map65/libm65/astrosub.f90 index 64dddb00c..ce25a0d94 100644 --- a/map65/libm65/astrosub.f90 +++ b/map65/libm65/astrosub.f90 @@ -12,3 +12,15 @@ subroutine astrosub(nyear,month,nday,uth8,nfreq,mygrid,hisgrid, & return end subroutine astrosub + +subroutine astrosub00(nyear,month,nday,uth8,nfreq,mygrid,ndop00) + + implicit real*8 (a-h,o-z) + character*6 mygrid + + call astrosub(nyear,month,nday,uth8,nfreq,mygrid,mygrid, & + AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00, & + RAMoon8,DecMoon8,Dgrd8,poloffset8,xnr8) + + return +end subroutine astrosub00 diff --git a/map65/mainwindow.cpp b/map65/mainwindow.cpp index adddfeac2..98a34a164 100644 --- a/map65/mainwindow.cpp +++ b/map65/mainwindow.cpp @@ -1293,7 +1293,25 @@ void MainWindow::decode() //decode() datcom_.mousefqso=m_wide_graph_window->QSOfreq(); datcom_.ndepth=m_ndepth; datcom_.ndiskdat=0; - if(m_diskData) datcom_.ndiskdat=1; + if(m_diskData) { + datcom_.ndiskdat=1; + int i0=m_path.indexOf(".tf2"); + if(i0<0) i0=m_path.indexOf(".iq"); + if(i0>0) { + // Compute self Doppler using the filename for Date and Time + int nyear=m_path.mid(i0-11,2).toInt()+2000; + int month=m_path.mid(i0-9,2).toInt(); + int nday=m_path.mid(i0-7,2).toInt(); + int nhr=m_path.mid(i0-4,2).toInt(); + int nmin=m_path.mid(i0-2,2).toInt(); + double uth=nhr + nmin/60.0; + int nfreq=(int)datcom_.fcenter; + int ndop00; + + astrosub00_(&nyear, &month, &nday, &uth, &nfreq, m_myGrid.toLatin1(),&ndop00,6); + datcom_.nfast=ndop00; //Send self Doppler to decoder, via datcom + } + } datcom_.neme=0; if(ui->actionOnly_EME_calls->isChecked()) datcom_.neme=1; diff --git a/map65/mainwindow.h b/map65/mainwindow.h index ebee97403..efe58b866 100644 --- a/map65/mainwindow.h +++ b/map65/mainwindow.h @@ -322,6 +322,9 @@ extern "C" { int len1, int len2); int ptt_(int* nport, int* itx, int* iptt); + + void astrosub00_ (int* nyear, int* month, int* nday, double* uth, int* nfreq, + const char* mygrid, int* ndop00, int len1); } #endif // MAINWINDOW_H From 4160256747c75788219d5e9e667f5495c898abc7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Dec 2022 11:43:25 -0500 Subject: [PATCH 5/6] Remove a temporary hardwired Doppler value. --- map65/libm65/q65b.f90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/map65/libm65/q65b.f90 b/map65/libm65/q65b.f90 index 55bdd1771..7cf455edf 100644 --- a/map65/libm65/q65b.f90 +++ b/map65/libm65/q65b.f90 @@ -187,8 +187,6 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, & nutc00=nutc msg00=msg0(1:28) freq1_00=freq1 - - ndop00=1575 !### TEMPORARY, for Nov 12 2022 at 0500 UTC ### frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal fsked=frx - 0.001*ndop00/2.0 - 1.5 write(12,1120) nutc,fsked,xdt0,nsnr0,trim(msg0) From 44729ebe00437c08e82c8c88121fb493af1012ee Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Dec 2022 16:30:18 -0500 Subject: [PATCH 6/6] Work in progress on displaying wideband decodes from MAP65 in WSJT-X. --- widgets/mainwindow.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++ widgets/mainwindow.h | 10 +++++++ 2 files changed, 75 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 11d82d18a..94b678065 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4781,6 +4781,14 @@ void MainWindow::guiUpdate() if(nsec != m_sec0) { // qDebug() << "AAA" << nsec << int(m_specOp) << ui->labDXped->text(); + if(m_mode=="Q65") { + QFileInfo fi(m_appDir+"/wb_q65.txt"); + QDateTime fileTime=fi.lastModified(); + QDateTime now = QDateTime::currentDateTimeUtc (); + int age=fileTime.msecsTo(now)/1000; + if(age==1) readWidebandDecodes(); + } + if(m_mode=="FST4") chk_FST4_freq_range(); m_currentBand=m_config.bands()->find(m_freqNominal); if( SpecOp::HOUND == m_specOp ) { @@ -9152,6 +9160,63 @@ void MainWindow::write_transmit_entry (QString const& file_name) } } +void MainWindow::readWidebandDecodes() +{ +// Update "m_wEMECall" by reading wb_dec.txt + int nhr=0; + int nmin=0; + QFile f(m_appDir+"/wb_q65.txt"); + f.open(QIODevice::ReadOnly); + if(f.isOpen()) { + QTextStream in(&f); + QString line,callsign; + for(int i=0; i<99999; i++) { + line=in.readLine(); + if(line.length()<=0) break; + nhr=line.mid(0,2).toInt(); + nmin=line.mid(2,2).toInt(); + double fsked=line.mid(4,9).toDouble(); + QString msg=line.mid(27,-1); + int i1=msg.indexOf(" "); + int i2=i1 +1 + msg.mid(i1+1,-1).indexOf(" "); + QString call=msg.mid(i1+1,i2-i1); + QString w3=msg.mid(i2+1,-1); + m_EMECall[call].fsked=fsked; + m_EMECall[call].t=60*nhr + nmin; + m_EMECall[call].worked=false; + if(w3.contains(grid_regexp)) m_EMECall[call].grid4=w3; + } + f.close(); + + /* + if(m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); + + if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t); + QString t1; + if(!bReady) t1 = t1.asprintf(" %3d %+2.2d %4d %1d %2d %4d",az,snr,freq,itx,age,points); + */ + + QMap::iterator i; + QString t=""; + QString t1; + for(i=m_EMECall.begin(); i!=m_EMECall.end(); i++) { + int age=60*nhr + nmin - (i->t); + if(age<0) age += 1440; + if(i->worked) { + t1=t1.asprintf("%5.1f %8s %4d\n",i->fsked,i.key().toLatin1().constData(),age); + } else { + t1=t1.asprintf("%5.1f * %8s %4d\n",i->fsked,i.key().toLatin1().constData(),age); + } + t+=t1; + } + qDebug() << "bb" << t; + if(m_ActiveStationsWidget != NULL) { + m_ActiveStationsWidget->erase(); + m_ActiveStationsWidget->displayRecentStations(t); + } + } +} + // -------------------------- Code for FT8 DXpedition Mode --------------------------- void MainWindow::hound_reply () diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index a2558fe81..821e5f496 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -373,6 +373,7 @@ private: void setColorHighlighting(); void chkFT4(); bool elide_tx1_not_allowed () const; + void readWidebandDecodes(); QProcessEnvironment const& m_env; NetworkAccessManager m_network_manager; @@ -701,6 +702,15 @@ private: }; QMap m_activeCall; //Key = callsign, value = grid4, az, points for ARRL_DIGI + struct EMECall + { + QString grid4; + double fsked; + qint32 t; + bool worked; + }; + QMap m_EMECall; + struct RecentCall { qint64 dialFreq;