From 37d91076fcd07b83518042105d4c79a489aa707a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 28 Aug 2012 14:36:29 +0000 Subject: [PATCH] Fixed the frequency problem. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2532 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/mapsim.f90 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libm65/mapsim.f90 b/libm65/mapsim.f90 index cf887f54a..d904631cd 100644 --- a/libm65/mapsim.f90 +++ b/libm65/mapsim.f90 @@ -34,23 +34,23 @@ program mapsim b=sin(pol/rad) dt=1.d0/fsample - do isig=10,10 - f=-23 + 3*isig - dt=0.05d0*(isig-1) + do isig=1,20 + f=-23000 + 3000*(isig-1) + dphi=twopi*f*dt + 0.5*twopi + ! snrdb=-(19.0 + (isig-1)/2.0) snrdb=-20.0 - sig=sqrt(2500.0/96000.0) * 10.0**(0.05*snrdb) - sig=1.6*sig - dphi=twopi*f*dt + sig=sqrt(2.0*2500.0/96000.0) * 10.0**(0.05*snrdb) + phi=0. - i0=fsample*(3.5d0+dt) - print*,f,dt,dphi,i0,sig + i0=fsample*(3.5d0+0.05d0*(isig-1)) do i=1,nwave phi=phi + dphi -! if(phi.gt.twopi) phi=phi-twopi -! xphi=phi - z=sig*cwave(i)*cmplx(cos(phi),sin(phi)) + if(phi.lt.-twopi) phi=phi+twopi + if(phi.gt.twopi) phi=phi-twopi + xphi=phi + z=sig*cwave(i)*cmplx(cos(xphi),-sin(xphi)) zx=a*z zy=b*z j=i+i0