summaryrefslogtreecommitdiff
path: root/map65/libm65/txpol.f90
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/libm65/txpol.f90
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'map65/libm65/txpol.f90')
-rw-r--r--map65/libm65/txpol.f9077
1 files changed, 44 insertions, 33 deletions
diff --git a/map65/libm65/txpol.f90 b/map65/libm65/txpol.f90
index 042d3e54..4ec9336b 100644
--- a/map65/libm65/txpol.f90
+++ b/map65/libm65/txpol.f90
@@ -1,33 +1,44 @@
-subroutine txpol(xpol,decoded,mygrid,npol,nxant,ntxpol,cp)
-
-! If Tx station's grid is in decoded message, compute optimum TxPol
- character*22 decoded
- character*6 mygrid,grid
- character*1 cp
- logical xpol
-
- ntxpol=0
- i1=index(decoded,' ')
- i2=index(decoded(i1+1:),' ') + i1
- grid=' '
- if(i2.ge.8 .and. i2.le.18) grid=decoded(i2+1:i2+4)//'mm'
- ntxpol=0
- cp=' '
- if(xpol .and.grid(1:4).ne.'RR73') then
- if(grid(1:1).ge.'A' .and. grid(1:1).le.'R' .and. &
- grid(2:2).ge.'A' .and. grid(2:2).le.'R' .and. &
- grid(3:3).ge.'0' .and. grid(3:3).le.'9' .and. &
- grid(4:4).ge.'0' .and. grid(4:4).le.'9') then
- ntxpol=mod(npol-nint(2.0*dpol(mygrid,grid))+720,180)
- if(nxant.eq.0) then
- cp='H'
- if(ntxpol.gt.45 .and. ntxpol.le.135) cp='V'
- else
- cp='/'
- if(ntxpol.ge.90 .and. ntxpol.lt.180) cp='\'
- endif
- endif
- endif
-
- return
-end subroutine txpol
+module txpol_mod
+ implicit none
+contains
+ subroutine txpol(xpol,decoded,mygrid,npol,nxant,ntxpol,cp)
+
+ use dpol_mod
+ implicit none
+
+ ! If Tx station's grid is in decoded message, compute optimum TxPol
+ character*(*), intent(in) :: decoded
+ character(len=6), intent(in) :: mygrid
+ character(len=1), intent(out) :: cp
+ logical, intent(in) :: xpol
+ integer, intent(in) :: npol,nxant
+ integer, intent(out) :: ntxpol
+
+ integer :: i1,i2
+ character(len=6) :: grid
+
+ ntxpol=0
+ i1=index(decoded,' ')
+ i2=index(decoded(i1+1:),' ') + i1
+ grid=' '
+ if(i2.ge.8 .and. i2.le.18) grid=decoded(i2+1:i2+4)//'mm'
+ ntxpol=0
+ cp=' '
+ if(xpol .and.grid(1:4).ne.'RR73') then
+ if(grid(1:1).ge.'A' .and. grid(1:1).le.'R' .and. &
+ grid(2:2).ge.'A' .and. grid(2:2).le.'R' .and. &
+ grid(3:3).ge.'0' .and. grid(3:3).le.'9' .and. &
+ grid(4:4).ge.'0' .and. grid(4:4).le.'9') then
+ ntxpol=mod(npol-nint(2.0*dpol(mygrid,grid))+720,180)
+ if(nxant.eq.0) then
+ cp='H'
+ if(ntxpol.gt.45 .and. ntxpol.le.135) cp='V'
+ else
+ cp='/'
+ if(ntxpol.ge.90 .and. ntxpol.lt.180) cp='\'
+ endif
+ endif
+ endif
+
+ end subroutine txpol
+end module txpol_mod