Merge branch 'feat-fst280' of bitbucket.org:k1jt/wsjtx into feat-fst280

This commit is contained in:
Joe Taylor 2020-07-24 10:59:25 -04:00
commit 28be695ebb
6 changed files with 8 additions and 116 deletions

View File

@ -188,7 +188,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
endif
if(params%nmode.eq.240) then
! We're in FST240 mode
! We're in FST4 mode
ndepth=iand(params%ndepth,3)
iwspr=0
if(iand(params%ndepth,128).ne.0) iwspr=2
@ -203,7 +203,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
endif
if(params%nmode.eq.241) then
! We're in FST240W mode
! We're in FST4W mode
ndepth=iand(params%ndepth,3)
iwspr=1
call timer('dec240 ',0)
@ -732,12 +732,12 @@ contains
write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
else
write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3)
write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
endif
if(fmid.ne.-999.0) then

View File

@ -1,108 +0,0 @@
subroutine genfst240_64(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
! Input:
! - msg0 requested message to be transmitted
! - ichk if ichk=1, return only msgsent
! - msgsent message as it will be decoded
! - i4tone array of audio tone values, {0,1,2,3}
! - iwspr 0: (240,101)/crc24, 1: (240,74)/crc24
!
! Frame structure:
! s8 d30 s8 d30 s8 d30 s8 d30 s8
use packjt77
include 'fst240_params.f90'
character*37 msg0
character*37 message !Message to be generated
character*37 msgsent !Message as it will be received
character*77 c77
character*24 c24
integer*4 i4tone(NN),itmp(ND)
integer*1 codeword(2*ND)
integer*1 msgbits(101),rvec(77)
integer isyncword1(8),isyncword2(8)
integer ncrc24
integer graymap64(64)
logical unpk77_success
data isyncword1/3,1,4,0,6,5,2/
data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, &
1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, &
0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/
data graymap64/ 0, 1, 3, 2, 6, 7, 5, 4,12,13,15,14,10,11, 9, 8, &
24,25,27,26,30,31,29,28,20,21,23,22,18,19,17,16, &
48,49,51,50,54,55,53,52,60,61,63,62,58,59,57,56, &
40,41,43,42,46,47,45,44,36,37,39,38,34,35,33,32/
message=msg0
do i=1, 37
if(ichar(message(i:i)).eq.0) then
message(i:37)=' '
exit
endif
enddo
do i=1,37 !Strip leading blanks
if(message(1:1).ne.' ') exit
message=message(i+1:)
enddo
i3=-1
n3=-1
call pack77(message,i3,n3,c77)
call unpack77(c77,0,msgsent,unpk77_success) !Unpack to get msgsent
msgbits=0
iwspr=0
if(i3.eq.0.and.n3.eq.6) then
iwspr=1
read(c77,'(50i1)') msgbits(1:50)
call get_crc24(msgbits,74,ncrc24)
write(c24,'(b24.24)') ncrc24
read(c24,'(24i1)') msgbits(51:74)
else
read(c77,'(77i1)') msgbits(1:77)
msgbits(1:77)=mod(msgbits(1:77)+rvec,2)
call get_crc24(msgbits,101,ncrc24)
write(c24,'(b24.24)') ncrc24
read(c24,'(24i1)') msgbits(78:101)
endif
if(ichk.eq.1) go to 999
if(unpk77_success) go to 2
1 msgbits=0
itone=0
msgsent='*** bad message *** '
go to 999
entry get_fst240_tones_from_bits(msgbits,i4tone,iwspr)
2 continue
if(iwspr.eq.0) then
call encode240_101(msgbits,codeword)
else
call encode240_74(msgbits(1:74),codeword)
endif
! Grayscale mapping:
! bits tone
do i=1,40
is=codeword(2*i)+2*codeword(2*i-1)
if(is.le.1) itmp(i)=is
if(is.eq.2) itmp(i)=3
if(is.eq.3) itmp(i)=2
enddo
i4tone( 1: 8)=isyncword1
i4tone( 9: 38)=itmp( 1: 30)
i4tone( 39: 46)=isyncword2
i4tone( 47: 76)=itmp( 31: 60)
i4tone( 77: 84)=isyncword1
i4tone( 85:114)=itmp( 61: 90)
i4tone(115:122)=isyncword2
i4tone(123:152)=itmp( 91:120)
i4tone(153:160)=isyncword1
999 return
end subroutine genfst240_64
subroutine graycode(in

View File

@ -5,7 +5,7 @@ subroutine genfst4(msg0,ichk,msgsent,msgbits,i4tone,iwspr)
! - ichk if ichk=1, return only msgsent
! - msgsent message as it will be decoded
! - i4tone array of audio tone values, {0,1,2,3}
! - iwspr in: 0: FST240 1: FST240W
! - iwspr in: 0: FST4 1: FST4W
! out 0: (240,101)/crc24, 1: (240,74)/crc24
!
! Frame structure:

View File

@ -583,7 +583,7 @@ contains
subroutine sync_fst4(cd0,i0,f0,hmod,ncoh,np,nss,ntr,fs,sync)
! Compute sync power for a complex, downsampled FST240 signal.
! Compute sync power for a complex, downsampled FST4 signal.
use timer_module, only: timer
include 'fst4/fst4_params.f90'

View File

@ -15,7 +15,7 @@ subroutine foxgen()
! common block.
parameter (NN=79,ND=58,NSPS=4*1920)
parameter (NWAVE=(160+2)*134400*4) !the biggest waveform we generate (FST240-1800 at 48kHz)
parameter (NWAVE=(160+2)*134400*4) !the biggest waveform we generate (FST4-1800 at 48kHz)
parameter (NFFT=614400,NH=NFFT/2)
character*40 cmsg
character*37 msg,msgsent

View File

@ -1,7 +1,7 @@
subroutine foxgen_wrap(msg40,msgbits,itone)
parameter (NN=79,ND=58,KK=77,NSPS=4*1920)
parameter (NWAVE=(160+2)*134400) !the biggest waveform we generate (FST240-1800)
parameter (NWAVE=(160+2)*134400) !the biggest waveform we generate (FST4-1800)
character*40 msg40,cmsg
character*12 mycall12