Tidy up some details for 72-bit contest mode in FT8.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7974 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-08-01 18:16:01 +00:00
parent b29bd33a86
commit db9181d1cd
2 changed files with 33 additions and 16 deletions

View File

@ -6,7 +6,7 @@ subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
use packjt
include 'ft8_params.f90'
character*22 msg,msgsent
character*6 mygrid,g1,g2
character*6 mygrid,g1,g2,g3,g4
character*87 cbits
logical*1 bcontest
logical isgrid
@ -36,6 +36,23 @@ subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
if(bcontest) then
i1=index(msgsent(8:22),' ') + 8
g3=msgsent(i1:i1+3)//' '
if(isgrid(g3)) then
call azdist(mygrid,g3,0.d0,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter)
if(ndkm.gt.10000) then
call grid2deg(g3,dlong,dlat)
dlong=dlong+180.0
if(dlong.gt.180.0) dlong=dlong-360.0
dlat=-dlat
call deg2grid(dlong,dlat,g4)
msgsent=msgsent(1:i1-1)//'R '//g4(1:4)
endif
endif
endif
i3bit=0 !### temporary ###
write(cbits,1000) i4Msg6BitWords,32*i3bit
1000 format(12b6.6,b8.8)

View File

@ -4071,29 +4071,29 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
int n=rpt.toInt();
rpt.sprintf("%+2.2d",n);
if(m_mode=="MSK144") {
if(m_mode=="MSK144" or m_mode=="FT8") {
if(m_config.contestMode()) {
t=t0 + my_grid;
msgtype(t, ui->tx2);
t=t0 + "R " + my_grid;
msgtype(t, ui->tx3);
}
if(m_bShMsgs) {
int i=t0.length()-1;
t0="<" + t0.mid(0,i) + "> ";
if(!m_config.contestMode()) {
if(n<=-2) n=-3;
if(n>=-1 and n<=1) n=0;
if(n>=2 and n<=4) n=3;
if(n>=5 and n<=7) n=6;
if(n>=8 and n<=11) n=10;
if(n>=12 and n<=14) n=13;
if(n>=15) n=16;
rpt.sprintf("%+2.2d",n);
}
}
if(m_mode=="MSK144" and m_bShMsgs) {
int i=t0.length()-1;
t0="<" + t0.mid(0,i) + "> ";
if(!m_config.contestMode()) {
if(n<=-2) n=-3;
if(n>=-1 and n<=1) n=0;
if(n>=2 and n<=4) n=3;
if(n>=5 and n<=7) n=6;
if(n>=8 and n<=11) n=10;
if(n>=12 and n<=14) n=13;
if(n>=15) n=16;
rpt.sprintf("%+2.2d",n);
}
}
if(m_mode!="MSK144" or !m_config.contestMode()) {
if((m_mode!="MSK144" and m_mode!="FT8") or !m_config.contestMode()) {
t=t00 + rpt;
msgtype(t, ui->tx2);
t=t0 + "R" + rpt;