function EqKepler, E, arg @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; EqKepler ; PURPOSE: ; Kepler's equation is used in the determination of orbital positions. ; It gives the relation between mean and eccentric anomaly (for given ; orbit eccentricity). ; CATEGORY: ; smei/gen/idl/ephem ; CALLING SEQUENCE: ; F = EqKepler(E,arg) ; INPUTS: ; E scalar; type: float ; eccentric anomaly (radians) ; arg array[2], type: float ; arg[0] mean anomaly (radians) ; arg[1] orbit ellipticity (eccentricity) ; OUTPUTS: ; EqKepler fnc value ; PROCEDURE: ; The eccentric anomaly is the root of Kepler's equation: ; EqKepler = X-arg[1]*sin(X)-arg[0] = 0 ; See O. Montenbruck, "Practical Ephemeris Calculations", Springer ; (1989), par. 3.1.1.4, p. 44 ; MODIFICATION HISTORY: ; 1990, Paul Hick (UCSD) ;- if arg[1] lt 1 then $ ; Bound orbits F = E-arg[1]*sin (E)-arg[0] $ else $ F = E-arg[1]*sinh(E)+arg[0] return, F & end