mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 10:22:26 -04:00
Ctrl-click to delete a call from the Q65-pileup list. Not finished!
This commit is contained in:
parent
0493d03485
commit
f15ad2b9a2
@ -5,6 +5,7 @@ subroutine get_q3list(fname,bDiskData,nlist,list)
|
|||||||
character*4 grid
|
character*4 grid
|
||||||
integer nsec
|
integer nsec
|
||||||
integer nfreq
|
integer nfreq
|
||||||
|
integer moonel
|
||||||
end type q3list
|
end type q3list
|
||||||
|
|
||||||
parameter (MAX_CALLERS=40)
|
parameter (MAX_CALLERS=40)
|
||||||
@ -15,51 +16,121 @@ subroutine get_q3list(fname,bDiskData,nlist,list)
|
|||||||
integer time
|
integer time
|
||||||
integer nt(8)
|
integer nt(8)
|
||||||
integer indx(MAX_CALLERS)
|
integer indx(MAX_CALLERS)
|
||||||
type(q3list) callers(MAX_CALLERS)
|
type(q3list) ctmp(MAX_CALLERS),callers(MAX_CALLERS)
|
||||||
character*256 jpleph_file_name
|
character*256 jpleph_file_name,file24name
|
||||||
common/jplcom/jpleph_file_name
|
common/jplcom/jpleph_file_name
|
||||||
|
common/lu24com/file24name
|
||||||
|
|
||||||
nhist2=0
|
nhist2=0
|
||||||
open(24,file=fname,status='unknown',form='unformatted')
|
! open(24,file=fname,status='unknown',form='unformatted')
|
||||||
read(24,end=1) nhist2
|
open(24,file=fname,status='unknown')
|
||||||
|
! read(24,end=1) nhist2
|
||||||
|
read(24,*,end=1) nhist2
|
||||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||||
read(24,end=1) callers(1:nhist2)
|
! read(24,end=1) ctmp(1:nhist2)
|
||||||
|
read(24,3001,end=1) ctmp(1:nhist2)
|
||||||
|
3001 format(a6,2x,a4,2x,i11,2i5)
|
||||||
else
|
else
|
||||||
nhist2=0
|
nhist2=0
|
||||||
endif
|
endif
|
||||||
1 close(24)
|
1 rewind 24
|
||||||
|
if(nhist2.eq.0) go to 900
|
||||||
|
|
||||||
now=time()
|
now=time()
|
||||||
call date_and_time(values=nt)
|
call date_and_time(values=nt)
|
||||||
uth=nt(5) + (nt(6)-nt(4))/60.0 + nt(7)/3600.0
|
uth=nt(5) + (nt(6)-nt(4))/60.0 + nt(7)/3600.0
|
||||||
nlist=nhist2
|
j=0
|
||||||
call indexx(callers(1:nlist)%nfreq,nlist,indx)
|
|
||||||
do i=1,nlist
|
do i=1,nhist2
|
||||||
age=(now - callers(i)%nsec)/3600.0
|
age=(now - ctmp(i)%nsec)/3600.0
|
||||||
j=indx(i)
|
if(age.gt.24.0) cycle
|
||||||
grid6=callers(j)%grid//'mm'
|
grid6=ctmp(i)%grid//'mm'
|
||||||
call grid2deg(grid6,xlon,xlat)
|
call grid2deg(grid6,xlon,xlat)
|
||||||
call sun(nt(1),nt(2),nt(3),uth,-xlon,xlat,RASun,DecSun,xLST, &
|
call sun(nt(1),nt(2),nt(3),uth,-xlon,xlat,RASun,DecSun,xLST, &
|
||||||
AzSun,ElSun,mjd,day)
|
AzSun,ElSun,mjd,day)
|
||||||
call moondopjpl(nt(1),nt(2),nt(3),uth,-xlon,xlat,RAMoon,DecMoon, &
|
call moondopjpl(nt(1),nt(2),nt(3),uth,-xlon,xlat,RAMoon,DecMoon, &
|
||||||
xLST,HA,AzMoon,ElMoon,vr,techo)
|
xLST,HA,AzMoon,ElMoon,vr,techo)
|
||||||
|
if(ElMoon.lt.0.0 .and. (.not.bDiskData)) cycle
|
||||||
|
j=j+1 !Keep this one...
|
||||||
|
callers(j)=ctmp(i)
|
||||||
|
callers(j)%moonel=nint(ElMoon) !... and save its current moonel
|
||||||
|
enddo
|
||||||
|
|
||||||
|
nhist2=j
|
||||||
|
! write(24) nhist2
|
||||||
|
write(24,*) nhist2
|
||||||
|
! write(24) callers(1:nhist2)
|
||||||
|
write(24,3001) callers(1:nhist2)
|
||||||
|
|
||||||
|
call indexx(callers(1:nhist2)%nfreq,nhist2,indx)
|
||||||
|
do i=1,nhist2
|
||||||
|
j=indx(i)
|
||||||
moon_el=nint(ElMoon)
|
moon_el=nint(ElMoon)
|
||||||
|
age=(now - callers(j)%nsec)/3600.0
|
||||||
write(list(i),1000) i,callers(j)%nfreq,callers(j)%call, &
|
write(list(i),1000) i,callers(j)%nfreq,callers(j)%call, &
|
||||||
callers(j)%grid,moon_el,age,char(0)
|
callers(j)%grid,callers(j)%moonel,age,char(0)
|
||||||
1000 format(i2,'.',i6,2x,a6,2x,a4,i5,f7.1,a1)
|
1000 format(i2,'.',i6,2x,a6,2x,a4,i5,f7.1,a1)
|
||||||
|
|
||||||
h1=mod(now,86400)/3600.0
|
! h1=mod(now,86400)/3600.0
|
||||||
h2=mod(callers(i)%nsec,86400)/3600.0
|
! h2=mod(callers(i)%nsec,86400)/3600.0
|
||||||
hd=h1-h2
|
! hd=h1-h2
|
||||||
if(hd.lt.0.0) hd=hd+24.0
|
! if(hd.lt.0.0) hd=hd+24.0
|
||||||
! write(*,3301) i,callers(i)%call,now,callers(i)%nsec,h1,h2,hd
|
! write(*,3301) i,callers(i)%call,now,callers(i)%nsec,h1,h2,hd
|
||||||
!3301 format(i3,2x,a6,2i12,3f10.6)
|
!3301 format(i3,2x,a6,2i12,3f10.6)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
900 close(24)
|
||||||
|
nlist=nhist2
|
||||||
|
file24name=fname
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine get_q3list
|
end subroutine get_q3list
|
||||||
|
|
||||||
|
subroutine rm_q3list(dxcall0)
|
||||||
|
|
||||||
|
parameter (MAX_CALLERS=40)
|
||||||
|
type q3list
|
||||||
|
character*6 call
|
||||||
|
character*4 grid
|
||||||
|
integer nsec
|
||||||
|
integer nfreq
|
||||||
|
integer moonel
|
||||||
|
end type q3list
|
||||||
|
character*(*) dxcall0
|
||||||
|
character*6 dxcall
|
||||||
|
character*256 file24name
|
||||||
|
type(q3list) callers(MAX_CALLERS)
|
||||||
|
common/lu24com/file24name
|
||||||
|
|
||||||
|
dxcall=dxcall0
|
||||||
|
open(24,file=trim(file24name),status='unknown')
|
||||||
|
read(24,*) nhist2
|
||||||
|
read(24,3001) callers(1:nhist2)
|
||||||
|
3001 format(a6,2x,a4,2x,i11,2i5)
|
||||||
|
|
||||||
|
if(nhist2.eq.MAX_CALLERS .and. dxcall.eq.callers(nhist2)%call) then
|
||||||
|
nhist2=MAX_CALLERS - 1
|
||||||
|
go to 10
|
||||||
|
endif
|
||||||
|
|
||||||
|
iz=nhist2
|
||||||
|
do i=1,iz
|
||||||
|
if(callers(i)%call .eq. dxcall) then
|
||||||
|
nhist2=nhist2-1
|
||||||
|
callers(i:nhist2)=callers(i+1:nhist2+1) !Remove dxcall from q3list
|
||||||
|
exit
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
10 rewind 24
|
||||||
|
write(24,*) nhist2
|
||||||
|
write(24,3001) callers(1:nhist2)
|
||||||
|
close(24)
|
||||||
|
|
||||||
|
return
|
||||||
|
end subroutine rm_q3list
|
||||||
|
|
||||||
subroutine jpl_setup(fname)
|
subroutine jpl_setup(fname)
|
||||||
character*256 fname,jpleph_file_name
|
character*256 fname,jpleph_file_name
|
||||||
common/jplcom/jpleph_file_name
|
common/jplcom/jpleph_file_name
|
||||||
|
@ -114,11 +114,15 @@ contains
|
|||||||
mycall13=mycall
|
mycall13=mycall
|
||||||
if(ncontest.eq.1) then
|
if(ncontest.eq.1) then
|
||||||
! NA VHF, WW-Digi, or ARRL Digi Contest
|
! NA VHF, WW-Digi, or ARRL Digi Contest
|
||||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
! open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
||||||
form='unformatted')
|
! form='unformatted')
|
||||||
read(24,end=2) nhist2
|
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown')
|
||||||
|
! read(24,end=2) nhist2
|
||||||
|
read(24,*,end=2) nhist2
|
||||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||||
read(24,end=2) callers(1:nhist2)
|
! read(24,end=2) callers(1:nhist2)
|
||||||
|
read(24,3001,end=2) callers(1:nhist2)
|
||||||
|
3001 format(a6,2x,a4,2x,i11,2i5)
|
||||||
now=time()
|
now=time()
|
||||||
do i=1,nhist2
|
do i=1,nhist2
|
||||||
hours=(now - callers(i)%nsec)/3600.0
|
hours=(now - callers(i)%nsec)/3600.0
|
||||||
@ -331,10 +335,7 @@ contains
|
|||||||
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
|
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
|
||||||
idec,nused,ntrperiod)
|
idec,nused,ntrperiod)
|
||||||
if(ncontest.eq.1) then
|
if(ncontest.eq.1) then
|
||||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
|
||||||
form='unformatted')
|
|
||||||
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
|
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
|
||||||
close(24)
|
|
||||||
else
|
else
|
||||||
call q65_hist(nint(f0dec),msg0=decoded)
|
call q65_hist(nint(f0dec),msg0=decoded)
|
||||||
endif
|
endif
|
||||||
@ -446,10 +447,7 @@ contains
|
|||||||
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
|
call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, &
|
||||||
idec,nused,ntrperiod)
|
idec,nused,ntrperiod)
|
||||||
if(ncontest.eq.1) then
|
if(ncontest.eq.1) then
|
||||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
|
||||||
form='unformatted')
|
|
||||||
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
|
call q65_hist2(nint(f0dec),decoded,callers,nhist2)
|
||||||
close(24)
|
|
||||||
else
|
else
|
||||||
call q65_hist(nint(f0dec),msg0=decoded)
|
call q65_hist(nint(f0dec),msg0=decoded)
|
||||||
endif
|
endif
|
||||||
|
@ -914,10 +914,12 @@ subroutine q65_hist2(nfreq,msg0,callers,nhist2)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if(nhist2.ge.1 .and. nhist2.le.40) then
|
if(nhist2.ge.1 .and. nhist2.le.40) then
|
||||||
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
! open(24,file=trim(data_dir)//'/tsil.3q',status='unknown', &
|
||||||
form='unformatted')
|
! form='unformatted')
|
||||||
write(24) nhist2
|
open(24,file=trim(data_dir)//'/tsil.3q',status='unknown')
|
||||||
write(24) callers(1:nhist2)
|
write(24,*) nhist2
|
||||||
|
write(24,3001) callers(1:nhist2)
|
||||||
|
3001 format(a6,2x,a4,2x,i11,2i5)
|
||||||
close(24)
|
close(24)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ module types
|
|||||||
character*4 grid
|
character*4 grid
|
||||||
integer nsec
|
integer nsec
|
||||||
integer nfreq
|
integer nfreq
|
||||||
|
integer moonel
|
||||||
end type q3list
|
end type q3list
|
||||||
|
|
||||||
end module types
|
end module types
|
||||||
|
@ -83,6 +83,7 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
|||||||
ui->label->setVisible(b);
|
ui->label->setVisible(b);
|
||||||
ui->rate->setVisible(b);
|
ui->rate->setVisible(b);
|
||||||
}
|
}
|
||||||
|
if(mode=="Q65-pileup") ui->RecentStationsPlainTextEdit->clear();
|
||||||
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +188,8 @@ extern "C" {
|
|||||||
|
|
||||||
void get_q3list_(char* fname, bool* bDiskData, int* nlist, char* list, FCL len1, FCL len2);
|
void get_q3list_(char* fname, bool* bDiskData, int* nlist, char* list, FCL len1, FCL len2);
|
||||||
|
|
||||||
|
void rm_q3list_(char* callsign, FCL len);
|
||||||
|
|
||||||
void jpl_setup_(char* fname, FCL len);
|
void jpl_setup_(char* fname, FCL len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3469,8 +3471,10 @@ void MainWindow::decode() //decode()
|
|||||||
decodeBusy(true);
|
decodeBusy(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData or m_mode=="Q65") and
|
if((m_mode=="FT4" or (m_mode=="FT8" and m_ihsym==41) or m_diskData) and
|
||||||
m_ActiveStationsWidget != NULL) m_ActiveStationsWidget->erase(); //TEMP
|
m_ActiveStationsWidget != NULL) {
|
||||||
|
if(m_mode!="Q65") m_ActiveStationsWidget->erase(); //TEMP
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void::MainWindow::fast_decode_done()
|
void::MainWindow::fast_decode_done()
|
||||||
@ -3782,14 +3786,19 @@ void MainWindow::ARRL_Digi_Display()
|
|||||||
|
|
||||||
void MainWindow::callSandP2(int n)
|
void MainWindow::callSandP2(int n)
|
||||||
{
|
{
|
||||||
bool bHoldFreq = (n<0);
|
bool bCtrl = (n<0);
|
||||||
n=qAbs(n)-1;
|
n=qAbs(n)-1;
|
||||||
if(m_mode!="Q65" and m_ready2call[n]=="") return;
|
if(m_mode!="Q65" and m_ready2call[n]=="") return;
|
||||||
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
|
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
|
||||||
if(m_mode=="Q65" and m_specOp==SpecOp::Q65_PILEUP and n <= m_callers->size()) {
|
if(m_mode=="Q65" and m_specOp==SpecOp::Q65_PILEUP and n <= m_callers->size()) {
|
||||||
// This is the mode for 6m EME DXpeditions
|
// This code is for 6m EME DXpedition operator
|
||||||
w=m_callers[n].split(' ', SkipEmptyParts);
|
w=m_callers[n].split(' ', SkipEmptyParts);
|
||||||
m_deCall=w[2];
|
m_deCall=w[2];
|
||||||
|
if(bCtrl) {
|
||||||
|
// Remove this call from q3list.
|
||||||
|
rm_q3list_(const_cast<char *> (m_deCall.toLatin1().constData()), m_deCall.size());
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_deGrid=w[3];
|
m_deGrid=w[3];
|
||||||
m_bDoubleClicked=true; //### needed?
|
m_bDoubleClicked=true; //### needed?
|
||||||
m_txFirst=true;
|
m_txFirst=true;
|
||||||
@ -3804,7 +3813,7 @@ void MainWindow::callSandP2(int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(m_mode=="Q65") {
|
if(m_mode=="Q65") {
|
||||||
if(!bHoldFreq) {
|
if(!bCtrl) { //Do not reset m_freqNominal if CTRL was down
|
||||||
double kHz=w[1].toDouble();
|
double kHz=w[1].toDouble();
|
||||||
int nMHz=m_freqNominal/1000000;
|
int nMHz=m_freqNominal/1000000;
|
||||||
m_freqNominal=(nMHz*1000 + kHz)* 1000;
|
m_freqNominal=(nMHz*1000 + kHz)* 1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user