trueAnomaly function

double trueAnomaly(
  1. double eAnom,
  2. double e
)

True anomaly ν from eccentric anomaly e_anom and eccentricity e.

All angles in radians.

Implementation

double trueAnomaly(double eAnom, double e) {
  return 2 * math.atan(math.sqrt((1 + e) / (1 - e)) * math.tan(eAnom / 2));
}