radiusOfCurvature function

double radiusOfCurvature(
  1. double phi, {
  2. double er = earthEr,
  3. double fl = earthFl,
})

Radius of curvature of meridian at latitude phi in km.

Implementation

double radiusOfCurvature(double phi,
    {double er = earthEr, double fl = earthFl}) {
  final s = math.sin(phi);
  final e2 = (2 - fl) * fl;
  return er * (1 - e2) / math.pow(1 - e2 * s * s, 1.5);
}