From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- lib/libration.f90 | 76 +++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'lib/libration.f90') diff --git a/lib/libration.f90 b/lib/libration.f90 index a9026119..7330d049 100755 --- a/lib/libration.f90 +++ b/lib/libration.f90 @@ -1,38 +1,38 @@ -subroutine libration(jd,RA,Dec,xl,b) - -! Compute optical libration of moon at jd: that is, the sub-observer -! point (xl,b) in selenographic coordinates. RA and Dec are -! topocentric values. - - implicit real*8 (a-h,o-z) - parameter (RADS=0.0174532925199433d0) - parameter (TWOPI=6.28318530717959d0) - real*8 jd,j2000,mjd,lambda - - j2000=2451545.0d0 - RA2000=RA - Dec2000=Dec - year=2000.0d0 + (jd-j2000)/365.25d0 - mjd=jd-2400000.d0 - call sla_PRECES('FK5',year,2000.d0,RA2000,Dec2000) - call sla_EQECL(RA2000,Dec2000,mjd,lambda,beta) - day=jd - j2000 - t = day / 36525.d0 - xi = 1.54242 * RADS - ft = 93.2720993 + 483202.0175273 * t - .0034029 * t * t - b= ft / 360 - a = 360 * (b - floor(b)) - if (a.lt.0.d0) a = 360 + a; - f=a/57.2957795131d0 - omega=sla_dranrm(2.182439196d0 - t*33.7570446085d0 + t*t*3.6236526d-5) - w = lambda - omega - y = sin(w) * cos(beta) * cos(xi) - sin(beta) * sin(xi) - x = cos(w) * cos(beta) - a = sla_dranrm(atan2(y, x)) - xl = a - f - if(xl.lt.-0.25*TWOPI) xl=xl+TWOPI !Fix 'round the back' angles - if(xl.gt.0.25*TWOPI) xl=xl-TWOPI - b = asin(-sin(w) * cos(beta) * sin(xi) - sin(beta) * cos(xi)) - - return -end subroutine libration +subroutine libration(jd,RA,Dec,xl,b) + +! Compute optical libration of moon at jd: that is, the sub-observer +! point (xl,b) in selenographic coordinates. RA and Dec are +! topocentric values. + + implicit real*8 (a-h,o-z) + parameter (RADS=0.0174532925199433d0) + parameter (TWOPI=6.28318530717959d0) + real*8 jd,j2000,mjd,lambda + + j2000=2451545.0d0 + RA2000=RA + Dec2000=Dec + year=2000.0d0 + (jd-j2000)/365.25d0 + mjd=jd-2400000.d0 + call sla_PRECES('FK5',year,2000.d0,RA2000,Dec2000) + call sla_EQECL(RA2000,Dec2000,mjd,lambda,beta) + day=jd - j2000 + t = day / 36525.d0 + xi = 1.54242 * RADS + ft = 93.2720993 + 483202.0175273 * t - .0034029 * t * t + b= ft / 360 + a = 360 * (b - floor(b)) + if (a.lt.0.d0) a = 360 + a; + f=a/57.2957795131d0 + omega=sla_dranrm(2.182439196d0 - t*33.7570446085d0 + t*t*3.6236526d-5) + w = lambda - omega + y = sin(w) * cos(beta) * cos(xi) - sin(beta) * sin(xi) + x = cos(w) * cos(beta) + a = sla_dranrm(atan2(y, x)) + xl = a - f + if(xl.lt.-0.25*TWOPI) xl=xl+TWOPI !Fix 'round the back' angles + if(xl.gt.0.25*TWOPI) xl=xl-TWOPI + b = asin(-sin(w) * cos(beta) * sin(xi) - sin(beta) * cos(xi)) + + return +end subroutine libration -- cgit v1.2.3