diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/ft8var/genft8sdvar.f90 | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'lib/ft8var/genft8sdvar.f90')
| -rw-r--r-- | lib/ft8var/genft8sdvar.f90 | 54 |
1 files changed, 11 insertions, 43 deletions
diff --git a/lib/ft8var/genft8sdvar.f90 b/lib/ft8var/genft8sdvar.f90 index ae2ca408..36eefda6 100644 --- a/lib/ft8var/genft8sdvar.f90 +++ b/lib/ft8var/genft8sdvar.f90 @@ -1,46 +1,14 @@ subroutine genft8sdvar(msg,i3,n3,msgsent,msgbits,itone) - -! Encode an FT8 message, producing array itone(). - - use packjt77 - use ft8_mod1, only : icos7,graymap - character msg*37,msgsent*37,c77*77 - integer*1 msgbits(77),codeword(174) - integer itone(79) - logical unpk77_successvar - - i3=-1 - n3=-1 - call pack77(msg,i3,n3,c77,pack77_options(record_tx_hashes=.false.)) - ! SD thresholds are calibrated for classic Type 1/2 templates only. - if(.not.(i3.ge.0 .and. (i3.eq.1 .or. i3.eq.2) .and. & - index(msg,'<').eq.0)) then - i3=-1 - n3=-1 - endif - if(i3.lt.0) go to 1 - call unpack77_configured(c77,0,msgsent,unpk77_successvar, & - unpack77_options(record_hashes=.false.,record_recent_calls=.false.)) - read(c77,'(77i1)',err=1) msgbits - if(unpk77_successvar) go to 2 -1 msgbits=0 - itone=0 - msgsent='*** bad message *** ' - go to 900 - -2 call encode174_91var(msgbits,codeword) !Encode the test message - -! Message structure: S7 D29 S7 D29 S7 - itone(1:7)=icos7; itone(37:43)=icos7; itone(73:79)=icos7 - k=7 - do j=1,58 - i=3*j -2 - k=k+1 - if(j.eq.30) k=k+7 - indx=codeword(i)*4 + codeword(i+1)*2 + codeword(i+2) - itone(k)=graymap(indx) - enddo - -900 return + use ft8var_codec_context, only: genft8sdvar_for_state + use ft8_codec_context, only: get_ft8_codec_state + use packjt77, only: pack77_state + implicit none + character(len=37), intent(in) :: msg + integer, intent(out) :: i3,n3,itone(79) + character(len=37), intent(out) :: msgsent + integer(kind=1), intent(out) :: msgbits(77) + type(pack77_state), pointer :: state + state => get_ft8_codec_state() + call genft8sdvar_for_state(state,msg,i3,n3,msgsent,msgbits,itone) end subroutine genft8sdvar |
