summaryrefslogtreecommitdiff
path: root/lib/superfox/sfox_wave.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
committerChristoph Berg <myon@debian.org>2026-04-07 19:02:45 +0200
commitf647d78463c1250ce9c99af664615fafccf5e959 (patch)
tree5b00428cef68aef1c9d407e2d4535687422419b6 /lib/superfox/sfox_wave.f90
parent0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff)
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'lib/superfox/sfox_wave.f90')
-rw-r--r--[-rwxr-xr-x]lib/superfox/sfox_wave.f9080
1 files changed, 40 insertions, 40 deletions
diff --git a/lib/superfox/sfox_wave.f90 b/lib/superfox/sfox_wave.f90
index 2e39a1c6..db69899c 100755..100644
--- a/lib/superfox/sfox_wave.f90
+++ b/lib/superfox/sfox_wave.f90
@@ -1,40 +1,40 @@
-subroutine sfox_wave(fname)
-
-! Called by WSJT-X when it's time for SuperFox to transmit. Reads array
-! itone(1:151) from disk file 'sfox_2.dat' in the writable data directory.
-
- parameter (NWAVE=(160+2)*134400*4) !Max WSJT-X waveform (FST4-1800 at 48kHz)
- parameter (NN=151,NSPS=1024)
- character*(*) fname
- integer itone(151)
- real*8 dt,twopi,f0,baud,phi,dphi
-
- common/foxcom/wave(NWAVE)
-
- wave=0.
- open(25,file=trim(fname),status='unknown',err=999)
- read(25,'(20i4)',err=999,end=999) itone
- close(25)
- if(itone(1).lt.0 .or. itone(1).gt.128) go to 999
-
-! Generate the SuperFox waveform.
-
- dt=1.d0/48000.d0
- twopi=8.d0*atan(1.d0)
- f0=750.0d0
- phi=0.d0
- baud=12000.d0/NSPS
- k=0
- do j=1,NN
- f=f0 + baud*mod(itone(j),128)
- dphi=twopi*f*dt
- do ii=1,4*NSPS
- k=k+1
- phi=phi+dphi
- xphi=phi
- wave(k)=sin(xphi)
- enddo
- enddo
-
-999 return
-end subroutine sfox_wave
+subroutine sfox_wave(fname)
+
+! Called by WSJT-X when it's time for SuperFox to transmit. Reads array
+! itone(1:151) from disk file 'sfox_2.dat' in the writable data directory.
+
+ parameter (NWAVE=(160+2)*134400*4) !Max WSJT-X waveform (FST4-1800 at 48kHz)
+ parameter (NN=151,NSPS=1024)
+ character*(*) fname
+ integer itone(151)
+ real*8 dt,twopi,f0,baud,phi,dphi
+
+ common/foxcom/wave(NWAVE)
+
+ wave=0.
+ open(25,file=trim(fname),status='unknown',err=999)
+ read(25,'(20i4)',err=999,end=999) itone
+ close(25)
+ if(itone(1).lt.0 .or. itone(1).gt.128) go to 999
+
+! Generate the SuperFox waveform.
+
+ dt=1.d0/48000.d0
+ twopi=8.d0*atan(1.d0)
+ f0=750.0d0
+ phi=0.d0
+ baud=12000.d0/NSPS
+ k=0
+ do j=1,NN
+ f=f0 + baud*mod(itone(j),128)
+ dphi=twopi*f*dt
+ do ii=1,4*NSPS
+ k=k+1
+ phi=phi+dphi
+ xphi=phi
+ wave(k)=sin(xphi)
+ enddo
+ enddo
+
+999 return
+end subroutine sfox_wave