Send m_i3, m_n3, m_isync from mainwindow to genft8.f90 and use these to determine the type of generated message, according to the scheme described in lib/77bit/NewCode.txt.

This commit is contained in:
Steve Franke 2018-07-03 14:37:50 -05:00
parent d6493a62fa
commit cf64cad091
6 changed files with 18 additions and 21 deletions

View File

@ -58,7 +58,7 @@ subroutine foxgen()
msg=cmsg(n)(1:i1)//cmsg(n)(i2+1:i3-2)//' ' msg=cmsg(n)(1:i1)//cmsg(n)(i2+1:i3-2)//' '
read(cmsg(n)(i4+2:i4+4),*) irpt read(cmsg(n)(i4+2:i4+4),*) irpt
endif endif
call genft8(msg,mygrid,bcontest,0,1,msgsent,msgbits,itone) call genft8(msg,mygrid,bcontest,0,1,1,msgsent,msgbits,itone)
! print*,'Foxgen:',n,cmsg(n),msgsent ! print*,'Foxgen:',n,cmsg(n),msgsent
if(i3b.eq.1) then if(i3b.eq.1) then

View File

@ -16,9 +16,10 @@ subroutine ft8apset(mycall12,mygrid6,hiscall12,hisgrid6,bcontest,apsym)
hisgrid=hisgrid6(1:4) hisgrid=hisgrid6(1:4)
if(index(hisgrid," ").eq.0) hisgrid="AA00" if(index(hisgrid," ").eq.0) hisgrid="AA00"
msg=mycall//' '//hiscall//' '//hisgrid msg=mycall//' '//hiscall//' '//hisgrid
i3=-1 ! ### TEMPORARY ??? ### i3=0 ! ### TEMPORARY ??? ###
n3=0 !TEMPORARY n3=0 !TEMPORARY
call genft8(msg,mygrid6,bcontest,i3,n3,msgsent,msgbits,itone) isync=1
call genft8(msg,mygrid6,bcontest,i3,n3,isync,msgsent,msgbits,itone)
apsym=2*msgbits-1 apsym=2*msgbits-1
return return
end subroutine ft8apset end subroutine ft8apset

View File

@ -381,9 +381,10 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
call extractmessage174(decoded,message,ncrcflag) call extractmessage174(decoded,message,ncrcflag)
decoded=decoded0 decoded=decoded0
! This needs fixing for messages with i3bit=1: ! This needs fixing for messages with i3bit=1:
i3=-1 !TEMPORARY i3=0 !TEMPORARY
n3=0 n3=0
call genft8(message,mygrid6,bcontest,i3,0,msgsent,msgbits,itone) isync=1
call genft8(message,mygrid6,bcontest,i3,n3,isync,msgsent,msgbits,itone)
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

View File

@ -1,4 +1,4 @@
subroutine genft8(msg,mygrid,bcontest,i3,n3,msgsent,msgbits,itone) subroutine genft8(msg,mygrid,bcontest,i3,n3,isync,msgsent,msgbits,itone)
! Encode an FT8 message, producing array itone(). ! Encode an FT8 message, producing array itone().
@ -17,17 +17,9 @@ subroutine genft8(msg,mygrid,bcontest,i3,n3,msgsent,msgbits,itone)
integer icos7(0:6) integer icos7(0:6)
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
itype=1 if(isync.eq.2 ) goto 900
if( ( i3.eq.0 .and. n3.ge.1) .or. i3.ge.1 ) itype=2
!write(*,*) 'generating type ',itype,' message' call packmsg(msg,i4Msg6BitWords,istdtype,bcontest) !Pack into 12 6-bit bytes
!write(*,*) 'msg ',msg,i3,n3
if(itype.eq.2 ) goto 900
i3=i3*i3
n3=n3*n3
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
write(cbits,1000) i4Msg6BitWords,32*i3 write(cbits,1000) i4Msg6BitWords,32*i3

View File

@ -77,7 +77,7 @@ extern "C" {
fortran_charlen_t); fortran_charlen_t);
// float s[], int* jh, char line[], char mygrid[], // float s[], int* jh, char line[], char mygrid[],
void genft8_(char* msg, char* MyGrid, bool* bcontest, int* i3, int* n3, char* msgsent, void genft8_(char* msg, char* MyGrid, bool* bcontest, int* i3, int* n3, int* isync, char* msgsent,
char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t, char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t,
fortran_charlen_t); fortran_charlen_t);
@ -3479,11 +3479,13 @@ void MainWindow::guiUpdate()
if(m_config.bFox() and ui->tabWidget->currentIndex()==2) { if(m_config.bFox() and ui->tabWidget->currentIndex()==2) {
foxTxSequencer(); foxTxSequencer();
} else { } else {
m_i3=-1; // Temporary!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! m_i3=0; // Temporary!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
m_n3=0; m_n3=0;
m_isync=1;
// if(m_config.bGenerate77()) m_isync=2;
char ft8msgbits[75 + 12]; //packed 75 bit ft8 message plus 12-bit CRC char ft8msgbits[75 + 12]; //packed 75 bit ft8 message plus 12-bit CRC
genft8_(message, MyGrid, &bcontest, &m_i3, &m_n3, msgsent, const_cast<char *> (ft8msgbits), genft8_(message, MyGrid, &bcontest, &m_i3, &m_n3, &m_isync, msgsent,
const_cast<int *> (itone), 22, 6, 22); const_cast<char *> (ft8msgbits), const_cast<int *> (itone), 22, 6, 22);
if(m_config.bFox()) { if(m_config.bFox()) {
QString fm = QString::fromStdString(message).trimmed(); QString fm = QString::fromStdString(message).trimmed();
foxGenWaveform(0,fm); foxGenWaveform(0,fm);

View File

@ -423,6 +423,7 @@ private:
qint32 m_wait; qint32 m_wait;
qint32 m_i3; qint32 m_i3;
qint32 m_n3; qint32 m_n3;
qint32 m_isync;
qint32 m_isort; qint32 m_isort;
qint32 m_max_dB; qint32 m_max_dB;
qint32 m_nDXped=0; qint32 m_nDXped=0;