From 49588fde967ab32df2d62d53e2921a2a5b4bf70c Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 6 May 2021 10:27:43 -0500 Subject: [PATCH] Call routine get_q65_tones when generating q65 waveforms. --- map65/libm65/gen_q65_cwave.f90 | 30 ++++++------------------------ map65/libm65/gen_q65_wave.f90 | 30 ++++++------------------------ 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/map65/libm65/gen_q65_cwave.f90 b/map65/libm65/gen_q65_cwave.f90 index f517917b5..0e3d00074 100644 --- a/map65/libm65/gen_q65_cwave.f90 +++ b/map65/libm65/gen_q65_cwave.f90 @@ -3,41 +3,23 @@ subroutine gen_q65_cwave(msg,ntxfreq,ntone_spacing,msgsent,cwave,nwave) ! Encodes a Q65 message to yield complex cwave() at fsample = 96000 Hz use packjt + use q65_encoding parameter (NMAX=60*96000) character*22 msg character*22 msgsent !Message as it will be received - character*120 cmnd - character*80 wsjtx_dir - character*16 cjunk + character*37 msg37 real*8 t,dt,phi,f,f0,dfgen,dphi,twopi,tsym complex cwave(NMAX) - integer itone(85) + integer codeword(65),itone(85) integer icos7(0:6) data icos7/2,5,6,0,4,1,3/ !Defines a 7x7 Costas array data twopi/6.283185307179586476d0/ save - open(9,file='wsjtx_dir.txt',status='old') - read(9,'(a)') wsjtx_dir - close(9) - msgsent=msg -! 1 2 3 4 5 -! 12345678901234567890123456789012345678901234567890123456789012345 - cmnd='q65sim "K1ABC W9XYZ EN37 " A 1500 0 0 0 0 60 0 99 >itone.txt' - cmnd(9:30)=msg - write(cmnd(35:38),'(i4)') ntxfreq - cmnd=trim(wsjtx_dir)//cmnd - call execute_command_line(cmnd) - open(9,file='itone.txt',status='old') - do i=1,99 - read(9,1000,end=999) cjunk -1000 format(a16) - if(cjunk.eq.'Channel symbols:') exit - enddo - read(9,1002) itone -1002 format(20i3) - close(9) + msg37='' + msg37(1:22)=msg + call get_q65_tones(msg37,codeword,itone) ! Set up necessary constants nsym=85 diff --git a/map65/libm65/gen_q65_wave.f90 b/map65/libm65/gen_q65_wave.f90 index c838a51fa..3dd282fd7 100644 --- a/map65/libm65/gen_q65_wave.f90 +++ b/map65/libm65/gen_q65_wave.f90 @@ -3,41 +3,23 @@ subroutine gen_q65_wave(msg,ntxfreq,mode65,msgsent,iwave,nwave) ! Encodes a QRA64 message to yield complex iwave() at fsample = 11025 Hz use packjt + use q65_encoding parameter (NMAX=2*60*11025) character*22 msg character*22 msgsent !Message as it will be received - character*120 cmnd - character*80 wsjtx_dir - character*16 cjunk + character*37 msg37 real*8 t,dt,phi,f,f0,dfgen,dphi,twopi,tsym - integer itone(85) + integer codeword(65),itone(85) integer*2 iwave(NMAX) integer icos7(0:6) data icos7/2,5,6,0,4,1,3/ !Defines a 7x7 Costas array data twopi/6.283185307179586476d0/ save - open(9,file='wsjtx_dir.txt',status='old') - read(9,'(a)') wsjtx_dir - close(9) - msgsent=msg -! 1 2 3 4 5 -! 12345678901234567890123456789012345678901234567890123456789012345 - cmnd='q65sim "K1ABC W9XYZ EN37 " A 1500 0 0 0 0 60 0 99 >itone.txt' - cmnd(9:30)=msg - write(cmnd(35:38),'(i4)') ntxfreq - cmnd=trim(wsjtx_dir)//cmnd - call execute_command_line(cmnd) - open(9,file='itone.txt',status='old') - do i=1,99 - read(9,1000,end=999) cjunk -1000 format(a16) - if(cjunk.eq.'Channel symbols:') exit - enddo - read(9,1002) itone -1002 format(20i3) - close(9) + msg37='' + msg37(1:22)=msg + call get_q65_tones(msg37,codeword,itone) ! Set up necessary constants nsym=85