Initial experiment of no timing requirement
This commit is contained in:
parent
76dfd50e74
commit
fc40bf74a3
@ -97,6 +97,7 @@ extern struct dec_data {
|
||||
int nfSplit; // JT65 | JT9 split frequency
|
||||
int nfb; // High decode limit (Hz) (filter max)
|
||||
int ntol; // +/- decoding range around fQSO (Hz)
|
||||
bool synconly; // only compute sync candidates
|
||||
int kin; // number of frames written to d2
|
||||
int kposA; // starting position of decode for submode A
|
||||
int kposB; // starting position of decode for submode B
|
||||
|
@ -177,10 +177,21 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
write(*,*) '<DecodeDebug> mode A decode started'
|
||||
|
||||
! copy the relevant frames for decoding
|
||||
pos = max(0,params%kposA)
|
||||
sz = max(0,params%kszA)
|
||||
pos = int(max(0,params%kposA))
|
||||
sz = int(max(0,params%kszA))
|
||||
id0=0
|
||||
id0(1:sz+1)=id2(pos+1:pos+sz+1)
|
||||
imax=int(NTMAX*12000)
|
||||
|
||||
if((imax-pos).lt.sz) then
|
||||
! this means that the first part of the id0 is at the end of the buffer
|
||||
! and the second half is at the beginning of the buffer
|
||||
firstsize=int(imax-pos)-1
|
||||
secondsize=int(sz-firstsize)+1
|
||||
id0(1:firstsize+1)=id2(pos+1:pos+firstsize+1)
|
||||
id0(firstsize+1:firstsize+secondsize+1)=id2(1:secondsize+1)
|
||||
else
|
||||
id0(1:sz+1)=id2(pos+1:pos+sz+1)
|
||||
endif
|
||||
|
||||
call my_js8a%decode(js8a_decoded,id0,params%nQSOProgress,params%nfqso, &
|
||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||
|
@ -21,8 +21,8 @@ program jt9
|
||||
!### ndepth was defined as 60001. Why???
|
||||
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, &
|
||||
fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=1,nexp_decode=0
|
||||
logical :: read_files = .true., tx9 = .false., display_help = .false.
|
||||
type (option) :: long_options(21) = [ &
|
||||
logical :: read_files = .true., tx9 = .false., display_help = .false., synconly = .false.
|
||||
type (option) :: long_options(22) = [ &
|
||||
option ('help', .false., 'h', 'Display this help message', ''), &
|
||||
option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), &
|
||||
option ('tr-period', .true., 'p', 'Tx/Rx period, default MINUTES=1', &
|
||||
@ -50,6 +50,7 @@ program jt9
|
||||
!option ('jt65', .false., '6', 'JT65 mode', ''), &
|
||||
!option ('jt9', .false., '9', 'JT9 mode', ''), &
|
||||
option ('js8', .false., '8', 'JS8 mode', ''), &
|
||||
option ('synconly', .false., 'y', 'Sync only', ''), &
|
||||
!option ('jt4', .false., '4', 'JT4 mode', ''), &
|
||||
!option ('qra64', .false., 'q', 'QRA64 mode', ''), &
|
||||
option ('sub-mode', .true., 'b', 'Sub mode, default SUBMODE=A', 'A'), &
|
||||
@ -118,6 +119,8 @@ program jt9
|
||||
! if (mode.lt.9.or.mode.eq.65) mode = mode + 9
|
||||
case ('8')
|
||||
mode = 8
|
||||
case ('y')
|
||||
synconly = .true.
|
||||
case ('T')
|
||||
tx9 = .true.
|
||||
case ('w')
|
||||
@ -254,6 +257,7 @@ program jt9
|
||||
shared_data%params%ljt65apon=.true.
|
||||
shared_data%params%napwid=75
|
||||
shared_data%params%dttol=3.
|
||||
shared_data%params%synconly=synconly
|
||||
|
||||
! shared_data%params%minsync=0 !### TEST ONLY
|
||||
! shared_data%params%nfqso=1500 !### TEST ONLY
|
||||
|
@ -18,6 +18,7 @@
|
||||
integer(c_int) :: nfsplit
|
||||
integer(c_int) :: nfb
|
||||
integer(c_int) :: ntol
|
||||
logical(c_bool) :: synconly
|
||||
integer(c_int) :: kin
|
||||
integer(c_int) :: kposA
|
||||
integer(c_int) :: kposB
|
||||
|
@ -4266,6 +4266,27 @@ bool MainWindow::decodeEnqueueReady(qint32 k, qint32 k0){
|
||||
// enqueue those decodes that are "ready"
|
||||
// on an interval, issue a decode
|
||||
|
||||
static qint32 lastDecodeStartA = -1;
|
||||
qint32 startA = -1;
|
||||
qint32 szA = -1;
|
||||
qint32 cycleA = -1;
|
||||
bool couldDecodeA = false;
|
||||
qint32 oneSecondFrames = computeFramesPerCycleForDecode(Varicode::JS8CallNormal)/computePeriodForSubmode(Varicode::JS8CallNormal);
|
||||
if(lastDecodeStartA == -1 || k < k0 || k - lastDecodeStartA > oneSecondFrames){
|
||||
startA = k-computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
||||
|
||||
if(startA < 0){
|
||||
// TODO: decoder doesn't copy wrap around ranges
|
||||
startA += m_detector->period() * RX_SAMPLE_RATE;
|
||||
}
|
||||
|
||||
szA = computeFramesNeededForDecode(Varicode::JS8CallNormal);
|
||||
lastDecodeStartA = k;
|
||||
couldDecodeA = true;
|
||||
qDebug() << "? NORMAL " << startA << k << k0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static qint32 currentDecodeStartA = -1;
|
||||
static qint32 nextDecodeStartA = -1;
|
||||
qint32 startA = -1;
|
||||
@ -4278,6 +4299,7 @@ bool MainWindow::decodeEnqueueReady(qint32 k, qint32 k0){
|
||||
szA = NTMAX*RX_SAMPLE_RATE-1;
|
||||
couldDecodeA = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static qint32 currentDecodeStartB = -1;
|
||||
static qint32 nextDecodeStartB = -1;
|
||||
@ -4335,6 +4357,9 @@ bool MainWindow::decodeEnqueueReady(qint32 k, qint32 k0){
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
couldDecodeB = couldDecodeC = couldDecodeE = false;
|
||||
|
||||
int decodes = 0;
|
||||
|
||||
if(couldDecodeA){
|
||||
@ -4699,7 +4724,13 @@ void MainWindow::decodeDone ()
|
||||
m_nclearave=0;
|
||||
m_RxLog=0;
|
||||
m_blankLine=true;
|
||||
m_messageDupeCache.clear();
|
||||
|
||||
static int dupeClearI = 0;
|
||||
if(dupeClearI > 2*m_TRperiod){
|
||||
m_messageDupeCache.clear();
|
||||
dupeClearI = 0;
|
||||
}
|
||||
dupeClearI++;
|
||||
|
||||
decodeBusy(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user