diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /lib/ft8var/genft8var.f90 | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'lib/ft8var/genft8var.f90')
| -rwxr-xr-x | lib/ft8var/genft8var.f90 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/ft8var/genft8var.f90 b/lib/ft8var/genft8var.f90 new file mode 100755 index 00000000..defc879e --- /dev/null +++ b/lib/ft8var/genft8var.f90 @@ -0,0 +1,43 @@ +subroutine genft8var(msg,i3,n3,ntxhash,msgsent,msgbits,itone)
+
+! Encode an FT8 message, producing array itone().
+
+ use packjt77var
+ use ft8_mod1, only : icos7,graymap
+ character msg*37,msgsent*37,c77*77
+ integer*1 msgbits(77),codeword(174)
+ integer itone(79)
+ logical unpk77_success
+
+ i3=-1
+ n3=-1
+ call pack77var(msg,i3,n3,c77,ntxhash)
+ if(ntxhash.eq.1) then
+ call unpack77var(c77,0,msgsent,unpk77_success,26) !TX message, unpack to get msgsent, use TX hash tables and do not save RX hash values
+ else
+ call unpack77var(c77,0,msgsent,unpk77_success,27) !service message, unpack to get msgsent. Do not save hash values
+ endif
+ read(c77,'(77i1)',err=1) msgbits
+ if(unpk77_success) go to 2
+1 msgbits=0
+ itone=0
+ msgsent='*** bad message *** '
+ go to 900
+
+entry get_tones_from_77bits(msgbits,itone)
+
+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
+end subroutine genft8var
|
