mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 14:18:38 -05:00
Bring isync=1 message simulator, ft8sim, up to date. Fix ap decoding for isync=1 messages.
This commit is contained in:
parent
5a68660b9a
commit
b67589d29f
@ -1,24 +1,22 @@
|
|||||||
subroutine ft8apset(mycall12,hiscall12,hisgrid6,apsym)
|
subroutine ft8apset(mycall12,hiscall12,apsym)
|
||||||
parameter(NAPM=4,KK=87)
|
parameter(NAPM=4,KK=87)
|
||||||
character*12 mycall12,hiscall12
|
character*12 mycall12,hiscall12
|
||||||
character*37 msg,msgsent
|
character*37 msg,msgsent
|
||||||
character*6 mycall,hiscall
|
character*6 mycall,hiscall
|
||||||
character*6 hisgrid6
|
character*6 hisgrid6
|
||||||
character*4 hisgrid
|
character*4 hisgrid
|
||||||
integer apsym(KK)
|
integer apsym(75)
|
||||||
integer*1 msgbits(KK)
|
integer*1 msgbits(77)
|
||||||
integer itone(KK)
|
integer itone(79)
|
||||||
|
|
||||||
mycall=mycall12(1:6)
|
mycall=mycall12(1:6)
|
||||||
hiscall=hiscall12(1:6)
|
hiscall=hiscall12(1:6)
|
||||||
if(index(hiscall," ").eq.0) hiscall="K9ABC"
|
if(len(trim(hiscall)).eq.0) hiscall="K9ABC"
|
||||||
hisgrid=hisgrid6(1:4)
|
msg=mycall//' '//hiscall//' RRR'
|
||||||
if(index(hisgrid," ").eq.0) hisgrid="AA00"
|
i3=0
|
||||||
msg=mycall//' '//hiscall//' '//hisgrid
|
n3=0
|
||||||
i3=0 ! ### TEMPORARY ??? ###
|
|
||||||
n3=0 !TEMPORARY
|
|
||||||
isync=1
|
isync=1
|
||||||
call genft8(msg,i3,n3,isync,msgsent,msgbits,itone)
|
call genft8(msg,i3,n3,isync,msgsent,msgbits,itone)
|
||||||
apsym=2*msgbits-1
|
apsym=2*msgbits(1:75)-1
|
||||||
return
|
return
|
||||||
end subroutine ft8apset
|
end subroutine ft8apset
|
||||||
|
@ -19,7 +19,7 @@ subroutine ft8b_1(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
real dd0(15*12000)
|
real dd0(15*12000)
|
||||||
integer*1 decoded(KK),decoded0(KK),apmask(3*ND),cw(3*ND)
|
integer*1 decoded(KK),decoded0(KK),apmask(3*ND),cw(3*ND)
|
||||||
integer*1 msgbits(KK)
|
integer*1 msgbits(KK)
|
||||||
integer apsym(KK)
|
integer apsym(75)
|
||||||
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
|
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
|
||||||
integer itone(NN)
|
integer itone(NN)
|
||||||
integer indxs1(8*ND)
|
integer indxs1(8*ND)
|
||||||
|
@ -251,7 +251,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if(ipass .gt. 3) then
|
if(ipass .gt. 3) then
|
||||||
llrd=llrb ! Needs to be checked
|
llrd=llra
|
||||||
if(.not.lapcqonly) then
|
if(.not.lapcqonly) then
|
||||||
iaptype=naptypes(nQSOProgress,ipass-3)
|
iaptype=naptypes(nQSOProgress,ipass-3)
|
||||||
else
|
else
|
||||||
|
@ -8,17 +8,17 @@ program ft8sim
|
|||||||
parameter (NWAVE=NN*NSPS)
|
parameter (NWAVE=NN*NSPS)
|
||||||
type(hdr) h !Header for .wav file
|
type(hdr) h !Header for .wav file
|
||||||
character arg*12,fname*17
|
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 c0(0:NMAX-1)
|
||||||
complex c(0:NMAX-1)
|
complex c(0:NMAX-1)
|
||||||
real wave(NMAX)
|
real wave(NMAX)
|
||||||
integer itone(NN)
|
integer itone(NN)
|
||||||
integer*1 msgbits(91)
|
integer*1 msgbits(77)
|
||||||
integer*2 iwave(NMAX) !Generated full-length waveform
|
integer*2 iwave(NMAX) !Generated full-length waveform
|
||||||
|
|
||||||
! Get command-line argument(s)
|
! Get command-line argument(s)
|
||||||
nargs=iargc()
|
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*,'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*,'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'
|
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'
|
print*,' ft8sim "K1ABC RR73; W9XYZ <KH1/KH7Z> -11" 300 0 0 0 25 1 -10'
|
||||||
go to 999
|
go to 999
|
||||||
endif
|
endif
|
||||||
call getarg(1,msg40) !Message to be transmitted
|
call getarg(1,msg) !Message to be transmitted
|
||||||
call getarg(2,arg)
|
call getarg(2,arg)
|
||||||
read(arg,*) f0 !Frequency (only used for single-signal)
|
read(arg,*) f0 !Frequency (only used for single-signal)
|
||||||
call getarg(3,arg)
|
call getarg(3,arg)
|
||||||
@ -41,8 +41,6 @@ program ft8sim
|
|||||||
read(arg,*) nfiles !Number of files
|
read(arg,*) nfiles !Number of files
|
||||||
call getarg(8,arg)
|
call getarg(8,arg)
|
||||||
read(arg,*) snrdb !SNR_2500
|
read(arg,*) snrdb !SNR_2500
|
||||||
call getarg(9,arg)
|
|
||||||
read(arg,*) itype !itype=1 for (174,87), itype=2 for (174,91)
|
|
||||||
|
|
||||||
nsig=1
|
nsig=1
|
||||||
if(f0.lt.100.0) then
|
if(f0.lt.100.0) then
|
||||||
@ -64,33 +62,23 @@ program ft8sim
|
|||||||
txt=NN*NSPS/12000.0
|
txt=NN*NSPS/12000.0
|
||||||
|
|
||||||
! Source-encode, then get itone()
|
! Source-encode, then get itone()
|
||||||
if(index(msg40,';').le.0) then
|
if(index(msg,';').le.0) then
|
||||||
i3bit=0
|
i3bit=0
|
||||||
msg=msg40(1:22)
|
call genft8(msg,i3bit,0,1,msgsent,msgbits,itone)
|
||||||
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
|
|
||||||
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
|
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
|
||||||
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
||||||
' BW:',f4.1,2x,a22)
|
' BW:',f4.1,2x,a22)
|
||||||
else
|
else
|
||||||
call foxgen_wrap(msg40,msgbits,itone)
|
call foxgen_wrap(msg,msgbits,itone)
|
||||||
write(*,1001) f0,xdt,txt,snrdb,bw,msg40
|
write(*,1001) f0,xdt,txt,snrdb,bw,msg
|
||||||
1001 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
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
|
endif
|
||||||
|
|
||||||
write(*,1030) msgbits(1:56)
|
write(*,1030) msgbits(1:56)
|
||||||
1030 format(/'Call1: ',28i1,' Call2: ',28i1)
|
1030 format(/'Call1: ',28i1,' Call2: ',28i1)
|
||||||
if(itype.eq.1) then
|
write(*,1032) msgbits(57:72),msgbits(73:75)
|
||||||
write(*,1032) msgbits(57:72),msgbits(73:75),msgbits(76:87)
|
1032 format('Grid: ',16i1,' 3Bit: ',3i1)
|
||||||
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(*,1034) itone
|
write(*,1034) itone
|
||||||
1034 format(/'Channel symbols:'/79i1/)
|
1034 format(/'Channel symbols:'/79i1/)
|
||||||
|
|
||||||
@ -108,11 +96,7 @@ program ft8sim
|
|||||||
if(isig.eq.2) then
|
if(isig.eq.2) then
|
||||||
f0=f0+100
|
f0=f0+100
|
||||||
endif
|
endif
|
||||||
if(itype.eq.1) then
|
|
||||||
call genft8(msg,i3bit,msgsent,msgbits,itone)
|
call genft8(msg,i3bit,msgsent,msgbits,itone)
|
||||||
elseif(itype.eq.2) then
|
|
||||||
call genft8_174_91(msg,i3bit,msgsent,msgbits,itone)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
if(nsig.eq.25) then
|
if(nsig.eq.25) then
|
||||||
f0=(isig+2)*100.0
|
f0=(isig+2)*100.0
|
||||||
@ -131,11 +115,7 @@ program ft8sim
|
|||||||
1002 format('R',i3.2)
|
1002 format('R',i3.2)
|
||||||
f0=600.0 + mod(isig-1,5)*60.0
|
f0=600.0 + mod(isig-1,5)*60.0
|
||||||
endif
|
endif
|
||||||
if(itype.eq.1) then
|
|
||||||
call genft8(msg,i3bit,msgsent,msgbits,itone)
|
call genft8(msg,i3bit,msgsent,msgbits,itone)
|
||||||
elseif(itype.eq.2) then
|
|
||||||
call genft8_174_91(msg,i3bit,msgsent,msgbits,itone)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
! k=nint((xdt+0.5+0.01*gran())/dt)
|
! k=nint((xdt+0.5+0.01*gran())/dt)
|
||||||
k=nint((xdt+0.5)/dt)
|
k=nint((xdt+0.5)/dt)
|
||||||
|
@ -39,7 +39,8 @@ subroutine genft8(msg37,i3,n3,isync,msgsent37,msgbits77,itone)
|
|||||||
1004 format(87i1)
|
1004 format(87i1)
|
||||||
|
|
||||||
call encode174(msgbits,codeword) !Encode the test message
|
call encode174(msgbits,codeword) !Encode the test message
|
||||||
|
msgbits77=-1
|
||||||
|
msgbits77(1:75)=msgbits(1:75)
|
||||||
! Message structure: S7 D29 S7 D29 S7
|
! Message structure: S7 D29 S7 D29 S7
|
||||||
itone(1:7)=icos7
|
itone(1:7)=icos7
|
||||||
itone(36+1:36+7)=icos7
|
itone(36+1:36+7)=icos7
|
||||||
|
Loading…
Reference in New Issue
Block a user