diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/libm65/tm2.f90 | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (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/tm2.f90')
| -rw-r--r-- | map65/libm65/tm2.f90 | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/map65/libm65/tm2.f90 b/map65/libm65/tm2.f90 index fb831fab..45fd2aee 100644 --- a/map65/libm65/tm2.f90 +++ b/map65/libm65/tm2.f90 @@ -1,14 +1,39 @@ -subroutine tm2(day,xlat4,xlon4,xl4,b4) +module tm2_mod + implicit none - implicit real*8 (a-h,o-z) - parameter (RADS=0.0174532925199433d0) + interface + subroutine tmoonsub(day, glat, glong, el, rv, xl, b, pax) + real(8), intent(in) :: day, glat, glong + real(8), intent(out) :: el, rv, xl, b, pax + end subroutine tmoonsub + end interface - real*4 xlat4,xlon4,xl4,b4 +contains - glat=xlat4*RADS - glong=xlon4*RADS - call tmoonsub(day,glat,glong,el,rv,xl,b,pax) - xl4=xl - b4=b +subroutine tm2(day, xlat4, xlon4, xl4, b4) + implicit none + + ! Arguments + real(8), intent(in) :: day + real(4), intent(in) :: xlat4, xlon4 + real(4), intent(out) :: xl4, b4 + + ! Locals + real(8), parameter :: RADS = 0.0174532925199433d0 + real(8) :: glat, glong + real(8) :: el, rv, xl, b, pax + + ! Convert to radians + glat = xlat4 * RADS + glong = xlon4 * RADS + + ! Call the external routine + call tmoonsub(day, glat, glong, el, rv, xl, b, pax) + + ! Convert back to real*4 + xl4 = real(xl, 4) + b4 = real(b, 4) end subroutine tm2 + +end module tm2_mod |
