summaryrefslogtreecommitdiff
path: root/lib/genwave.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2025-01-09 22:12:06 +0100
committerChristoph Berg <myon@debian.org>2025-01-09 22:12:06 +0100
commit992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch)
treefbfdfe6bcb0a8a114be2480dac53d88c977e4869 /lib/genwave.f90
parent4320ce238aae1fe87fc9f379cdd816e9317885fa (diff)
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'lib/genwave.f90')
-rwxr-xr-xlib/genwave.f90104
1 files changed, 52 insertions, 52 deletions
diff --git a/lib/genwave.f90 b/lib/genwave.f90
index 8cd47269..7db4cc7d 100755
--- a/lib/genwave.f90
+++ b/lib/genwave.f90
@@ -1,52 +1,52 @@
-subroutine genwave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave)
-
- real wave(nwave)
- complex cwave(nwave)
- integer hmod
- integer itone(nsym)
- logical ex
- real*8 dt,phi,dphi,twopi,freq,baud
-
- dt=1.d0/fsample
- twopi=8.d0*atan(1.d0)
- baud=fsample/nsps
-
-! Calculate the audio waveform
- phi=0.d0
- if(icmplx.le.0) wave=0.
- if(icmplx.eq.1) cwave=0.
- k=0
- do j=1,nsym
- freq=f0 + itone(j)*hmod*baud
- dphi=twopi*freq*dt
- do i=1,nsps
- k=k+1
- if(icmplx.eq.1) then
- cwave(k)=cmplx(cos(phi),sin(phi))
- else
- wave(k)=sin(phi)
- endif
- phi=phi+dphi
- if(phi.gt.twopi) phi=phi-twopi
- enddo
- enddo
-
-!### TEMPORARY code to allow transmitting both A and B submodes
- inquire(file='Q65_Tx2',exist=ex)
- if(ex) then
- k=0
- do j=1,nsym
- freq=f0 + itone(j)*2.d0*hmod*baud + 500.d0
- dphi=twopi*freq*dt
- do i=1,nsps
- k=k+1
- wave(k)=0.5*(wave(k)+sin(phi))
- phi=phi+dphi
- if(phi.gt.twopi) phi=phi-twopi
- enddo
- enddo
- endif
-!###
-
- return
-end subroutine genwave
+subroutine genwave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave)
+
+ real wave(nwave)
+ complex cwave(nwave)
+ integer hmod
+ integer itone(nsym)
+ logical ex
+ real*8 dt,phi,dphi,twopi,freq,baud
+
+ dt=1.d0/fsample
+ twopi=8.d0*atan(1.d0)
+ baud=fsample/nsps
+
+! Calculate the audio waveform
+ phi=0.d0
+ if(icmplx.le.0) wave=0.
+ if(icmplx.eq.1) cwave=0.
+ k=0
+ do j=1,nsym
+ freq=f0 + itone(j)*hmod*baud
+ dphi=twopi*freq*dt
+ do i=1,nsps
+ k=k+1
+ if(icmplx.eq.1) then
+ cwave(k)=cmplx(cos(phi),sin(phi))
+ else
+ wave(k)=sin(phi)
+ endif
+ phi=phi+dphi
+ if(phi.gt.twopi) phi=phi-twopi
+ enddo
+ enddo
+
+!### TEMPORARY code to allow transmitting both A and B submodes
+ inquire(file='Q65_Tx2',exist=ex)
+ if(ex) then
+ k=0
+ do j=1,nsym
+ freq=f0 + itone(j)*2.d0*hmod*baud + 500.d0
+ dphi=twopi*freq*dt
+ do i=1,nsps
+ k=k+1
+ wave(k)=0.5*(wave(k)+sin(phi))
+ phi=phi+dphi
+ if(phi.gt.twopi) phi=phi-twopi
+ enddo
+ enddo
+ endif
+!###
+
+ return
+end subroutine genwave