21 package org.matsim.core.utils.geometry.transformations;
47 private static final double a = 6377397.155;
49 private static final double e = 0.081696831;
53 private static final double k0 = 1.0;
57 private static final double e2 = e*
e;
58 private static final double e_2 = e2 / (1 -
e2);
59 private static final double e1 = (1 - Math.pow(1 - e2, 0.5)) / (1 + Math.pow(1 - e2, 0.5));
60 private static final double M0 = 0.0;
61 private static final double MU1_DIVISOR = a * (1 - e2*(1.0/4.0 - e2*(3.0/64.0) - e2*(5.0/256.0)));
64 (3 *
e1 / 2 - 27 * Math.pow(
e1, 3) / 32),
65 (21 * Math.pow(
e1, 2) / 16 - 55 * Math.pow(
e1, 4) / 32),
66 (151 * Math.pow(
e1, 3) / 96),
67 (1097 * Math.pow(
e1, 4) / 512)
73 double easting = coord.
getX();
74 double northing = coord.
getY();
80 + PHI1_DIVIDENS[0] * Math.sin(2 * mu1)
81 + PHI1_DIVIDENS[1] * Math.sin(4 * mu1)
82 + PHI1_DIVIDENS[2] * Math.sin(6 * mu1)
83 + PHI1_DIVIDENS[3] * Math.sin(8 * mu1);
85 double cosphi1 = Math.cos(phi1);
86 double sinphi1 = Math.sin(phi1);
87 double tanphi1 = Math.tan(phi1);
89 double C1 =
e_2 * cosphi1 * cosphi1;
90 double T1 = Math.pow(tanphi1, 2);
91 double rho1 =
a * (1 -
e2) / Math.pow((1 -
e2 * sinphi1 * sinphi1), 1.5);
92 double nu1 =
a / Math.pow((1 -
e2 * sinphi1 * sinphi1), 0.5);
95 double latitude = phi1
96 - (nu1 * tanphi1 / rho1) * (Math.pow(D, 2) / 2
97 - ( 5 + 3*T1 + 10 * C1 - 4*C1*C1 - 9 *
e_2) * Math.pow(D, 4) / 24
98 + (61 + 90*T1 + 298 * C1 + 45*T1*T1 - 252 *
e_2 - 3 * C1*C1) * Math.pow(D, 6) / 720);
101 - (1 + 2 * T1 + C1) * Math.pow(D, 3) / 6
102 + (5 - 2 * C1 + 28 * T1 - 3 * C1*C1 + 8 *
e_2 + 24 * T1*T1) * Math.pow(D, 5) / 120
105 latitude = latitude * 180.0 / Math.PI;
106 longitude = longitude * 180.0 / Math.PI;
110 elevation = coord.
getZ();
111 return new Coord(longitude, latitude, elevation);
113 return new Coord(longitude, latitude);