mirror of https://github.com/saitohirga/WSJT-X.git
First tests of "RR73 NOW ..." and "NIL NOW ..." (i3bit=1, 2) messages in FT8.
DO NOT USE THIS FEATURE ON THE AIR! git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8120 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
881422bf6c
commit
8ea602648c
|
@ -60,7 +60,8 @@ program allsim
|
||||||
call gen4(message,0,msgsent,itone,itype)
|
call gen4(message,0,msgsent,itone,itype)
|
||||||
call addit(itone,11025,206,2520,1200,sig,dat) !JT4
|
call addit(itone,11025,206,2520,1200,sig,dat) !JT4
|
||||||
|
|
||||||
call genft8(message,mygrid,bcontest,msgsent,msgbits,itone)
|
i3bit=0 ! ### TEMPORARY ??? ###
|
||||||
|
call genft8(message,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
|
||||||
call addit(itone,12000,79,1920,1400,sig,dat) !FT8
|
call addit(itone,12000,79,1920,1400,sig,dat) !FT8
|
||||||
|
|
||||||
call genqra64(message,0,msgsent,itone,itype)
|
call genqra64(message,0,msgsent,itone,itype)
|
||||||
|
|
|
@ -27,7 +27,6 @@ program fmeasure
|
||||||
|
|
||||||
parameter(NZ=1000)
|
parameter(NZ=1000)
|
||||||
implicit real*8 (a-h,o-z)
|
implicit real*8 (a-h,o-z)
|
||||||
real*8 fd(NZ),deltaf(NZ),r(NZ)
|
|
||||||
character infile*50
|
character infile*50
|
||||||
character line*80
|
character line*80
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@ subroutine ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,bcontest,apsym,iaptype)
|
||||||
! if(len_trim(hisgrid).eq.0) hisgrid="EN50"
|
! if(len_trim(hisgrid).eq.0) hisgrid="EN50"
|
||||||
if(index(hisgrid," ").eq.0) hisgrid="EN50"
|
if(index(hisgrid," ").eq.0) hisgrid="EN50"
|
||||||
msg=mycall//' '//hiscall//' '//hisgrid
|
msg=mycall//' '//hiscall//' '//hisgrid
|
||||||
call genft8(msg,mygrid6,bcontest,msgsent,msgbits,itone)
|
i3bit=0 ! ### TEMPORARY ??? ###
|
||||||
|
call genft8(msg,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
|
||||||
apsym=2*msgbits-1
|
apsym=2*msgbits-1
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
@ -351,7 +351,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
|
||||||
message=' '
|
message=' '
|
||||||
xsnr=-99.0
|
xsnr=-99.0
|
||||||
if(count(cw.eq.0).eq.174) cycle !Reject the all-zero codeword
|
if(count(cw.eq.0).eq.174) cycle !Reject the all-zero codeword
|
||||||
if(any(decoded(73:75).ne.0)) cycle !Reject if any of the 3 extra bits are nonzero
|
!### if(any(decoded(73:75).ne.0)) cycle !Reject if any of the 3 extra bits is nonzero
|
||||||
if(nharderrors.ge.0 .and. nharderrors+dmin.lt.60.0 .and. &
|
if(nharderrors.ge.0 .and. nharderrors+dmin.lt.60.0 .and. &
|
||||||
.not.(sync.lt.2.0 .and. nharderrors.gt.35) .and. &
|
.not.(sync.lt.2.0 .and. nharderrors.gt.35) .and. &
|
||||||
.not.(ipass.gt.2 .and. nharderrors.gt.39) .and. &
|
.not.(ipass.gt.2 .and. nharderrors.gt.39) .and. &
|
||||||
|
@ -362,9 +362,16 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
|
||||||
nharderrors=-1
|
nharderrors=-1
|
||||||
cycle
|
cycle
|
||||||
endif
|
endif
|
||||||
|
!###
|
||||||
|
i3bit=4*decoded(73) + 2*decoded(74) + decoded(75)
|
||||||
|
! if(nbadcrc.eq.0) write(*,3001) nharderrors,nbadcrc,i3bit
|
||||||
|
!3001 format('A',3i5)
|
||||||
|
!###
|
||||||
if(nbadcrc.eq.0) then
|
if(nbadcrc.eq.0) then
|
||||||
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
||||||
call genft8(message,mygrid6,bcontest,msgsent,msgbits,itone)
|
call genft8(message,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
|
||||||
|
if(i3bit.eq.1) message(21:21)='1'
|
||||||
|
if(i3bit.eq.2) message(21:21)='2'
|
||||||
if(lsubtract) call subtractft8(dd0,itone,f1,xdt2)
|
if(lsubtract) call subtractft8(dd0,itone,f1,xdt2)
|
||||||
xsig=0.0
|
xsig=0.0
|
||||||
xnoi=0.0
|
xnoi=0.0
|
||||||
|
|
|
@ -65,9 +65,10 @@ program ft8sim
|
||||||
sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
|
sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
|
||||||
if(snrdb.gt.90.0) sig=1.0
|
if(snrdb.gt.90.0) sig=1.0
|
||||||
txt=NN*NSPS/12000.0
|
txt=NN*NSPS/12000.0
|
||||||
|
i3bit=0 ! ### TEMPORARY ??? ###
|
||||||
|
|
||||||
! Source-encode, then get itone()
|
! Source-encode, then get itone()
|
||||||
call genft8(msg,mygrid6,bcontest,msgsent,msgbits,itone)
|
call genft8(msg,mygrid6,bcontest,i3bit,msgsent,msgbits,itone)
|
||||||
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
|
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
|
||||||
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
||||||
' BW:',f4.1,2x,a22)
|
' BW:',f4.1,2x,a22)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
|
subroutine genft8(msg,mygrid,bcontest,i3bit,msgsent,msgbits,itone)
|
||||||
|
|
||||||
! Encode an FT8 message, producing array itone().
|
! Encode an FT8 message, producing array itone().
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ subroutine genft8(msg,mygrid,bcontest,msgsent,msgbits,itone)
|
||||||
call packmsg(msg,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
|
call packmsg(msg,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
|
||||||
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
|
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
|
||||||
|
|
||||||
i3bit=0 !### temporary ###
|
|
||||||
write(cbits,1000) i4Msg6BitWords,32*i3bit
|
write(cbits,1000) i4Msg6BitWords,32*i3bit
|
||||||
1000 format(12b6.6,b8.8)
|
1000 format(12b6.6,b8.8)
|
||||||
read(cbits,1001) i1Msg8BitBytes(1:10)
|
read(cbits,1001) i1Msg8BitBytes(1:10)
|
||||||
|
|
|
@ -506,8 +506,8 @@ subroutine packbits(dbits,nsymd,m0,sym)
|
||||||
20 continue
|
20 continue
|
||||||
if(itype.ne.6) itype=max(nv2a,nv2b)
|
if(itype.ne.6) itype=max(nv2a,nv2b)
|
||||||
jt_itype=itype
|
jt_itype=itype
|
||||||
jt_c1=c1
|
jt_c1=c1(1:6)
|
||||||
jt_c2=c2
|
jt_c2=c2(1:6)
|
||||||
jt_c3=c3
|
jt_c3=c3
|
||||||
jt_k1=k1
|
jt_k1=k1
|
||||||
jt_k2=k2
|
jt_k2=k2
|
||||||
|
|
|
@ -76,7 +76,7 @@ extern "C" {
|
||||||
int len1, int len2, int len3, int len4, int len5);
|
int len1, int len2, int len3, int len4, int len5);
|
||||||
// float s[], int* jh, char line[], char mygrid[],
|
// float s[], int* jh, char line[], char mygrid[],
|
||||||
|
|
||||||
void genft8_(char* msg, char* MyGrid, bool* bcontest, char* msgsent,
|
void genft8_(char* msg, char* MyGrid, bool* bcontest, int* i3bit, char* msgsent,
|
||||||
char ft8msgbits[], int itone[], int len1, int len2, int len3);
|
char ft8msgbits[], int itone[], int len1, int len2, int len3);
|
||||||
|
|
||||||
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
||||||
|
@ -2705,6 +2705,12 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||||
if(navg>1 or t.indexOf("f*")>0) bAvgMsg=true;
|
if(navg>1 or t.indexOf("f*")>0) bAvgMsg=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(m_mode=="FT8") {
|
||||||
|
int i3bit=t.mid(44,1).toInt();
|
||||||
|
t=t.mid(0,44) + " " + t.mid(45);
|
||||||
|
if(i3bit==1) t=t.mid(0,24) + "RR73 NOW " + t.mid(24);
|
||||||
|
if(i3bit==2) t=t.mid(0,24) + "NIL NOW " + t.mid(24);
|
||||||
|
}
|
||||||
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("ALL.TXT")};
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("ALL.TXT")};
|
||||||
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
||||||
QTextStream out(&f);
|
QTextStream out(&f);
|
||||||
|
@ -3085,6 +3091,7 @@ void MainWindow::guiUpdate()
|
||||||
if((g_iptt==1 && m_iptt0==0) || m_restart) {
|
if((g_iptt==1 && m_iptt0==0) || m_restart) {
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
QByteArray ba;
|
QByteArray ba;
|
||||||
|
QByteArray ba0;
|
||||||
|
|
||||||
if(m_mode.startsWith ("WSPR")) {
|
if(m_mode.startsWith ("WSPR")) {
|
||||||
QString sdBm,msg0,msg1,msg2;
|
QString sdBm,msg0,msg1,msg2;
|
||||||
|
@ -3117,6 +3124,22 @@ void MainWindow::guiUpdate()
|
||||||
if(m_ntx == 8) ba=ui->freeTextMsg->currentText().toLocal8Bit();
|
if(m_ntx == 8) ba=ui->freeTextMsg->currentText().toLocal8Bit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_i3bit=0;
|
||||||
|
bool bDXped=true;
|
||||||
|
if(m_mode=="FT8" and bDXped) {
|
||||||
|
ba0=ba;
|
||||||
|
QString t=QString::fromUtf8(ba0);
|
||||||
|
if(t.startsWith("RR73 NOW ")) {
|
||||||
|
t=t.mid(9);
|
||||||
|
m_i3bit=1;
|
||||||
|
}
|
||||||
|
if(t.startsWith("NIL NOW ")) {
|
||||||
|
t=t.mid(8);
|
||||||
|
m_i3bit=2;
|
||||||
|
}
|
||||||
|
ba=t.toLocal8Bit();
|
||||||
|
}
|
||||||
|
|
||||||
ba2msg(ba,message);
|
ba2msg(ba,message);
|
||||||
int ichk=0;
|
int ichk=0;
|
||||||
if (m_lastMessageSent != m_currentMessage
|
if (m_lastMessageSent != m_currentMessage
|
||||||
|
@ -3159,7 +3182,7 @@ void MainWindow::guiUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(m_modeTx=="FT8") {
|
if(m_modeTx=="FT8") {
|
||||||
genft8_(message, MyGrid, &bcontest, msgsent, const_cast<char *> (ft8msgbits),
|
genft8_(message, MyGrid, &bcontest, &m_i3bit, msgsent, const_cast<char *> (ft8msgbits),
|
||||||
const_cast<int *> (itone), 22, 6, 22);
|
const_cast<int *> (itone), 22, 6, 22);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3364,7 +3387,10 @@ void MainWindow::guiUpdate()
|
||||||
if(m_mode=="Echo") {
|
if(m_mode=="Echo") {
|
||||||
tx_status_label.setText("Tx: ECHO");
|
tx_status_label.setText("Tx: ECHO");
|
||||||
} else {
|
} else {
|
||||||
tx_status_label.setText(s);
|
QString t{QString::fromLatin1(s)};
|
||||||
|
if(m_mode=="FT8" and m_i3bit==1) t="Tx: RR73 NOW " + t.mid(4);
|
||||||
|
if(m_mode=="FT8" and m_i3bit==2) t="Tx: NIL NOW " + t.mid(4);
|
||||||
|
tx_status_label.setText(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(m_monitoring) {
|
} else if(m_monitoring) {
|
||||||
|
@ -4224,11 +4250,10 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hisCall.size () <= 10 && hisCall != hisBase
|
if (hisCall != hisBase
|
||||||
|
&& m_config.type_2_msg_gen () != Configuration::type_2_msg_5_only
|
||||||
&& !eme_short_codes) {
|
&& !eme_short_codes) {
|
||||||
// cfm we have his full call copied as we could not do this
|
// cfm we have his full call copied as we could not do this earlier
|
||||||
// earlier, as this is a free text message we must be careful
|
|
||||||
// about the length
|
|
||||||
t = hisCall + " 73";
|
t = hisCall + " 73";
|
||||||
msgtype(t, ui->tx5->lineEdit ());
|
msgtype(t, ui->tx5->lineEdit ());
|
||||||
}
|
}
|
||||||
|
@ -4240,7 +4265,6 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
|
||||||
msgtype(t, ui->tx1);
|
msgtype(t, ui->tx1);
|
||||||
}
|
}
|
||||||
else if (!eme_short_codes
|
else if (!eme_short_codes
|
||||||
&& hisCall.size () <= 10 // avoid truncated free text message
|
|
||||||
&& ("MSK144" != m_mode || !m_bShMsgs)) {
|
&& ("MSK144" != m_mode || !m_bShMsgs)) {
|
||||||
t=hisCall + " 73";
|
t=hisCall + " 73";
|
||||||
msgtype(t, ui->tx5->lineEdit ());
|
msgtype(t, ui->tx5->lineEdit ());
|
||||||
|
@ -4944,7 +4968,6 @@ void MainWindow::on_actionMSK144_triggered()
|
||||||
m_bFastMode=true;
|
m_bFastMode=true;
|
||||||
m_bFast9=false;
|
m_bFast9=false;
|
||||||
m_TRperiod = ui->sbTR->value ();
|
m_TRperiod = ui->sbTR->value ();
|
||||||
m_fastGraph->setTRperiod (m_TRperiod);
|
|
||||||
m_wideGraph->hide();
|
m_wideGraph->hide();
|
||||||
m_fastGraph->show();
|
m_fastGraph->show();
|
||||||
ui->TxFreqSpinBox->setValue(1500);
|
ui->TxFreqSpinBox->setValue(1500);
|
||||||
|
@ -6169,7 +6192,7 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||||
.arg (snr, 3)
|
.arg (snr, 3)
|
||||||
.arg (delta_time, 4, 'f', 1)
|
.arg (delta_time, 4, 'f', 1)
|
||||||
.arg (delta_frequency, 4)
|
.arg (delta_frequency, 4)
|
||||||
.arg (mode, -2)
|
.arg (mode, 2)
|
||||||
.arg (message_text);
|
.arg (message_text);
|
||||||
auto messages = ui->decodedTextBrowser->toPlainText ();
|
auto messages = ui->decodedTextBrowser->toPlainText ();
|
||||||
auto position = messages.lastIndexOf (cqtext);
|
auto position = messages.lastIndexOf (cqtext);
|
||||||
|
@ -6181,7 +6204,7 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||||
.arg (snr, 3)
|
.arg (snr, 3)
|
||||||
.arg ('-' + QString::number (delta_time, 'f', 1), 4)
|
.arg ('-' + QString::number (delta_time, 'f', 1), 4)
|
||||||
.arg (delta_frequency, 4)
|
.arg (delta_frequency, 4)
|
||||||
.arg (mode, -2)
|
.arg (mode, 2)
|
||||||
.arg (message_text));
|
.arg (message_text));
|
||||||
}
|
}
|
||||||
if (position >= 0)
|
if (position >= 0)
|
||||||
|
|
|
@ -403,6 +403,7 @@ private:
|
||||||
qint32 m_nTx73;
|
qint32 m_nTx73;
|
||||||
qint32 m_UTCdisk;
|
qint32 m_UTCdisk;
|
||||||
qint32 m_wait;
|
qint32 m_wait;
|
||||||
|
qint32 m_i3bit;
|
||||||
|
|
||||||
bool m_btxok; //True if OK to transmit
|
bool m_btxok; //True if OK to transmit
|
||||||
bool m_diskData;
|
bool m_diskData;
|
||||||
|
|
Loading…
Reference in New Issue