mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 16:42:12 -05:00
c4a1997191
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2464 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
30 lines
752 B
Fortran
30 lines
752 B
Fortran
subroutine iqfix(c,nfft,gain,phase)
|
|
|
|
complex c(0:nfft-1)
|
|
complex z,h,u,v
|
|
real*8 sq1,sq2
|
|
|
|
nh=nfft/2
|
|
h=gain*cmplx(cos(phase),sin(phase))
|
|
|
|
do i=1,nh-1
|
|
u=c(i)
|
|
v=c(nfft-i)
|
|
x=real(u) + real(v) - (aimag(u) + aimag(v))*aimag(h) + &
|
|
(real(u) - real(v))*real(h)
|
|
y=aimag(u) - aimag(v) + (aimag(u) + aimag(v))*real(h) + &
|
|
(real(u) - real(v))*aimag(h)
|
|
c(i)=0.5*cmplx(x,y)
|
|
z=u
|
|
u=v
|
|
v=z
|
|
x=real(u) + real(v) - (aimag(u) + aimag(v))*aimag(h) + &
|
|
(real(u) - real(v))*real(h)
|
|
y=aimag(u) - aimag(v) + (aimag(u) + aimag(v))*real(h) + &
|
|
(real(u) - real(v))*aimag(h)
|
|
c(nfft-i)=0.5*cmplx(x,y)
|
|
enddo
|
|
|
|
return
|
|
end subroutine iqfix
|