From 7d23849786a568875c3d4c4693137dca672c6ec1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 9 Dec 2017 03:21:48 +0000 Subject: [PATCH] Move subroutine h1() to its own file, h1.f90. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8310 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- CMakeLists.txt | 1 + Versions.cmake | 2 +- lib/ft8/compress.f90 | 18 ------------------ lib/ft8/foxgen.f90 | 20 +------------------- lib/ft8/h1.f90 | 17 +++++++++++++++++ 5 files changed, 20 insertions(+), 38 deletions(-) create mode 100644 lib/ft8/h1.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8525875b2..a70cb63ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -471,6 +471,7 @@ set (wsjt_FSRCS lib/graycode65.f90 lib/grayline.f90 lib/grid2deg.f90 + lib/ft8/h1.f90 lib/hash.f90 lib/hint65.f90 lib/hspec.f90 diff --git a/Versions.cmake b/Versions.cmake index 11b2106d3..ae23d6580 100644 --- a/Versions.cmake +++ b/Versions.cmake @@ -1,6 +1,6 @@ # Version number components set (WSJTX_VERSION_MAJOR 1) -set (WSJTX_VERSION_MINOR 7) +set (WSJTX_VERSION_MINOR 8) set (WSJTX_VERSION_PATCH 1) set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build diff --git a/lib/ft8/compress.f90 b/lib/ft8/compress.f90 index dc88da206..506e23833 100644 --- a/lib/ft8/compress.f90 +++ b/lib/ft8/compress.f90 @@ -23,24 +23,6 @@ subroutine compress(c) return end subroutine compress -real function h1(x) - -! sigma=1.0/sqrt(2.0) - sigma=1.0 - xlim=sigma/sqrt(6.0) - ax=abs(x) - sgnx=1.0 - if(x.lt.0) sgnx=-1.0 - if(ax.le.xlim) then - h1=x - else - z=exp(1.0/6.0 - (ax/sigma)**2) - h1=sgnx*sqrt(6.0)*sigma*(2.0/3.0 - 0.5*z) - endif - - return -end function h1 - subroutine wavestats(x,kz,rms,pk,pwr_pk,pwr_ave) real x(kz) diff --git a/lib/ft8/foxgen.f90 b/lib/ft8/foxgen.f90 index 4ce4d513a..881ea9d06 100644 --- a/lib/ft8/foxgen.f90 +++ b/lib/ft8/foxgen.f90 @@ -22,7 +22,7 @@ subroutine foxgen() character*6 mygrid character*87 cbits character*88 cb88 - logical bcontest,checksumok + logical bcontest integer itone(NN) integer icos7(0:6) integer*1 msgbits(KK),codeword(3*ND),msgbits2 @@ -153,21 +153,3 @@ subroutine foxgen() return end subroutine foxgen - -real function h1(x) - -! sigma=1.0/sqrt(2.0) - sigma=1.0 - xlim=sigma/sqrt(6.0) - ax=abs(x) - sgnx=1.0 - if(x.lt.0) sgnx=-1.0 - if(ax.le.xlim) then - h1=x - else - z=exp(1.0/6.0 - (ax/sigma)**2) - h1=sgnx*sqrt(6.0)*sigma*(2.0/3.0 - 0.5*z) - endif - - return -end function h1 diff --git a/lib/ft8/h1.f90 b/lib/ft8/h1.f90 new file mode 100644 index 000000000..aeed3f468 --- /dev/null +++ b/lib/ft8/h1.f90 @@ -0,0 +1,17 @@ +real function h1(x) + +! sigma=1.0/sqrt(2.0) + sigma=1.0 + xlim=sigma/sqrt(6.0) + ax=abs(x) + sgnx=1.0 + if(x.lt.0) sgnx=-1.0 + if(ax.le.xlim) then + h1=x + else + z=exp(1.0/6.0 - (ax/sigma)**2) + h1=sgnx*sqrt(6.0)*sigma*(2.0/3.0 - 0.5*z) + endif + + return +end function h1