diff --git a/lib/ft8/foxgen.f90 b/lib/ft8/foxgen.f90 index 652270d7e..686dc4fd5 100644 --- a/lib/ft8/foxgen.f90 +++ b/lib/ft8/foxgen.f90 @@ -19,7 +19,6 @@ subroutine foxgen() parameter (NWAVE=NN*NSPS,NFFT=614400,NH=NFFT/2) character*40 cmsg character*22 msg,msgsent - character*6 mygrid character*87 cbits character*88 cb88 integer itone(NN) @@ -39,7 +38,6 @@ subroutine foxgen() dfreq=6.25d0 dt=1.d0/48000.d0 twopi=8.d0*atan(1.d0) - mygrid=' ' irpt=0 nplot=0 wave=0. @@ -56,7 +54,7 @@ subroutine foxgen() msg=cmsg(n)(1:i1)//cmsg(n)(i2+1:i3-2)//' ' read(cmsg(n)(i4+2:i4+4),*) irpt endif - call genft8(msg,mygrid,0,1,1,msgsent,msgbits,itone) + call genft8(msg,0,1,1,msgsent,msgbits,itone) ! print*,'Foxgen:',n,cmsg(n),msgsent if(i3b.eq.1) then diff --git a/lib/ft8/ft8apset.f90 b/lib/ft8/ft8apset.f90 index ce62d2fad..24676e63a 100644 --- a/lib/ft8/ft8apset.f90 +++ b/lib/ft8/ft8apset.f90 @@ -1,9 +1,9 @@ -subroutine ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,apsym) +subroutine ft8apset(mycall12,hiscall12,hisgrid6,apsym) parameter(NAPM=4,KK=87) character*12 mycall12,hiscall12 character*37 msg,msgsent character*6 mycall,hiscall - character*6 mygrid6,hisgrid6 + character*6 hisgrid6 character*4 hisgrid integer apsym(KK) integer*1 msgbits(KK) @@ -18,7 +18,7 @@ subroutine ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,apsym) i3=0 ! ### TEMPORARY ??? ### n3=0 !TEMPORARY isync=1 - call genft8(msg,mygrid6,i3,n3,isync,msgsent,msgbits,itone) + call genft8(msg,i3,n3,isync,msgsent,msgbits,itone) apsym=2*msgbits-1 return end subroutine ft8apset diff --git a/lib/ft8/ft8b_1.f90 b/lib/ft8/ft8b_1.f90 index 089b66a3f..412653ef2 100644 --- a/lib/ft8/ft8b_1.f90 +++ b/lib/ft8/ft8b_1.f90 @@ -1,5 +1,5 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & - napwid,lsubtract,nagain,iaptype,mycall12,mygrid6,hiscall12, & + napwid,lsubtract,nagain,iaptype,mycall12,hiscall12, & sync0,f1,xdt,xbase,apsym,nharderrors,dmin,nbadcrc,ipass,iera,msg37,xsnr) use crc @@ -9,7 +9,7 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & character*37 msg37,msgsent37 character message*22,msgsent*22 character*12 mycall12,hiscall12 - character*6 mycall6,mygrid6,hiscall6,c1,c2 + character*6 mycall6,hiscall6,c1,c2 character*87 cbits real a(5) real s1(0:7,ND),s2(0:7,NN),s1sort(8*ND) @@ -385,7 +385,7 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & isync=1 msg37=' ' msg37(1:22)=message - call genft8(msg37,mygrid6,i3,n3,isync,msgsent37,msgbits,itone) + call genft8(msg37,i3,n3,isync,msgsent37,msgbits,itone) if(lsubtract) call subtractft8(dd0,itone,f1,xdt2) xsig=0.0 xnoi=0.0 diff --git a/lib/ft8/ft8b_2.f90 b/lib/ft8/ft8b_2.f90 index 4229b5029..3b8763eef 100644 --- a/lib/ft8/ft8b_2.f90 +++ b/lib/ft8/ft8b_2.f90 @@ -1,5 +1,5 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & - napwid,lsubtract,nagain,iaptype,mycall12,mygrid6,hiscall12, & + napwid,lsubtract,nagain,iaptype,mycall12,hiscall12, & sync0,f1,xdt,xbase,apsym,nharderrors,dmin,nbadcrc,ipass,iera,msg37,xsnr) use crc @@ -10,7 +10,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & character*37 msg37,msgsent37 character*12 mycall12,hiscall12 character*77 c77 - character*6 mycall6,mygrid6,hiscall6,c1,c2 + character*6 mycall6,hiscall6,c1,c2 character*87 cbits real a(5) real s8(0:7,NN) @@ -327,7 +327,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & call pack77(msg37,i3p,n3p,c77) ! Should we test for consistency between i3,n3 from codeword and i3,n3 from unpack77? !write(*,*) i3,n3,i3p,n3p,msg37 - call genft8_174_91(msg37,mygrid6,i3,n3,msgsent37,msgbits,itone) + call genft8_174_91(msg37,i3,n3,msgsent37,msgbits,itone) if(lsubtract) call subtractft8(dd0,itone,f1,xdt) xsig=0.0 xnoi=0.0 diff --git a/lib/ft8/ft8code.f90 b/lib/ft8/ft8code.f90 index 0ed2410cb..3a1057238 100644 --- a/lib/ft8/ft8code.f90 +++ b/lib/ft8/ft8code.f90 @@ -14,13 +14,11 @@ program ft8code character*6 c1,c2 character*9 comment character*22 msgsent,message - character*6 mygrid6 character bad*1,msgtype*10 character*87 cbits integer itone(NN) integer dgen(12) integer*1 msgbits(KK),decoded(KK),decoded0(KK) - data mygrid6/'EM48 '/ ! Get command-line argument(s) nargs=iargc() @@ -64,7 +62,7 @@ program ft8code if(itype.eq.5) msgtype="Type 2 sfx" if(itype.eq.6) msgtype="Free text" i3bit=0 - call genft8(msg(1:22),mygrid6,i3bit,msgsent,msgbits,itone) + call genft8(msg(1:22),i3bit,msgsent,msgbits,itone) else call foxgen_wrap(msg,msgbits,itone) i3bit=1 diff --git a/lib/ft8/ft8sim.f90 b/lib/ft8/ft8sim.f90 index 22d53cb0f..3e89b034e 100644 --- a/lib/ft8/ft8sim.f90 +++ b/lib/ft8/ft8sim.f90 @@ -9,14 +9,12 @@ program ft8sim type(hdr) h !Header for .wav file character arg*12,fname*17 character msg40*40,msg*22,msgsent*22,msg0*22 - character*6 mygrid6 complex c0(0:NMAX-1) complex c(0:NMAX-1) real wave(NMAX) integer itone(NN) integer*1 msgbits(91) integer*2 iwave(NMAX) !Generated full-length waveform - data mygrid6/'EM48 '/ ! Get command-line argument(s) nargs=iargc() @@ -26,7 +24,6 @@ program ft8sim print*,' ft8sim "K1ABC W9XYZ EN37" 10 0.0 0.1 1.0 25 10 -18' print*,' ft8sim "K1ABC W9XYZ EN37" 25 0.0 0.1 1.0 25 10 -18' print*,' ft8sim "K1ABC RR73; W9XYZ -11" 300 0 0 0 25 1 -10' - print*,'Make nfiles negative to invoke 72-bit contest mode.' go to 999 endif call getarg(1,msg40) !Message to be transmitted @@ -71,9 +68,9 @@ program ft8sim i3bit=0 msg=msg40(1:22) if(itype.eq.1) then - call genft8(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8(msg,i3bit,msgsent,msgbits,itone) elseif(itype.eq.2) then - call genft8_174_91(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8_174_91(msg,i3bit,msgsent,msgbits,itone) endif write(*,1000) f0,xdt,txt,snrdb,bw,msgsent 1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, & @@ -112,9 +109,9 @@ program ft8sim f0=f0+100 endif if(itype.eq.1) then - call genft8(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8(msg,i3bit,msgsent,msgbits,itone) elseif(itype.eq.2) then - call genft8_174_91(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8_174_91(msg,i3bit,msgsent,msgbits,itone) endif endif if(nsig.eq.25) then @@ -135,9 +132,9 @@ program ft8sim f0=600.0 + mod(isig-1,5)*60.0 endif if(itype.eq.1) then - call genft8(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8(msg,i3bit,msgsent,msgbits,itone) elseif(itype.eq.2) then - call genft8_174_91(msg,mygrid6,i3bit,msgsent,msgbits,itone) + call genft8_174_91(msg,i3bit,msgsent,msgbits,itone) endif endif ! k=nint((xdt+0.5+0.01*gran())/dt) diff --git a/lib/ft8/genft8.f90 b/lib/ft8/genft8.f90 index 3dcb9dd86..de8d6d094 100644 --- a/lib/ft8/genft8.f90 +++ b/lib/ft8/genft8.f90 @@ -1,4 +1,4 @@ -subroutine genft8(msg37,mygrid,i3,n3,isync,msgsent37,msgbits77,itone) +subroutine genft8(msg37,i3,n3,isync,msgsent37,msgbits77,itone) ! Encode an FT8 message, producing array itone(). @@ -7,7 +7,6 @@ subroutine genft8(msg37,mygrid,i3,n3,isync,msgsent37,msgbits77,itone) include 'ft8_params.f90' character*22 msg,msgsent character*37 msg37,msgsent37 - character*6 mygrid character*87 cbits logical checksumok integer*4 i4Msg6BitWords(12) !72-bit message as 6-bit words @@ -56,7 +55,7 @@ subroutine genft8(msg37,mygrid,i3,n3,isync,msgsent37,msgbits77,itone) 900 continue - call genft8_174_91(msg37,mygrid,i3,n3,msgsent37,msgbits77,itone) + call genft8_174_91(msg37,i3,n3,msgsent37,msgbits77,itone) return end subroutine genft8 diff --git a/lib/ft8/genft8_174_91.f90 b/lib/ft8/genft8_174_91.f90 index 0be1f191e..e64cf4ef2 100644 --- a/lib/ft8/genft8_174_91.f90 +++ b/lib/ft8/genft8_174_91.f90 @@ -1,11 +1,10 @@ -subroutine genft8_174_91(msg,mygrid,i3,n3,msgsent,msgbits,itone) +subroutine genft8_174_91(msg,i3,n3,msgsent,msgbits,itone) ! Encode an FT8 message, producing array itone(). use packjt77 include 'ft8_params.f90' character msg*37,msgsent*37 - character*6 mygrid character*77 c77 integer*1 msgbits(77),codeword(174) integer itone(79) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 99da16b32..86ff5554b 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -61,10 +61,10 @@ contains write(datetime,1001) nutc !### TEMPORARY ### 1001 format("000000_",i6.6) - call ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,apsym1) + call ft8apset(mycall12,hiscall12,hisgrid6,apsym1) ! For now, turn off apset until we get basic functionality going... AP will ! need to be re-thinked for itype=2 messages. -! call ft8apset_174_91(mycall12,mygrid6,hiscall12,hisgrid6,apsym2) +! call ft8apset_174_91(mycall12,hiscall12,hisgrid6,apsym2) apsym2=0 dd=iwave ndecodes=0 @@ -110,12 +110,12 @@ contains call timer('ft8b ',0) if(isync.eq.1) then call ft8b_1(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lft8apon, & - lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, & + lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12, & hiscall12,sync,f1,xdt,xbase,apsym1,nharderrors,dmin, & nbadcrc,iappass,iera,msg37,xsnr) else call ft8b_2(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lft8apon, & - lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, & + lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12, & hiscall12,sync,f1,xdt,xbase,apsym2,nharderrors,dmin, & nbadcrc,iappass,iera,msg37,xsnr) endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 8c41d7b48..4f7506da7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -76,9 +76,8 @@ extern "C" { fortran_charlen_t, fortran_charlen_t, fortran_charlen_t, fortran_charlen_t, fortran_charlen_t); - void genft8_(char* msg, char* MyGrid, int* i3, int* n3, int* isync, char* msgsent, - char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t, - fortran_charlen_t); + void genft8_(char* msg, int* i3, int* n3, int* isync, char* msgsent, + char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t); void parse77_(char* msg, int* i3, int* n3, fortran_charlen_t); @@ -3495,9 +3494,8 @@ void MainWindow::guiUpdate() if(!m_config.bGenerate77() and itype == 6 and (m_i3>0 or m_n3>0)) m_isync=2; if(m_config.bGenerate77()) m_isync=2; char ft8msgbits[77]; - genft8_(message, MyGrid, &m_i3, &m_n3, &m_isync, msgsent, - const_cast (ft8msgbits), const_cast (itone), 37, 6, 37); - + genft8_(message, &m_i3, &m_n3, &m_isync, msgsent, + const_cast (ft8msgbits), const_cast (itone), 37, 37); if(m_config.bFox()) { //Fox must generate the full Tx waveform, not just an itone[] array. QString fm = QString::fromStdString(message).trimmed(); @@ -4194,6 +4192,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie && !message_words.at (3).contains (grid_regexp)) // but no grid on end of msg { QString r=message_words.at (3); + qDebug() << "aaa" << m_QSOProgress << r << message.string(); if(m_QSOProgress >= ROGER_REPORT && (r=="RRR" || r.toInt()==73 || "RR73" == r)) { if(ui->tabWidget->currentIndex()==1) { gen_msg = 5; @@ -4216,7 +4215,8 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie m_ntx=7; m_gen_message_is_cq = false; } - } else if(m_QSOProgress >= CALLING && r.toInt()>=-50 && r.toInt()<=49) { + } else if(m_QSOProgress >= CALLING && ((r.toInt()>=-50 && r.toInt()<=49) or + (r.toInt()>=529 && r.toInt()<=599))) { m_ntx=3; m_QSOProgress = ROGER_REPORT; ui->txrb3->setChecked(true); @@ -4225,8 +4225,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie m_ntx=7; m_gen_message_is_cq = false; } - } - else { // nothing for us + } else { // nothing for us return; } }