code: private double trueAnomaly(double meanAnomaly, double eccentricity)
      {
          // First, solve Kepler's equation iteratively
          // Duffett-Smith, p.90
          double delta;
          double E = meanAnomaly;
          do {
              delta = E - eccentricity * Math.sin(E) - meanAnomaly;
              E = E - delta / (1 - eccentricity * Math.cos(E));
          }
          while (Math.abs(delta) > 1e-5); // epsilon = 1e-5 rad
  
          return 2.0 * Math.atan( Math.tan(E/2) * Math.sqrt( (1+eccentricity)
                                                            /(1-eccentricity) ) );
      }
docs: Find the "true anomaly" (longitude) of an object from
  its mean anomaly and the eccentricity of its orbit.  This uses
  an iterative solution to Kepler's equation.
  
  @param meanAnomaly   The object's longitude calculated as if it were in
  a regular, circular orbit, measured in radians
  from the point of perigee.
  
  @param eccentricity  The eccentricity of the orbit
  
  @return The true anomaly (longitude) measured in radians