mirror of https://github.com/saitohirga/WSJT-X.git
New format for end-of-line flags in JT4 and JT65; starting work on
establishing sync in JT4. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6685 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
21283cd475
commit
1531f3ad3b
|
@ -142,7 +142,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||||
contains
|
contains
|
||||||
|
|
||||||
subroutine jt4_decoded(this,snr,dt,freq,have_sync,sync,is_deep, &
|
subroutine jt4_decoded(this,snr,dt,freq,have_sync,sync,is_deep, &
|
||||||
decoded,qual,ich,is_average,ave)
|
decoded0,qual,ich,is_average,ave)
|
||||||
implicit none
|
implicit none
|
||||||
class(jt4_decoder), intent(inout) :: this
|
class(jt4_decoder), intent(inout) :: this
|
||||||
integer, intent(in) :: snr
|
integer, intent(in) :: snr
|
||||||
|
@ -151,45 +151,35 @@ contains
|
||||||
logical, intent(in) :: have_sync
|
logical, intent(in) :: have_sync
|
||||||
logical, intent(in) :: is_deep
|
logical, intent(in) :: is_deep
|
||||||
character(len=1), intent(in) :: sync
|
character(len=1), intent(in) :: sync
|
||||||
character(len=22), intent(in) :: decoded
|
character(len=22), intent(in) :: decoded0
|
||||||
real, intent(in) :: qual
|
real, intent(in) :: qual
|
||||||
integer, intent(in) :: ich
|
integer, intent(in) :: ich
|
||||||
logical, intent(in) :: is_average
|
logical, intent(in) :: is_average
|
||||||
integer, intent(in) :: ave
|
integer, intent(in) :: ave
|
||||||
|
|
||||||
character*2 :: cqual
|
character*22 decoded
|
||||||
|
character*3 cflags
|
||||||
|
|
||||||
! write(*,3001) 'A',have_sync,is_deep,is_average,int(qual),ave,decoded
|
|
||||||
!3001 format(a1,3L2,2i4,1x,a22)
|
|
||||||
if (have_sync) then
|
if (have_sync) then
|
||||||
write(cqual, '(i2)') int(qual)
|
decoded=decoded0
|
||||||
if(int(qual).eq.99) cqual=' f'
|
! write(*,3001) 'A',is_deep,is_average,int(qual),ave,decoded
|
||||||
if (int(qual).gt.0) then
|
!3001 format(a1,2L2,2i4,1x,a22)
|
||||||
if (ave.gt.0) then
|
cflags='f '
|
||||||
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cqual, &
|
if(is_deep) then
|
||||||
char(ichar('A')+ich-1),ave
|
cflags(1:2)='d1'
|
||||||
else
|
write(cflags(3:3),'(i1)') min(int(qual),9)
|
||||||
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cqual, &
|
if(qual.ge.10.0) cflags(3:3)='*'
|
||||||
char(ichar('A')+ich-1)
|
if(qual.lt.3.0) decoded(22:22)='?'
|
||||||
end if
|
endif
|
||||||
else
|
if(is_average) then
|
||||||
if (ave.gt.0) then
|
write(cflags(2:2),'(i1)') min(ave,9)
|
||||||
if(int(qual).eq.99) cqual=' f'
|
if(ave.ge.10) cflags(2:2)='*'
|
||||||
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cqual, &
|
endif
|
||||||
char(ichar('A')+ich-1),ave
|
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cflags
|
||||||
else
|
1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,1x,a3)
|
||||||
if(int(qual).le.0) then
|
|
||||||
write(*,1000) params%nutc,snr,dt,freq,sync
|
|
||||||
else
|
|
||||||
write(*,1000) params%nutc,snr,dt,freq,sync,decoded,cqual, &
|
|
||||||
char(ichar('A')+ich-1)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
end if
|
|
||||||
else
|
else
|
||||||
write(*,1000) params%nutc,snr,dt,freq
|
write(*,1000) params%nutc,snr,dt,freq
|
||||||
end if
|
end if
|
||||||
1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,a2,1x,a1,i3)
|
|
||||||
|
|
||||||
select type(this)
|
select type(this)
|
||||||
type is (counting_jt4_decoder)
|
type is (counting_jt4_decoder)
|
||||||
|
@ -238,28 +228,28 @@ contains
|
||||||
integer, intent(in) :: minsync
|
integer, intent(in) :: minsync
|
||||||
|
|
||||||
integer i,n
|
integer i,n
|
||||||
character*5 ctail,decoded*22,csync*2
|
logical have_sync,is_deep,is_average
|
||||||
character*36 c
|
character decoded*22,csync*2,cflags*3
|
||||||
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
|
|
||||||
|
|
||||||
!$omp critical(decode_results)
|
!$omp critical(decode_results)
|
||||||
decoded=decoded0
|
decoded=decoded0
|
||||||
if(ft.eq.0 .and. minsync.ge.0 .and. int(sync).lt.minsync) then
|
if(ft.eq.0 .and. minsync.ge.0 .and. int(sync).lt.minsync) then
|
||||||
write(*,1010) params%nutc,snr,dt,freq
|
write(*,1010) params%nutc,snr,dt,freq
|
||||||
else
|
else
|
||||||
ctail=' '
|
cflags=' '
|
||||||
|
is_deep=ft.eq.2
|
||||||
|
is_average=nsum.ge.2
|
||||||
if(params%naggressive.gt.0 .and. ft.gt.0) then
|
if(params%naggressive.gt.0 .and. ft.gt.0) then
|
||||||
ctail(1:1)='d'
|
cflags='f '
|
||||||
if(ft.eq.1) ctail(1:1)='f'
|
if(is_deep) then
|
||||||
n=max(2,nsum+1)
|
cflags(1:2)='d1'
|
||||||
n=min(n,36)
|
write(cflags(3:3),'(i1)') min(qual,9)
|
||||||
ctail(2:2)=c(n:n)
|
if(qual.ge.10) cflags(3:3)='*'
|
||||||
n=min(nsmo+1,36)
|
if(qual.lt.3) decoded(22:22)='?'
|
||||||
if(params%nsubmode.gt.0) ctail(3:3)=c(n:n)
|
endif
|
||||||
if(ft.eq.2) then
|
if(is_average) then
|
||||||
ctail(5:5)='*'
|
write(cflags(2:2),'(i1)') min(nsum,9)
|
||||||
if(qual.le.9) ctail(5:5)=char(48+qual)
|
if(nsum.ge.10) cflags(2:2)='*'
|
||||||
if(qual.lt.3) decoded(21:21)='?'
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
csync='# '
|
csync='# '
|
||||||
|
@ -273,14 +263,13 @@ contains
|
||||||
do i=22,1,-1
|
do i=22,1,-1
|
||||||
if(decoded(i:i).ne.' ') exit
|
if(decoded(i:i).ne.' ') exit
|
||||||
enddo
|
enddo
|
||||||
! write(*,*) 'C',i,decoded
|
|
||||||
if(i.gt.18) i=18
|
if(i.gt.18) i=18
|
||||||
decoded(i+2:i+4)='OOO'
|
decoded(i+2:i+4)='OOO'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,ctail
|
write(*,1010) params%nutc,snr,dt,freq,csync,decoded,cflags
|
||||||
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,a5)
|
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,1x,a3)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift, &
|
write(13,1012) params%nutc,nint(sync),snr,dt,float(freq),drift, &
|
||||||
|
|
|
@ -62,7 +62,7 @@ contains
|
||||||
character(len=6), intent(in) :: hisgrid
|
character(len=6), intent(in) :: hisgrid
|
||||||
procedure(jt4_average_callback), optional :: average_callback
|
procedure(jt4_average_callback), optional :: average_callback
|
||||||
|
|
||||||
real*4 dat(30*12000)
|
real*4 dat(30*11025)
|
||||||
character*6 cfile6
|
character*6 cfile6
|
||||||
|
|
||||||
this%decode_callback => decode_callback
|
this%decode_callback => decode_callback
|
||||||
|
@ -158,16 +158,19 @@ contains
|
||||||
z(1:458,1:65)=zz(274:731,1:65,ich)
|
z(1:458,1:65)=zz(274:731,1:65,ich)
|
||||||
call zplt(z,ich-4,syncz,dtxz,nfreqz,flipz,sync2z,0,emedelay,dttol, &
|
call zplt(z,ich-4,syncz,dtxz,nfreqz,flipz,sync2z,0,emedelay,dttol, &
|
||||||
nfqso,ntol)
|
nfqso,ntol)
|
||||||
if(ich.eq.5) then
|
|
||||||
dtxzz=dtxz
|
|
||||||
nfreqzz=nfreqz
|
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
call timer('zplt ',1)
|
call timer('zplt ',1)
|
||||||
|
|
||||||
! Use results from zplt
|
! Use results from zplt
|
||||||
!### NB: JT4 is severely "sync limited" at present... (Maybe not still true???)
|
!### NB: JT4 is severely "sync limited" at present... (Maybe not still true???)
|
||||||
|
|
||||||
|
!### TESTS ONLY! ###
|
||||||
|
nfreqz=1000
|
||||||
|
dtxz=0.0
|
||||||
|
flipz=1.0
|
||||||
|
syncz=5.0
|
||||||
|
!###
|
||||||
|
|
||||||
flip=flipz
|
flip=flipz
|
||||||
sync=syncz
|
sync=syncz
|
||||||
snrx=db(sync) - 26.
|
snrx=db(sync) - 26.
|
||||||
|
|
|
@ -2072,11 +2072,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||||
QByteArray t=proc_jt9.readLine();
|
QByteArray t=proc_jt9.readLine();
|
||||||
bool bAvgMsg=false;
|
bool bAvgMsg=false;
|
||||||
int navg=0;
|
int navg=0;
|
||||||
if(m_mode=="JT4") {
|
if(m_mode=="JT4" or m_mode=="JT65") {
|
||||||
t=t.mid(0,39) + t.mid(42,t.length()-42);
|
|
||||||
bAvgMsg=(t.length()>49);
|
|
||||||
}
|
|
||||||
if(m_mode=="JT65") {
|
|
||||||
int n=t.indexOf("f");
|
int n=t.indexOf("f");
|
||||||
if(n<0) n=t.indexOf("d");
|
if(n<0) n=t.indexOf("d");
|
||||||
if(n>0) {
|
if(n>0) {
|
||||||
|
|
Loading…
Reference in New Issue