mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 02:12:37 -04:00
Complete the process of separating calculation of the sync waveform.
This commit is contained in:
parent
254a15b4f6
commit
f896df064d
@ -3,6 +3,7 @@ subroutine sfox_gen(idat,f0,fsample,syncwidth,cdat)
|
|||||||
use sfox_mod
|
use sfox_mod
|
||||||
! include "sfox_params.f90"
|
! include "sfox_params.f90"
|
||||||
complex cdat(NMAX) !Generated complex waveform
|
complex cdat(NMAX) !Generated complex waveform
|
||||||
|
complex ctmp(NSYNC)
|
||||||
complex w,wstep
|
complex w,wstep
|
||||||
integer idat(NN)
|
integer idat(NN)
|
||||||
|
|
||||||
@ -25,20 +26,10 @@ subroutine sfox_gen(idat,f0,fsample,syncwidth,cdat)
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! Sync waveform
|
! Calculate and insert sync waveform
|
||||||
a1=f0 + syncwidth/2.0 !Frequency at midpoint of sync waveform
|
call sweep(f0,syncwidth,fsample,w,ctmp,nsync)
|
||||||
a2=2.0*syncwidth/tsync !Frequency drift rate
|
cdat(j:j+nsync-1)=ctmp
|
||||||
x0=0.5*(nsync+1)
|
j=j+nsync
|
||||||
s=2.0/nsync
|
|
||||||
do i=1,nsync
|
|
||||||
j=j+1
|
|
||||||
if(i.eq.nsync/2+1) a2=-a2 !Reverse sign of drift at midpoint
|
|
||||||
x=s*(i-x0)
|
|
||||||
dphi=(a1 + x*a2) * (twopi/fsample)
|
|
||||||
wstep=cmplx(cos(dphi),sin(dphi))
|
|
||||||
w=w*wstep
|
|
||||||
cdat(j)=w
|
|
||||||
enddo
|
|
||||||
|
|
||||||
! Final group of data symbols:
|
! Final group of data symbols:
|
||||||
do n=1,ND2
|
do n=1,ND2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user