downey@dimed1.UUCP (08/04/90)
Posting-number: Volume 14, Issue 45 Submitted-by: downey@dimed1.UUCP Archive-name: ephem4.13/patch02 Here is a patch to ephem, my interactive astronomical ephemeris, v4.13. It is a very simple change to one file, objx.c. It fixes a problem that occurs in certain circumstances computing the location of objects specified via parabolic orbital elements.o thank you very much. Elwood Downey downey@dimed.com *** objx.13 Thu Aug 2 18:56:52 1990 --- objx.new Thu Aug 2 18:58:54 1990 *************** *** 241,248 sll = sin(ll); cll = cos(ll); ! *lam = atan(rsn*sll/(rpd-rsn*cll))+lpd; ! /* *lam = atan(-1*rpd*sll/(rsn-rpd*cll))+lg+PI; */ range (lam, 2*PI); *bet = atan(rpd*spsi*sin(*lam-lpd)/(cpsi*rsn*sll)); --- 241,250 ----- sll = sin(ll); cll = cos(ll); ! if (rpd < rsn) ! *lam = atan(-1*rpd*sll/(rsn-rpd*cll))+lg+PI; ! else ! *lam = atan(rsn*sll/(rpd-rsn*cll))+lpd; range (lam, 2*PI); *bet = atan(rpd*spsi*sin(*lam-lpd)/(cpsi*rsn*sll));