toFK5 function

({double lat, double lon}) toFK5(
  1. double lon,
  2. double lat,
  3. double jde
)

Converts ecliptic longitude and latitude from dynamical frame to FK5.

Formula 32.3, p. 219.

Implementation

({double lon, double lat}) toFK5(double lon, double lat, double jde) {
  final t = j2000Century(jde);
  final lp = lon - toRad((1.397 + 0.00031 * t) * t);
  final sLp = math.sin(lp);
  final cLp = math.cos(lp);
  final l5 = lon + secToRad(-0.09033 + 0.03916 * (cLp + sLp) * math.tan(lat));
  final b5 = lat + secToRad(0.03916 * (cLp - sLp));
  return (lon: l5, lat: b5);
}