fractionVenus function

double fractionVenus(
  1. double jde
)

Approximate illuminated fraction of Venus.

Implementation

double fractionVenus(double jde) {
  final t = j2000Century(jde);
  final v = 261.51 * _p + 22518.443 * _p * t;
  final m = 177.53 * _p + 35999.05 * _p * t;
  final n = 50.42 * _p + 58517.811 * _p * t;
  final w = v + 1.91 * _p * math.sin(m) + 0.78 * _p * math.sin(n);
  final delta = math.sqrt(1.52321 + 1.44666 * math.cos(w));
  final s = 0.72333 + delta;
  return (s * s - 1) / 2.89332 / delta;
}