mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	FT8: Use GFSK waveform with BT=4.0 as reference for subtraction, for now. May want to change to BT=2.0 before v2.1 release?
This commit is contained in:
		
							parent
							
								
									56c1aacbc2
								
							
						
					
					
						commit
						cd8ea16f40
					
				@ -57,6 +57,7 @@ program ft8sim_gfsk
 | 
				
			|||||||
  baud=1.0/tt                            !Keying rate (baud)
 | 
					  baud=1.0/tt                            !Keying rate (baud)
 | 
				
			||||||
  bw=8*baud                              !Occupied bandwidth (Hz)
 | 
					  bw=8*baud                              !Occupied bandwidth (Hz)
 | 
				
			||||||
  txt=NZ*dt                              !Transmission length (s)
 | 
					  txt=NZ*dt                              !Transmission length (s)
 | 
				
			||||||
 | 
					  bt=2.0                         
 | 
				
			||||||
  bandwidth_ratio=2500.0/(fs/2.0)
 | 
					  bandwidth_ratio=2500.0/(fs/2.0)
 | 
				
			||||||
  sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
 | 
					  sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
 | 
				
			||||||
  if(snrdb.gt.90.0) sig=1.0
 | 
					  if(snrdb.gt.90.0) sig=1.0
 | 
				
			||||||
@ -67,7 +68,7 @@ program ft8sim_gfsk
 | 
				
			|||||||
  n3=-1
 | 
					  n3=-1
 | 
				
			||||||
  call pack77(msg37,i3,n3,c77)
 | 
					  call pack77(msg37,i3,n3,c77)
 | 
				
			||||||
  call genft8(msg37,i3,n3,msgsent37,msgbits,itone)
 | 
					  call genft8(msg37,i3,n3,msgsent37,msgbits,itone)
 | 
				
			||||||
  call gen_ft8wave(itone,NN,NSPS,fs,f0,cwave,xjunk,1,NWAVE)  !Generate complex cwave
 | 
					  call gen_ft8wave(itone,NN,NSPS,bt,fs,f0,cwave,xjunk,1,NWAVE)  !Generate complex cwave
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  write(*,*)  
 | 
					  write(*,*)  
 | 
				
			||||||
  write(*,'(a23,a37,3x,a7,i1,a1,i1)') 'New Style FT8 Message: ',msgsent37,'i3.n3: ',i3,'.',n3
 | 
					  write(*,'(a23,a37,3x,a7,i1,a1,i1)') 'New Style FT8 Message: ',msgsent37,'i3.n3: ',i3,'.',n3
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
subroutine gen_ft8wave(itone,nsym,nsps,fsample,f0,cwave,wave,icmplx,nwave)
 | 
					subroutine gen_ft8wave(itone,nsym,nsps,bt,fsample,f0,cwave,wave,icmplx,nwave)
 | 
				
			||||||
!
 | 
					!
 | 
				
			||||||
! generate ft8 waveform using Gaussian-filtered frequency pulses.
 | 
					! generate ft8 waveform using Gaussian-filtered frequency pulses.
 | 
				
			||||||
!
 | 
					!
 | 
				
			||||||
@ -9,21 +9,20 @@ subroutine gen_ft8wave(itone,nsym,nsps,fsample,f0,cwave,wave,icmplx,nwave)
 | 
				
			|||||||
  real pulse(23040)
 | 
					  real pulse(23040)
 | 
				
			||||||
  real dphi(0:(nsym+2)*nsps-1)
 | 
					  real dphi(0:(nsym+2)*nsps-1)
 | 
				
			||||||
  integer itone(nsym)
 | 
					  integer itone(nsym)
 | 
				
			||||||
  logical first
 | 
					  data first/.true./,ibt0/0/
 | 
				
			||||||
  data first/.true./
 | 
					  save pulse,twopi,dt,hmod,ibt0
 | 
				
			||||||
  save pulse,first,twopi,dt,hmod
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(first) then
 | 
					  ibt=nint(10*bt)
 | 
				
			||||||
 | 
					  if(ibt0.ne.ibt) then
 | 
				
			||||||
     twopi=8.0*atan(1.0)
 | 
					     twopi=8.0*atan(1.0)
 | 
				
			||||||
     dt=1.0/fsample
 | 
					     dt=1.0/fsample
 | 
				
			||||||
     hmod=1.0
 | 
					     hmod=1.0
 | 
				
			||||||
     bt=2.0
 | 
					 | 
				
			||||||
! Compute the frequency-smoothing pulse
 | 
					! Compute the frequency-smoothing pulse
 | 
				
			||||||
     do i=1,3*nsps
 | 
					     do i=1,3*nsps
 | 
				
			||||||
        tt=(i-1.5*nsps)/real(nsps)
 | 
					        tt=(i-1.5*nsps)/real(nsps)
 | 
				
			||||||
        pulse(i)=gfsk_pulse(bt,tt)
 | 
					        pulse(i)=gfsk_pulse(bt,tt)
 | 
				
			||||||
     enddo
 | 
					     enddo
 | 
				
			||||||
     first=.false.
 | 
					     ibt0=nint(10*bt)
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
! Compute the smoothed frequency waveform.
 | 
					! Compute the smoothed frequency waveform.
 | 
				
			||||||
 | 
				
			|||||||
@ -11,16 +11,22 @@ subroutine subtractft8(dd,itone,f0,dt)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  parameter (NMAX=15*12000,NFRAME=1920*79)
 | 
					  parameter (NMAX=15*12000,NFRAME=1920*79)
 | 
				
			||||||
  parameter (NFFT=NMAX,NFILT=1400)
 | 
					  parameter (NFFT=NMAX,NFILT=1400)
 | 
				
			||||||
  real*4  dd(NMAX), window(-NFILT/2:NFILT/2)
 | 
					  real*4  dd(NMAX), window(-NFILT/2:NFILT/2), xjunk
 | 
				
			||||||
  complex cref,camp,cfilt,cw
 | 
					  complex cref,camp,cfilt,cw
 | 
				
			||||||
  integer itone(79)
 | 
					  integer itone(79)
 | 
				
			||||||
  logical first
 | 
					  logical first
 | 
				
			||||||
  data first/.true./
 | 
					  data first/.true./
 | 
				
			||||||
  common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX)
 | 
					  common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX),xjunk(NFRAME)
 | 
				
			||||||
  save first
 | 
					  save first
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  nstart=dt*12000+1
 | 
					  nstart=dt*12000+1
 | 
				
			||||||
  call genft8refsig(itone,cref,f0)
 | 
					!  call genft8refsig(itone,cref,f0)
 | 
				
			||||||
 | 
					  nsym=79
 | 
				
			||||||
 | 
					  nsps=1920
 | 
				
			||||||
 | 
					  fs=12000.0
 | 
				
			||||||
 | 
					  icmplx=1
 | 
				
			||||||
 | 
					  bt=4.0      ! Temporary compromise?
 | 
				
			||||||
 | 
					  call gen_ft8wave(itone,nsym,nsps,bt,fs,f0,cref,xjunk,icmplx,NFRAME)
 | 
				
			||||||
  camp=0.
 | 
					  camp=0.
 | 
				
			||||||
  do i=1,nframe
 | 
					  do i=1,nframe
 | 
				
			||||||
    id=nstart-1+i 
 | 
					    id=nstart-1+i 
 | 
				
			||||||
 | 
				
			|||||||
@ -102,7 +102,7 @@ extern "C" {
 | 
				
			|||||||
  void genft4_(char* msg, int* ichk, char* msgsent, int itone[],
 | 
					  void genft4_(char* msg, int* ichk, char* msgsent, int itone[],
 | 
				
			||||||
               fortran_charlen_t, fortran_charlen_t);
 | 
					               fortran_charlen_t, fortran_charlen_t);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void gen_ft8wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
 | 
					  void gen_ft8wave_(int itone[], int* nsym, int* nsps, float* bt, float* fsample, float* f0,
 | 
				
			||||||
                    float xjunk[], float wave[], int* icmplx, int* nwave);
 | 
					                    float xjunk[], float wave[], int* icmplx, int* nwave);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void gen_ft4wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
 | 
					  void gen_ft4wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
 | 
				
			||||||
@ -3701,10 +3701,11 @@ void MainWindow::guiUpdate()
 | 
				
			|||||||
              int nsym=79;
 | 
					              int nsym=79;
 | 
				
			||||||
              int nsps=4*1920;
 | 
					              int nsps=4*1920;
 | 
				
			||||||
              float fsample=48000.0;
 | 
					              float fsample=48000.0;
 | 
				
			||||||
 | 
					              float bt=2.0;
 | 
				
			||||||
              float f0=ui->TxFreqSpinBox->value() - m_XIT;
 | 
					              float f0=ui->TxFreqSpinBox->value() - m_XIT;
 | 
				
			||||||
              int icmplx=0;
 | 
					              int icmplx=0;
 | 
				
			||||||
              int nwave=nsym*nsps;
 | 
					              int nwave=nsym*nsps;
 | 
				
			||||||
              gen_ft8wave_(const_cast<int *>(itone),&nsym,&nsps,&fsample,&f0,foxcom_.wave,
 | 
					              gen_ft8wave_(const_cast<int *>(itone),&nsym,&nsps,&bt,&fsample,&f0,foxcom_.wave,
 | 
				
			||||||
                           foxcom_.wave,&icmplx,&nwave);
 | 
					                           foxcom_.wave,&icmplx,&nwave);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              if(SpecOp::FOX == m_config.special_op_id()) {
 | 
					              if(SpecOp::FOX == m_config.special_op_id()) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user