12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- ***********************************************************************
- c ORBEL_ZGET.F
- ***********************************************************************
- * PURPOSE: Solves the equivalent of Kepler's eqn. for a parabola
- * given Q (Fitz. notation.)
- *
- * Input:
- * q ==> parabola mean anomaly. (real scalar)
- * Returns:
- * orbel_zget ==> eccentric anomaly. (real scalar)
- *
- * ALGORITHM: p. 70-72 of Fitzpatrick's book "Princ. of Cel. Mech."
- * REMARKS: For a parabola we can solve analytically.
- * AUTHOR: M. Duncan
- * DATE WRITTEN: May 11, 1992.
- * REVISIONS: May 27 - corrected it for negative Q and use power
- * series for small Q.
- ***********************************************************************
- real*8 function orbel_zget(q)
- include '../swift.inc'
- c... Inputs Only:
- real*8 q
- c... Internals:
- integer iflag
- real*8 x,tmp
- c----
- c... Executable code
- iflag = 0
- if(q.lt.0.d0) then
- iflag = 1
- q = -q
- endif
- if (q.lt.1.d-3) then
- orbel_zget = q*(1.d0 - (q*q/3.d0)*(1.d0 -q*q))
- else
- x = 0.5d0*(3.d0*q + sqrt(9.d0*(q**2) +4.d0))
- tmp = x**(1.d0/3.d0)
- orbel_zget = tmp - 1.d0/tmp
- endif
- if(iflag .eq.1) then
- orbel_zget = -orbel_zget
- q = -q
- endif
-
- return
- end ! orbel_zget
- c----------------------------------------------------------------------
|