1 SUBROUTINE tperi(SEMI,Q,UPR,MB,DT)
16 IMPLICIT REAL*8 (a-h,m,o-z)
21 r = q(1)**2 + q(2)**2 + q(3)**2 + q(4)**2
22 v2 = upr(1)**2 + upr(2)**2 + upr(3)**2 + upr(4)**2
23 vr = 2.0d0*(q(1)*upr(1) + q(2)*upr(2) + q(3)*upr(3) + q(4)*upr(4))
27 zeta = 4.0d0*v2/mb - 1.0d0
35 ecc = sqrt(zeta*zeta + alpha*psi*psi)
39 IF (zeta.GT.0.0d0.AND.abs(q1/semi).LT.0.1)
THEN
45 sn1 = q1*sn1*float(2*it)/float(2*it + 1)
48 s = s + sn1*q1*0.9d0/(1.0 - q1)
49 dt = (r*zeta - psi**2 + zeta*s*semi)*psi/(ecc**2*sqrt(mb))
50 ELSE IF (semi.GT.0.0d0)
THEN
52 theta = datan2(psi/sqrt(semi),zeta)
54 dt = semi*sqrt(semi/mb)*(theta - psi/sqrt(semi))
55 ELSE IF (semi.LT.0.0d0)
THEN
57 a1 = psi/(ecc*sqrt(abs(semi)))
59 a2 = abs(a1) + sqrt(a1**2 + 1.0d0)
61 IF (a1.LT.0.0d0) theta = -theta
63 dt = a0*sqrt(a0/mb)*(psi/sqrt(a0) - theta)