Merge branch 'integrate-77bit' of https://bitbucket.org/k1jt/wsjtx into integrate-77bit

This commit is contained in:
Joe Taylor 2018-07-29 19:40:53 -04:00
commit c87296d90e
6 changed files with 28 additions and 59 deletions

View File

@ -1,24 +1,22 @@
subroutine ft8apset(mycall12,hiscall12,hisgrid6,apsym)
subroutine ft8apset(mycall12,hiscall12,apsym)
parameter(NAPM=4,KK=87)
character*12 mycall12,hiscall12
character*37 msg,msgsent
character*6 mycall,hiscall
character*6 hisgrid6
character*4 hisgrid
integer apsym(KK)
integer*1 msgbits(KK)
integer itone(KK)
integer apsym(75)
integer*1 msgbits(77)
integer itone(79)
mycall=mycall12(1:6)
hiscall=hiscall12(1:6)
if(index(hiscall," ").eq.0) hiscall="K9ABC"
hisgrid=hisgrid6(1:4)
if(index(hisgrid," ").eq.0) hisgrid="AA00"
msg=mycall//' '//hiscall//' '//hisgrid
i3=0 ! ### TEMPORARY ??? ###
n3=0 !TEMPORARY
if(len(trim(hiscall)).eq.0) hiscall="K9ABC"
msg=mycall//' '//hiscall//' RRR'
i3=0
n3=0
isync=1
call genft8(msg,i3,n3,isync,msgsent,msgbits,itone)
apsym=2*msgbits-1
apsym=2*msgbits(1:75)-1
return
end subroutine ft8apset

View File

@ -19,7 +19,7 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
real dd0(15*12000)
integer*1 decoded(KK),decoded0(KK),apmask(3*ND),cw(3*ND)
integer*1 msgbits(KK)
integer apsym(KK)
integer apsym(75)
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
integer itone(NN)
integer indxs1(8*ND)

View File

@ -226,7 +226,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
! 1 regular decoding, nsym=1
! 2 regular decoding, nsym=2
! 3 regular decoding, nsym=3
! 4 ap pass 1, nsym=2 (for now?)
! 4 ap pass 1, nsym=1 (for now?)
! 5 ap pass 2
! 6 ap pass 3
! 7 ap pass 4
@ -251,7 +251,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
endif
if(ipass .gt. 3) then
llrd=llrb ! Needs to be checked
llrd=llra
if(.not.lapcqonly) then
iaptype=naptypes(nQSOProgress,ipass-3)
else
@ -281,13 +281,6 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
if(iaptype.eq.5) llrd(59:77)=apmag*m73
if(iaptype.eq.6) llrd(59:77)=apmag*mrr73
endif
if(iaptype.eq.7) then ! ???, dxcall, ???
apmask=0
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

View File

@ -8,17 +8,17 @@ program ft8sim
parameter (NWAVE=NN*NSPS)
type(hdr) h !Header for .wav file
character arg*12,fname*17
character msg40*40,msg*22,msgsent*22,msg0*22
character msg*37,msgsent*37,msg0*37
complex c0(0:NMAX-1)
complex c(0:NMAX-1)
real wave(NMAX)
integer itone(NN)
integer*1 msgbits(91)
integer*1 msgbits(77)
integer*2 iwave(NMAX) !Generated full-length waveform
! Get command-line argument(s)
nargs=iargc()
if(nargs.ne.9) then
if(nargs.ne.8) then
print*,'Usage: ft8sim "message" nsig|f0 DT fdop del width nfiles snr'
print*,'Examples: ft8sim "K1ABC W9XYZ EN37" 1500.0 0.0 0.1 1.0 0 10 -18'
print*,' ft8sim "K1ABC W9XYZ EN37" 10 0.0 0.1 1.0 25 10 -18'
@ -26,7 +26,7 @@ program ft8sim
print*,' ft8sim "K1ABC RR73; W9XYZ <KH1/KH7Z> -11" 300 0 0 0 25 1 -10'
go to 999
endif
call getarg(1,msg40) !Message to be transmitted
call getarg(1,msg) !Message to be transmitted
call getarg(2,arg)
read(arg,*) f0 !Frequency (only used for single-signal)
call getarg(3,arg)
@ -41,8 +41,6 @@ program ft8sim
read(arg,*) nfiles !Number of files
call getarg(8,arg)
read(arg,*) snrdb !SNR_2500
call getarg(9,arg)
read(arg,*) itype !itype=1 for (174,87), itype=2 for (174,91)
nsig=1
if(f0.lt.100.0) then
@ -64,33 +62,23 @@ program ft8sim
txt=NN*NSPS/12000.0
! Source-encode, then get itone()
if(index(msg40,';').le.0) then
if(index(msg,';').le.0) then
i3bit=0
msg=msg40(1:22)
if(itype.eq.1) then
call genft8(msg,i3bit,msgsent,msgbits,itone)
elseif(itype.eq.2) then
call genft8_174_91(msg,i3bit,msgsent,msgbits,itone)
endif
call genft8(msg,i3bit,0,1,msgsent,msgbits,itone)
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
' BW:',f4.1,2x,a22)
else
call foxgen_wrap(msg40,msgbits,itone)
write(*,1001) f0,xdt,txt,snrdb,bw,msg40
call foxgen_wrap(msg,msgbits,itone)
write(*,1001) f0,xdt,txt,snrdb,bw,msg
1001 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
' BW:',f4.1,2x,a40)
' BW:',f4.1,2x,a37)
endif
write(*,1030) msgbits(1:56)
1030 format(/'Call1: ',28i1,' Call2: ',28i1)
if(itype.eq.1) then
write(*,1032) msgbits(57:72),msgbits(73:75),msgbits(76:87)
1032 format('Grid: ',16i1,' 3Bit: ',3i1,' CRC12: ',12i1)
elseif(itype.eq.2) then
write(*,1033) msgbits(57:72),msgbits(73:77),msgbits(78:91)
1033 format('Grid: ',16i1,' 5Bit: ',5i1,' CRC14: ',14i1)
endif
write(*,1032) msgbits(57:72),msgbits(73:75)
1032 format('Grid: ',16i1,' 3Bit: ',3i1)
write(*,1034) itone
1034 format(/'Channel symbols:'/79i1/)
@ -108,11 +96,7 @@ program ft8sim
if(isig.eq.2) then
f0=f0+100
endif
if(itype.eq.1) then
call genft8(msg,i3bit,msgsent,msgbits,itone)
elseif(itype.eq.2) then
call genft8_174_91(msg,i3bit,msgsent,msgbits,itone)
endif
call genft8(msg,i3bit,msgsent,msgbits,itone)
endif
if(nsig.eq.25) then
f0=(isig+2)*100.0
@ -131,11 +115,7 @@ program ft8sim
1002 format('R',i3.2)
f0=600.0 + mod(isig-1,5)*60.0
endif
if(itype.eq.1) then
call genft8(msg,i3bit,msgsent,msgbits,itone)
elseif(itype.eq.2) then
call genft8_174_91(msg,i3bit,msgsent,msgbits,itone)
endif
call genft8(msg,i3bit,msgsent,msgbits,itone)
endif
! k=nint((xdt+0.5+0.01*gran())/dt)
k=nint((xdt+0.5)/dt)

View File

@ -39,7 +39,8 @@ subroutine genft8(msg37,i3,n3,isync,msgsent37,msgbits77,itone)
1004 format(87i1)
call encode174(msgbits,codeword) !Encode the test message
msgbits77=-1
msgbits77(1:75)=msgbits(1:75)
! Message structure: S7 D29 S7 D29 S7
itone(1:7)=icos7
itone(36+1:36+7)=icos7

View File

@ -62,11 +62,8 @@ contains
write(datetime,1001) nutc !### TEMPORARY ###
1001 format("000000_",i6.6)
call ft8apset(mycall12,hiscall12,hisgrid6,apsym1)
! For now, turn off apset until we get basic functionality going... AP will
! need to be re-thinked for itype=2 messages.
call ft8apset(mycall12,hiscall12,apsym1)
call ft8apset_174_91(mycall12,hiscall12,hisgrid6,ncontest,apsym2)
!write(*,'(28i1,1x,i1,1x,28i1,1x,i1,1x,i1,1x,15i1,1x,3i1)') (apsym2+1)/2
dd=iwave
ndecodes=0
allmessages=' '