Change formats of diagnostic writes so that GUI and Fortran output can be sorted together.

This commit is contained in:
Joe Taylor 2020-03-13 11:25:22 -04:00
parent fedb72a38c
commit 8151816c84
3 changed files with 38 additions and 18 deletions

View File

@ -38,6 +38,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
integer itime(8)
type(params_block) :: params
real*4 dd(NTMAX*12000)
real*8 tsec
character(len=20) :: datetime
character(len=12) :: mycall, hiscall
character(len=6) :: mygrid, hisgrid
@ -89,12 +90,16 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
! We're in FT8 mode
call date_and_time(values=itime)
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
tsec=3600.d0*(itime(5)-itime(4)/60.d0) + 60.d0*itime(6) + &
itime(7) + 0.001d0*itime(8)
tsec=mod(tsec+2*86400.d0,86400.d0)
tseq=mod(itime(7)+0.001*itime(8),15.0)
if(tseq.lt.9.0) tseq=tseq+15.0
if(params%nzhsym.eq.41) write(71,3001) ' '
write(71,3001) 'AA Start',params%nzhsym,nint(ss(1,1)), &
params%nutc,tsec
3001 format(a8,2i6,i8,f8.3,i6)
sec=itime(7)+0.001*itime(8)
write(71,3001) 'BB decoderStart',tsec,params%nzhsym,nint(ss(1,1)),tseq, &
itime(5)-itime(4)/60,itime(6),sec
3001 format(a15,f11.3,2i6,f8.3,i4.2,':',i2.2,':',f6.3,i6)
flush(71)
if(ncontest.eq.6) then
@ -303,10 +308,14 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
if(params%nmode.eq.4 .or. params%nmode.eq.65) close(14)
call date_and_time(values=itime)
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
write(71,3001) 'CC Done ',params%nzhsym,nint(ss(1,1)), &
params%nutc,tsec,ndecoded
tsec=3600.d0*(itime(5)-itime(4)/60.d0) + 60.d0*itime(6) + &
itime(7) + 0.001d0*itime(8)
tsec=mod(tsec+2*86400.d0,86400.d0)
tseq=mod(itime(7)+0.001*itime(8),15.0)
if(tseq.lt.9.0) tseq=tseq+15.0
sec=itime(7)+0.001*itime(8)
write(71,3001) 'DD decoderEnd ',tsec,params%nzhsym,nint(ss(1,1)),tseq, &
itime(5)-itime(4)/60,itime(6),sec,ndecoded
flush(71)
return

View File

@ -41,6 +41,7 @@ contains
class(ft8_decoder), intent(inout) :: this
procedure(ft8_decode_callback) :: callback
parameter (MAXCAND=300,MAX_EARLY=100)
real*8 tsec
real s(NH1,NHSYM)
real sbase(NH1)
real candidate(3,MAXCAND)
@ -182,10 +183,15 @@ contains
go to 800
700 call date_and_time(values=itime)
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
write(71,3001) 'BB Bail ',nzhsym,nint(ss0),nutc,tsec,ndecodes
3001 format(a8,2i6,i8,f8.3,i6)
tsec=3600.d0*(itime(5)-itime(4)/60.d0) + 60.d0*itime(6) + &
itime(7) + 0.001d0*itime(8)
tsec=mod(tsec+2*86400.d0,86400.d0)
tseq=mod(itime(7)+0.001*itime(8),15.0)
if(tseq.lt.9.0) tseq=tseq+15.0
sec=itime(7)+0.001*itime(8)
write(71,3001) 'CC Bailout ',tsec,nzhsym,nint(ss0),tseq, &
itime(5)-itime(4)/60,itime(6),sec,ndecodes
3001 format(a15,f11.3,2i6,f8.3,i4.2,':',i2.2,':',f6.3,i6)
flush(71)
800 ndec_early=0

View File

@ -3096,11 +3096,13 @@ void MainWindow::decode() //decode()
release_jt9 ();
auto now = QDateTime::currentDateTimeUtc();
double tseq = fmod(double(now.toMSecsSinceEpoch() ),1000.0*m_TRperiod)/1000.0;
double tsec = fmod(double(now.toMSecsSinceEpoch()),86400000.0)/1000.0;
double tseq = fmod(double(now.toMSecsSinceEpoch()),1000.0*m_TRperiod)/1000.0;
if(tseq < 0.5*m_TRperiod) tseq+= m_TRperiod;
if(m_ihsym==m_earlyDecode) qDebug() << "";
qDebug() << "aa Start" << m_ihsym
<< QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << tseq;
QString t="";
t.sprintf("aa release_jt9 %11.3f %5d %5d %7.3f ",tsec,m_ihsym,m_ihsym,tseq);
qDebug().noquote() << t << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz");
decodeBusy(true);
}
}
@ -3177,10 +3179,13 @@ void MainWindow::decodeDone ()
if(SpecOp::FOX == m_config.special_op_id()) houndCallers();
auto now = QDateTime::currentDateTimeUtc();
double tsec = fmod(double(now.toMSecsSinceEpoch()),86400000.0)/1000.0;
double tseq = fmod(double(now.toMSecsSinceEpoch() ),1000.0*m_TRperiod)/1000.0;
if(tseq < 0.5*m_TRperiod) tseq+= m_TRperiod;
qDebug() << "bb Done " << m_ihsym
<< QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << tseq;
QString t="";
t.sprintf("ee decodeDone %11.3f %5d %5d %7.3f ",tsec,m_ihsym,m_ihsym,tseq);
qDebug().noquote() << t << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz");
}
void MainWindow::readFromStdout() //readFromStdout