WSJT-X/qmap/libqmap/cfom.f90

31 lines
484 B
Fortran
Raw Normal View History

subroutine cfom(dd,k0,k,ndop0)
parameter(NMAX=60*96000)
real dd(2,NMAX)
complex*16 w,wstep
complex*8 c
real*8 twopi,dphi
logical first
data first/.true./
save
if(first) then
twopi=8.d0*atan(1.d0)
w=1.d0
first=.false.
endif
dop0=0.5*ndop0
dphi=dop0*twopi/96000.0
wstep=cmplx(cos(dphi),sin(dphi))
do j=k0+1,k
w=w*wstep
c=w*cmplx(dd(1,j),dd(2,j))
dd(1,j)=real(c)
dd(2,j)=aimag(c)
enddo
return
end subroutine cfom