Work toward display of q3list in Active Stations Window.

This commit is contained in:
Joe Taylor 2023-02-16 16:50:24 -05:00
parent 20199c33b9
commit 5cdc476cbc
7 changed files with 80 additions and 10 deletions

View File

@ -327,6 +327,7 @@ set (wsjt_FSRCS
lib/ft8_decode.f90
lib/ft4_decode.f90
lib/fst4_decode.f90
lib/get_q3list.f90
lib/jt9_decode.f90
lib/options.f90
lib/packjt.f90

36
lib/get_q3list.f90 Normal file
View File

@ -0,0 +1,36 @@
subroutine get_q3list(fname,nlist,list)
type q3list
character*6 call
character*4 grid
integer nsec
integer nfreq
end type q3list
parameter (MAX_CALLERS=40)
character*(*) fname
character*36 list(40)
integer time
integer indx(MAX_CALLERS)
type(q3list) callers(MAX_CALLERS)
nhist2=0
open(24,file=fname,status='unknown',form='unformatted')
read(24,end=1) nhist2,callers(1:nhist2)
1 close(24)
moon_el=0
now=time()
nlist=nhist2
call indexx(callers(1:nlist)%nfreq,nlist,indx)
do i=1,nlist
hours=(now - callers(i)%nsec)/3600.0
j=indx(i)
write(list(i),1000) i,callers(j)%nfreq,callers(j)%call, &
callers(j)%grid,moon_el,hours,char(0)
1000 format(i2,'.',i6,2x,a6,2x,a4,i5,f7.1,a1)
enddo
return
end subroutine get_q3list

View File

@ -125,10 +125,11 @@ contains
nhist2=nhist2-1
endif
enddo
2 close(24)
endif
! Determine the T/R sequence: iseq=0 (even), or iseq=1 (odd)
2 n=nutc
n=nutc
if(ntrperiod.ge.60 .and. nutc.le.2359) n=100*n
write(cutc,'(i6.6)') n
read(cutc,'(3i2)') ih,im,is
@ -326,7 +327,10 @@ contains
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
idec,nused,ntrperiod)
if(ncontest.eq.1) then
call q65_hist2(decoded,callers,nhist2)
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
form='unformatted')
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
close(24)
else
call q65_hist(nint(f0dec),msg0=decoded)
endif
@ -440,7 +444,10 @@ contains
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
idec,nused,ntrperiod)
if(ncontest.eq.1) then
call q65_hist2(decoded,callers,nhist2)
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
form='unformatted')
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
close(24)
else
call q65_hist(nint(f0dec),msg0=decoded)
endif
@ -473,9 +480,8 @@ contains
800 continue
enddo ! icand
if(iavg.eq.0 .and.navg(iseq).ge.2 .and. iand(ndepth,16).ne.0) go to 50
900 close(24)
if(ncontest.ne.1 .or. lagain) go to 999
900 if(ncontest.ne.1 .or. lagain) go to 999
if(ntrperiod.ne.60 .or. nsubmode.ne.0) go to 999
! This is first time here, and we're running Q65-60A in NA VHF Contest mode.

View File

@ -866,7 +866,7 @@ subroutine q65_hist(if0,msg0,dxcall,dxgrid)
900 return
end subroutine q65_hist
subroutine q65_hist2(msg0,callers,nhist2)
subroutine q65_hist2(nfreq,msg0,callers,nhist2)
use types
parameter (MAX_CALLERS=40) !For multiple q3 decodes in NA VHf Contest mode
@ -912,9 +912,8 @@ subroutine q65_hist2(msg0,callers,nhist2)
callers(nhist2)%call=c6
callers(nhist2)%grid=g4
callers(nhist2)%nsec=time()
rewind(24)
callers(nhist2)%nfreq=nfreq
write(24) nhist2,callers(1:nhist2)
rewind(24)
endif
900 return

View File

@ -11,6 +11,7 @@ module types
character*6 call
character*4 grid
integer nsec
integer nfreq
end type q3list
end module types

View File

@ -60,14 +60,17 @@ void ActiveStations::write_settings ()
void ActiveStations::displayRecentStations(QString mode, QString const& t)
{
m_mode=mode;
bool b=(m_mode=="Q65");
if(b) {
if(m_mode=="Q65") {
ui->header_label2->setText(" N Frx Fsked S/N Call Grid Tx Age");
ui->label->setText("QSOs:");
} else if(m_mode=="Q65-pileup") {
ui->header_label2->setText(" N Freq Call Grid El Age(h)");
} else {
ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
ui->label->setText("Rate:");
}
bool b=(m_mode.left(3)=="Q65");
ui->bandChanges->setVisible(!b);
ui->cbReadyOnly->setVisible(!b);
ui->label_2->setVisible(!b);

View File

@ -185,6 +185,8 @@ extern "C" {
void save_dxbase_(char* dxbase, FCL len);
void indexx_(float arr[], int* n, int indx[]);
void get_q3list_(char* fname, int* nlist, char* list, FCL len1, FCL len2);
}
int volatile itone[MAX_NUM_SYMBOLS]; //Audio tones for all Tx symbols
@ -3556,6 +3558,28 @@ void MainWindow::decodeDone ()
ARRL_Digi_Display(); // Update the ARRL_DIGI display
}
if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
if(m_mode=="Q65" and (m_specOp==SpecOp::NA_VHF or m_specOp==SpecOp::ARRL_DIGI
or m_specOp==SpecOp::WW_DIGI) and m_ActiveStationsWidget!=NULL) {
int nlist=0;
char list[2000];
char line[36];
list[0]=0;
// QString t="1200 W9XYZ EN37";
auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("tsil.3q"))};
// morse_(const_cast<char *> (m_config.my_callsign ().toLatin1().constData()),
// const_cast<int *> (icw), &m_ncw, (FCL)m_config.my_callsign().length());
get_q3list_(const_cast<char *> (fname.toLatin1().constData()), &nlist,
&list[0], (FCL)fname.length(), (FCL)2000);
QString t="";
for(int i=0; i<nlist; i++) {
memcpy(line,&list[36*i],36);
t+=QString::fromLatin1(line)+"\n";
}
m_ActiveStationsWidget->displayRecentStations("Q65-pileup",t);
}
}
void MainWindow::read_log()