mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-02 13:17:49 -04:00
Progress on AP decoding for 77bit messages. AP is basically working for regular i3=1 messages.
This commit is contained in:
parent
4d35c669d6
commit
df0b5e2622
@ -497,7 +497,7 @@ contains
|
|||||||
annot=' '
|
annot=' '
|
||||||
if(nap.ne.0) then
|
if(nap.ne.0) then
|
||||||
write(annot,'(a1,i1)') 'a',nap
|
write(annot,'(a1,i1)') 'a',nap
|
||||||
if(qual.lt.0.17) decoded0(22:22)='?'
|
if(qual.lt.0.17) decoded0(37:37)='?'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! i0=index(decoded0,';')
|
! i0=index(decoded0,';')
|
||||||
@ -507,8 +507,8 @@ contains
|
|||||||
i0=1
|
i0=1
|
||||||
if(i0.le.0) write(*,1000) params%nutc,snr,dt,nint(freq),decoded0(1:22),annot
|
if(i0.le.0) write(*,1000) params%nutc,snr,dt,nint(freq),decoded0(1:22),annot
|
||||||
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
|
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
|
||||||
if(i0.gt.0) write(*,1001) params%nutc,snr,dt,nint(freq),decoded0
|
if(i0.gt.0) write(*,1001) params%nutc,snr,dt,nint(freq),decoded0,annot
|
||||||
1001 format(i6.6,i4,f5.1,i5,' ~ ',1x,a37)
|
1001 format(i6.6,i4,f5.1,i5,' ~ ',1x,a37,1x,a2)
|
||||||
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
|
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
|
||||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT8')
|
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT8')
|
||||||
|
|
||||||
|
@ -1,24 +1,20 @@
|
|||||||
subroutine ft8apset_174_91(mycall12,mygrid6,hiscall12,hisgrid6,bcontest,apsym)
|
subroutine ft8apset_174_91(mycall12,hiscall12,hisgrid6,ncontest,apsym)
|
||||||
parameter(NAPM=4,KK=91)
|
parameter(NAPM=4,KK=91)
|
||||||
|
character*37 msg,msgsent
|
||||||
character*12 mycall12,hiscall12
|
character*12 mycall12,hiscall12
|
||||||
character*22 msg,msgsent
|
character*6 hisgrid6
|
||||||
character*6 mycall,hiscall
|
|
||||||
character*6 mygrid6,hisgrid6
|
|
||||||
character*4 hisgrid
|
character*4 hisgrid
|
||||||
logical bcontest
|
|
||||||
integer apsym(77)
|
integer apsym(77)
|
||||||
integer*1 msgbits(77)
|
integer*1 msgbits(77)
|
||||||
integer itone(KK)
|
integer itone(KK)
|
||||||
|
|
||||||
mycall=mycall12(1:6)
|
if(index(hiscall12," ").eq.0) hiscall12="K9ABC"
|
||||||
hiscall=hiscall12(1:6)
|
msg=trim(mycall12)//' '//trim(hiscall12)//' RRR'
|
||||||
if(index(hiscall," ").eq.0) hiscall="K9ABC"
|
i3=1
|
||||||
hisgrid=hisgrid6(1:4)
|
|
||||||
if(index(hisgrid," ").eq.0) hisgrid="AA00"
|
|
||||||
msg=mycall//' '//hiscall//' '//hisgrid
|
|
||||||
i3=1 ! ### TEMPORARY ??? ###
|
|
||||||
n3=0
|
n3=0
|
||||||
call genft8_174_91(msg,mygrid6,bcontest,i3,n3,msgsent,msgbits,itone)
|
!write(*,*) 'apset msg ',msg
|
||||||
|
call genft8_174_91(msg,i3,n3,msgsent,msgbits,itone)
|
||||||
apsym=2*msgbits-1
|
apsym=2*msgbits-1
|
||||||
|
!write(*,'(29i1,1x,29i1,1x,19i1)') (apsym(1:77)+1)/2
|
||||||
return
|
return
|
||||||
end subroutine ft8apset_174_91
|
end subroutine ft8apset_174_91
|
||||||
|
@ -15,7 +15,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
real a(5)
|
real a(5)
|
||||||
real s8(0:7,NN)
|
real s8(0:7,NN)
|
||||||
real s2(0:511),s2l(0:511)
|
real s2(0:511),s2l(0:511)
|
||||||
real bmeta(3*ND),bmetb(3*ND),bmetc(3*ND),bmetap(3*ND)
|
real bmeta(3*ND),bmetb(3*ND),bmetc(3*ND)
|
||||||
real bmetal(3*ND),bmetbl(3*ND),bmetcl(3*ND)
|
real bmetal(3*ND),bmetbl(3*ND),bmetcl(3*ND)
|
||||||
real llra(3*ND),llrb(3*ND),llrc(3*ND),llrd(3*ND) !Soft symbols
|
real llra(3*ND),llrb(3*ND),llrc(3*ND),llrd(3*ND) !Soft symbols
|
||||||
real llral(3*ND),llrbl(3*ND),llrcl(3*ND) !Soft symbols
|
real llral(3*ND),llrbl(3*ND),llrcl(3*ND) !Soft symbols
|
||||||
@ -23,7 +23,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
integer*1 message77(77),apmask(3*ND),cw(3*ND)
|
integer*1 message77(77),apmask(3*ND),cw(3*ND)
|
||||||
integer*1 msgbits(77)
|
integer*1 msgbits(77)
|
||||||
integer apsym(77)
|
integer apsym(77)
|
||||||
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
|
integer mcq(29),mrrr(19),m73(19),mrr73(19)
|
||||||
integer itone(NN)
|
integer itone(NN)
|
||||||
integer icos7(0:6),ip(1)
|
integer icos7(0:6),ip(1)
|
||||||
integer nappasses(0:5) !Number of decoding passes to use for each QSO state
|
integer nappasses(0:5) !Number of decoding passes to use for each QSO state
|
||||||
@ -37,18 +37,16 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
complex cs(0:7,NN)
|
complex cs(0:7,NN)
|
||||||
logical first,newdat,lsubtract,lapon,lapcqonly,nagain
|
logical first,newdat,lsubtract,lapon,lapcqonly,nagain
|
||||||
data icos7/3,1,4,0,6,5,2/ ! Flipped w.r.t. original FT8 sync array
|
data icos7/3,1,4,0,6,5,2/ ! Flipped w.r.t. original FT8 sync array
|
||||||
data mcq/1,1,1,1,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1/
|
data mcq/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0/
|
||||||
data mrrr/0,1,1,1,1,1,1,0,1,1,0,0,1,1,1,1/
|
data mrrr/0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1/
|
||||||
data m73/0,1,1,1,1,1,1,0,1,1,0,1,0,0,0,0/
|
data m73/0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1/
|
||||||
data mde/1,1,1,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,0,1,0,0,0,1/
|
data mrr73/0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1/
|
||||||
data mrr73/0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1/
|
|
||||||
data first/.true./
|
data first/.true./
|
||||||
data graymap/0,1,3,2,5,6,4,7/
|
data graymap/0,1,3,2,5,6,4,7/
|
||||||
save nappasses,naptypes,one
|
save nappasses,naptypes,one
|
||||||
|
|
||||||
if(first) then
|
if(first) then
|
||||||
mcq=2*mcq-1
|
mcq=2*mcq-1
|
||||||
mde=2*mde-1
|
|
||||||
mrrr=2*mrrr-1
|
mrrr=2*mrrr-1
|
||||||
m73=2*m73-1
|
m73=2*m73-1
|
||||||
mrr73=2*mrr73-1
|
mrr73=2*mrr73-1
|
||||||
@ -61,13 +59,12 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
|
|
||||||
! iaptype
|
! iaptype
|
||||||
!------------------------
|
!------------------------
|
||||||
! 1 CQ ??? ???
|
! 1 CQ ??? ??? (29+3=32 ap bits)
|
||||||
! 2 MyCall ??? ???
|
! 2 MyCall ??? ??? (29+3=32 ap bits)
|
||||||
! 3 MyCall DxCall ???
|
! 3 MyCall DxCall ??? (58+3=61 ap bits)
|
||||||
! 4 MyCall DxCall RRR
|
! 4 MyCall DxCall RRR (77 ap bits)
|
||||||
! 5 MyCall DxCall 73
|
! 5 MyCall DxCall 73 (77 ap bits)
|
||||||
! 6 MyCall DxCall RR73
|
! 6 MyCall DxCall RR73 (77 ap bits)
|
||||||
! 7 ??? DxCall ???
|
|
||||||
|
|
||||||
naptypes(0,1:4)=(/1,2,0,0/)
|
naptypes(0,1:4)=(/1,2,0,0/)
|
||||||
naptypes(1,1:4)=(/2,3,0,0/)
|
naptypes(1,1:4)=(/2,3,0,0/)
|
||||||
@ -190,107 +187,108 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
do ib=0,ibmax
|
do ib=0,ibmax
|
||||||
bm=maxval(s2(0:nt-1),one(0:nt-1,ibmax-ib)) - &
|
bm=maxval(s2(0:nt-1),one(0:nt-1,ibmax-ib)) - &
|
||||||
maxval(s2(0:nt-1),.not.one(0:nt-1,ibmax-ib))
|
maxval(s2(0:nt-1),.not.one(0:nt-1,ibmax-ib))
|
||||||
bml=maxval(s2l(0:nt-1),one(0:nt-1,ibmax-ib)) - &
|
! bml=maxval(s2l(0:nt-1),one(0:nt-1,ibmax-ib)) - &
|
||||||
maxval(s2l(0:nt-1),.not.one(0:nt-1,ibmax-ib))
|
! maxval(s2l(0:nt-1),.not.one(0:nt-1,ibmax-ib))
|
||||||
if(i32+ib .gt.174) cycle
|
if(i32+ib .gt.174) cycle
|
||||||
if(nsym.eq.1) then
|
if(nsym.eq.1) then
|
||||||
bmeta(i32+ib)=bm
|
bmeta(i32+ib)=bm
|
||||||
bmetal(i32+ib)=bml
|
! bmetal(i32+ib)=bml
|
||||||
elseif(nsym.eq.2) then
|
elseif(nsym.eq.2) then
|
||||||
bmetb(i32+ib)=bm
|
bmetb(i32+ib)=bm
|
||||||
bmetbl(i32+ib)=bml
|
! bmetbl(i32+ib)=bml
|
||||||
elseif(nsym.eq.3) then
|
elseif(nsym.eq.3) then
|
||||||
bmetc(i32+ib)=bm
|
bmetc(i32+ib)=bm
|
||||||
bmetcl(i32+ib)=bml
|
! bmetcl(i32+ib)=bml
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
call normalizebmet(bmeta,3*ND)
|
call normalizebmet(bmeta,3*ND)
|
||||||
call normalizebmet(bmetal,3*ND)
|
! call normalizebmet(bmetal,3*ND)
|
||||||
call normalizebmet(bmetb,3*ND)
|
call normalizebmet(bmetb,3*ND)
|
||||||
call normalizebmet(bmetbl,3*ND)
|
! call normalizebmet(bmetbl,3*ND)
|
||||||
call normalizebmet(bmetc,3*ND)
|
call normalizebmet(bmetc,3*ND)
|
||||||
call normalizebmet(bmetcl,3*ND)
|
! call normalizebmet(bmetcl,3*ND)
|
||||||
bmetap=bmeta
|
|
||||||
|
|
||||||
scalefac=2.83
|
scalefac=2.83
|
||||||
llra=scalefac*bmeta
|
llra=scalefac*bmeta
|
||||||
llral=scalefac*bmetal
|
! llral=scalefac*bmetal
|
||||||
llrb=scalefac*bmetb
|
llrb=scalefac*bmetb
|
||||||
llrbl=scalefac*bmetbl
|
! llrbl=scalefac*bmetbl
|
||||||
llrc=scalefac*bmetc
|
llrc=scalefac*bmetc
|
||||||
llrcl=scalefac*bmetcl
|
! llrcl=scalefac*bmetcl
|
||||||
|
|
||||||
apmag=scalefac*(maxval(abs(bmetap))*1.01)
|
apmag=maxval(abs(llrb))*1.01
|
||||||
|
|
||||||
! pass #
|
! pass #
|
||||||
!------------------------------
|
!------------------------------
|
||||||
! 1 regular decoding
|
! 1 regular decoding, nsym=1
|
||||||
! 2 erase 24
|
! 2 regular decoding, nsym=2
|
||||||
! 3 erase 48
|
! 3 regular decoding, nsym=3
|
||||||
! 4 ap pass 1
|
! 4 ap pass 1, nsym=2 (for now?)
|
||||||
! 5 ap pass 2
|
! 5 ap pass 2
|
||||||
! 6 ap pass 3
|
! 6 ap pass 3
|
||||||
! 7 ap pass 4, etc.
|
! 7 ap pass 4
|
||||||
|
|
||||||
if(lapon) then
|
if(lapon) then
|
||||||
if(.not.lapcqonly) then
|
if(.not.lapcqonly) then
|
||||||
npasses=4+nappasses(nQSOProgress)
|
npasses=3+nappasses(nQSOProgress)
|
||||||
else
|
else
|
||||||
npasses=5
|
npasses=4
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
npasses=4
|
npasses=3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! do ipass=1,npasses
|
do ipass=1,npasses
|
||||||
do ipass=1,3
|
|
||||||
llrd=llra
|
llrd=llra
|
||||||
if(ipass.eq.2) llrd=llrb
|
if(ipass.eq.2) llrd=llrb
|
||||||
if(ipass.eq.3) llrd=llrc
|
if(ipass.eq.3) llrd=llrc
|
||||||
! if(ipass.eq.3) llrd(1:24)=0.
|
if(ipass.le.3) then
|
||||||
if(ipass.eq.4) llrd(1:24)=0.
|
|
||||||
if(ipass.le.4) then
|
|
||||||
apmask=0
|
apmask=0
|
||||||
iaptype=0
|
iaptype=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! The AP stuff needs to be re-done to accommodate the new message types.
|
if(ipass .gt. 3) then
|
||||||
! if(ipass .gt. 4) then
|
llrd=llrb ! Needs to be checked
|
||||||
! llrd=llrb ! Needs to be checked
|
if(.not.lapcqonly) then
|
||||||
! if(.not.lapcqonly) then
|
iaptype=naptypes(nQSOProgress,ipass-3)
|
||||||
! iaptype=naptypes(nQSOProgress,ipass-4)
|
else
|
||||||
! else
|
iaptype=1
|
||||||
! iaptype=1
|
endif
|
||||||
! endif
|
if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
|
||||||
! if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
|
if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
|
||||||
! if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
|
apmask=0
|
||||||
! apmask=0
|
apmask(1:29)=1
|
||||||
! apmask(1:27)=1 ! first 27 bits (9 tones) are AP
|
apmask(75:77)=1
|
||||||
! if(iaptype.eq.1) llrd(1:27)=apmag*mcq(1:27)
|
llrd(75:77)=apmag*apsym(75:77)
|
||||||
! if(iaptype.eq.2) llrd(1:27)=apmag*apsym(1:27)
|
if(iaptype.eq.1) llrd(1:29)=apmag*mcq(1:29)
|
||||||
! endif
|
if(iaptype.eq.2) llrd(1:29)=apmag*apsym(1:29)
|
||||||
! if(iaptype.eq.3) then ! mycall, dxcall, ???
|
endif
|
||||||
! apmask=0
|
if(iaptype.eq.3) then ! mycall, dxcall, ???
|
||||||
! apmask(1:54)=1
|
apmask=0
|
||||||
! llrd(1:54)=apmag*apsym(1:54)
|
apmask(1:56)=1
|
||||||
! endif
|
apmask(75:77)=1
|
||||||
! if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
|
llrd(1:56)=apmag*apsym(1:56)
|
||||||
! apmask=0
|
llrd(75:77)=apmag*apsym(75:77)
|
||||||
! apmask(1:72)=1 ! mycall, hiscall, RRR|73|RR73
|
endif
|
||||||
! llrd(1:56)=apmag*apsym(1:56)
|
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
|
||||||
! if(iaptype.eq.4) llrd(57:72)=apmag*mrrr
|
apmask=0
|
||||||
! if(iaptype.eq.5) llrd(57:72)=apmag*m73
|
apmask(1:77)=1 ! mycall, hiscall, RRR|73|RR73
|
||||||
! if(iaptype.eq.6) llrd(57:72)=apmag*mrr73
|
llrd(1:58)=apmag*apsym(1:58)
|
||||||
! endif
|
if(iaptype.eq.4) llrd(59:77)=apmag*mrrr
|
||||||
! if(iaptype.eq.7) then ! ???, dxcall, ???
|
if(iaptype.eq.5) llrd(59:77)=apmag*m73
|
||||||
! apmask=0
|
if(iaptype.eq.6) llrd(59:77)=apmag*mrr73
|
||||||
! apmask(31:54)=1 ! hiscall
|
endif
|
||||||
! llrd(31:54)=apmag*apsym(31:54)
|
if(iaptype.eq.7) then ! ???, dxcall, ???
|
||||||
! endif
|
apmask=0
|
||||||
! endif
|
apmask(30:58)=1 ! hiscall
|
||||||
|
apmask(75:77)=1
|
||||||
|
llrd(30:58)=apmag*apsym(30:58)
|
||||||
|
llrd(75:77)=apmag*apsym(75:77)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
cw=0
|
cw=0
|
||||||
call timer('bpd174_91 ',0)
|
call timer('bpd174_91 ',0)
|
||||||
|
@ -65,8 +65,8 @@ contains
|
|||||||
call ft8apset(mycall12,hiscall12,hisgrid6,apsym1)
|
call ft8apset(mycall12,hiscall12,hisgrid6,apsym1)
|
||||||
! For now, turn off apset until we get basic functionality going... AP will
|
! For now, turn off apset until we get basic functionality going... AP will
|
||||||
! need to be re-thinked for itype=2 messages.
|
! need to be re-thinked for itype=2 messages.
|
||||||
! call ft8apset_174_91(mycall12,hiscall12,hisgrid6,apsym2)
|
call ft8apset_174_91(mycall12,hiscall12,hisgrid6,ncontest,apsym2)
|
||||||
apsym2=0
|
!write(*,'(28i1,1x,i1,1x,28i1,1x,i1,1x,i1,1x,15i1,1x,3i1)') (apsym2+1)/2
|
||||||
dd=iwave
|
dd=iwave
|
||||||
ndecodes=0
|
ndecodes=0
|
||||||
allmessages=' '
|
allmessages=' '
|
||||||
@ -144,7 +144,6 @@ contains
|
|||||||
!1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a37,i4)
|
!1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a37,i4)
|
||||||
! flush(81)
|
! flush(81)
|
||||||
if(.not.ldupe .and. associated(this%callback)) then
|
if(.not.ldupe .and. associated(this%callback)) then
|
||||||
! print*,'nharderrors:',nharderrors
|
|
||||||
qual=1.0-(nharderrors+dmin)/60.0 ! scale qual to [0.0,1.0]
|
qual=1.0-(nharderrors+dmin)/60.0 ! scale qual to [0.0,1.0]
|
||||||
call this%callback(sync,nsnr,xdt,f1,msg37,iaptype,qual)
|
call this%callback(sync,nsnr,xdt,f1,msg37,iaptype,qual)
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user