orbel_ehybrid.f 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ***********************************************************************
  2. c ORBEL_EHYBRID.F
  3. ***********************************************************************
  4. * PURPOSE: Solves Kepler's eqn. e is ecc. m is mean anomaly.
  5. *
  6. * Input:
  7. * e ==> eccentricity anomaly. (real scalar)
  8. * m ==> mean anomaly. (real scalar)
  9. * Returns:
  10. * orbel_ehybrid ==> eccentric anomaly. (real scalar)
  11. *
  12. * ALGORITHM: For e < 0.18 uses fast routine ESOLMD
  13. * For larger e but less than 0.8, uses EGET
  14. * For e > 0.8 uses EHIE
  15. * REMARKS: Only EHIE brings M and E into range (0,TWOPI)
  16. * AUTHOR: M. Duncan
  17. * DATE WRITTEN: May 25,1992.
  18. * REVISIONS: 2/26/93 hfl
  19. ***********************************************************************
  20. real*8 function orbel_ehybrid(e,m)
  21. include '../swift.inc'
  22. c... Inputs Only:
  23. real*8 e,m
  24. c... Internals:
  25. real*8 orbel_esolmd,orbel_eget,orbel_ehie
  26. c----
  27. c... Executable code
  28. if(e .lt. 0.18d0) then
  29. orbel_ehybrid = orbel_esolmd(e,m)
  30. else
  31. if( e .le. 0.8d0) then
  32. orbel_ehybrid = orbel_eget(e,m)
  33. else
  34. orbel_ehybrid = orbel_ehie(e,m)
  35. endif
  36. endif
  37. return
  38. end ! orbel_ehybrid
  39. c--------------------------------------------------------------------