diff options
| author | Christoph Berg <myon@debian.org> | 2024-07-20 08:39:32 +0000 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2024-07-20 08:39:32 +0000 |
| commit | fbaeaa72f63f22bf0b53d634f6809cbdfbb46c9f (patch) | |
| tree | 34bf121b8a6f02b43542bd554d59ba6191cd1359 /lib/superfox/sfox_wave.f90 | |
| parent | 93f7198f9c2864ef9630cc0cc9e46d6cc1933aa9 (diff) | |
New upstream version 2.7.0~rc6+dfsgupstream/2.7.0_rc6+dfsg
Diffstat (limited to 'lib/superfox/sfox_wave.f90')
| -rwxr-xr-x | lib/superfox/sfox_wave.f90 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/superfox/sfox_wave.f90 b/lib/superfox/sfox_wave.f90 new file mode 100755 index 00000000..2e39a1c6 --- /dev/null +++ b/lib/superfox/sfox_wave.f90 @@ -0,0 +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
|
