gcj02tobd09 static method

Coords gcj02tobd09(
  1. Coords coords
)

Implementation

static Coords gcj02tobd09(Coords coords) {
  final double z = sqrt(coords.longitude * coords.longitude +
          coords.latitude * coords.latitude) +
      0.00002 * sin(coords.latitude * _xPi);
  final double theta = atan2(coords.latitude, coords.longitude) +
      0.000003 * cos(coords.longitude * _xPi);
  final double bdLng = z * cos(theta) + 0.0065;
  final double bdLat = z * sin(theta) + 0.006;
  return Coords(bdLat, bdLng);
}