diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /map65/libm65/s3avg.f90 | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'map65/libm65/s3avg.f90')
| -rwxr-xr-x | map65/libm65/s3avg.f90 | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/map65/libm65/s3avg.f90 b/map65/libm65/s3avg.f90 index 9d76637c..f8f68ac5 100755 --- a/map65/libm65/s3avg.f90 +++ b/map65/libm65/s3avg.f90 @@ -1,60 +1,60 @@ -subroutine s3avg(nsave,mode65,nutc,nhz,xdt,npol,ntol,s3,nsum,nkv,decoded) - -! Save the current synchronized spectra, s3(64,63), for possible -! decoding of average. - - real s3(64,63) !Synchronized spectra for 63 symbols - real s3a(64,63,64) !Saved spectra - real s3b(64,63) !Average spectra - integer iutc(64),ihz(64),ipol(64) - real dt(64) - character*22 decoded - logical ltext,first - data first/.true./ - save - - if(first) then - iutc=-1 - ihz=0 - ipol=0 - first=.false. - ihzdiff=min(100,ntol) - dtdiff=0.2 - endif - - do i=1,64 - if(nutc.eq.iutc(i) .and. abs(nhz-ihz(i)).lt.ihzdiff) then - nsave=mod(nsave-1+64,64)+1 - go to 10 - endif - enddo - - iutc(nsave)=nutc !Save UTC - ihz(nsave)=nhz !Save freq in Hz - ipol(nsave)=npol !Save pol - dt(nsave)=xdt !Save DT - s3a(1:64,1:63,nsave)=s3 !Save the spectra - -10 s3b=0. - do i=1,64 !Accumulate avg spectra - if(iutc(i).lt.0) cycle - if(mod(iutc(i),2).ne.mod(nutc,2)) cycle !Use only same sequence - if(abs(nhz-ihz(i)).gt.ihzdiff) cycle !Freq must match - if(abs(xdt-dt(i)).gt.dtdiff) cycle !DT must match - s3b=s3b + s3a(1:64,1:63,i) - nsum=nsum+1 - enddo - - decoded=' ' - if(nsum.ge.2) then !Try decoding the sverage - nadd=mode65*nsum - call extract(s3b,nadd,ncount,nhist,decoded,ltext) !Extract the message - nkv=nsum - if(ncount.lt.0) then - nkv=0 - decoded=' ' - endif - endif - - return -end subroutine s3avg +subroutine s3avg(nsave,mode65,nutc,nhz,xdt,npol,ntol,s3,nsum,nkv,decoded)
+
+! Save the current synchronized spectra, s3(64,63), for possible
+! decoding of average.
+
+ real s3(64,63) !Synchronized spectra for 63 symbols
+ real s3a(64,63,64) !Saved spectra
+ real s3b(64,63) !Average spectra
+ integer iutc(64),ihz(64),ipol(64)
+ real dt(64)
+ character*22 decoded
+ logical ltext,first
+ data first/.true./
+ save
+
+ if(first) then
+ iutc=-1
+ ihz=0
+ ipol=0
+ first=.false.
+ ihzdiff=min(100,ntol)
+ dtdiff=0.2
+ endif
+
+ do i=1,64
+ if(nutc.eq.iutc(i) .and. abs(nhz-ihz(i)).lt.ihzdiff) then
+ nsave=mod(nsave-1+64,64)+1
+ go to 10
+ endif
+ enddo
+
+ iutc(nsave)=nutc !Save UTC
+ ihz(nsave)=nhz !Save freq in Hz
+ ipol(nsave)=npol !Save pol
+ dt(nsave)=xdt !Save DT
+ s3a(1:64,1:63,nsave)=s3 !Save the spectra
+
+10 s3b=0.
+ do i=1,64 !Accumulate avg spectra
+ if(iutc(i).lt.0) cycle
+ if(mod(iutc(i),2).ne.mod(nutc,2)) cycle !Use only same sequence
+ if(abs(nhz-ihz(i)).gt.ihzdiff) cycle !Freq must match
+ if(abs(xdt-dt(i)).gt.dtdiff) cycle !DT must match
+ s3b=s3b + s3a(1:64,1:63,i)
+ nsum=nsum+1
+ enddo
+
+ decoded=' '
+ if(nsum.ge.2) then !Try decoding the sverage
+ nadd=mode65*nsum
+ call extract(s3b,nadd,ncount,nhist,decoded,ltext) !Extract the message
+ nkv=nsum
+ if(ncount.lt.0) then
+ nkv=0
+ decoded=' '
+ endif
+ endif
+
+ return
+end subroutine s3avg
|
