100 using namespace MSP::CCS;
108 const double PI = 3.14159265358979323e0;
136 double A[] = { 0.6399175073, -0.1358797613, 0.063294409,
137 -0.02526853, 0.0117879, -0.0055161,
138 0.0026906, -0.001333, 0.00067, -0.00034 };
141 { 0.249204646, 0.003371507 },
142 { -0.001541739, 0.041058560 },
143 { -0.10162907, 0.01727609 },
144 { -0.26623489, -0.36249218 },
145 { -0.6870983, -1.1651967 } };
148 { -0.577245789, -0.007809598 },
149 { 0.508307513, -0.112208952 },
150 { -0.15094762, 0.18200602 },
151 { 1.01418179, 1.64497696 },
152 { 1.9660549, 2.5127645 } };
154 double D[] = { 1.5627014243, 0.5185406398, -0.03333098,
155 -0.1052906, -0.0368594, 0.007317,
156 0.01220, 0.00394, -0.0013 };
212 strcpy( NZMGEllipsoidCode,
"IN" );
219 strcpy( NZMGEllipsoidCode, ellipsoidCode );
280 double longitude = geodeticCoordinates->
longitude();
281 double latitude = geodeticCoordinates->
latitude();
294 for (n = 8; n >= 0; n--)
295 du = du * dphi +
A[n];
305 for (n = 4; n >= 0; n--)
341 Complex z, Zeta, Zeta_Numer, Zeta_Denom, Zeta_sqr;
344 double easting = mapProjectionCoordinates->
easting();
345 double northing = mapProjectionCoordinates->
northing();
361 for (n = 4; n >= 0; n--)
364 Zeta =
add(
C[n], Zeta);
368 for (i = 0; i < 2; i++)
374 for (n = 4; n >= 1; n--)
376 Zeta_Numer =
multiply(Zeta_Numer, Zeta);
379 Zeta_Numer =
add(coeff, Zeta_Numer);
381 Zeta_Denom =
multiply(Zeta_Denom, Zeta);
382 coeff.
real = (n+1) *
B[n].real;
383 coeff.
imag = (n+1) *
B[n].imag;
384 Zeta_Denom =
add(coeff, Zeta_Denom);
388 Zeta_Numer =
multiply(Zeta_Numer, Zeta_sqr);
389 Zeta_Numer =
add(z, Zeta_Numer);
391 Zeta_Denom =
multiply(Zeta_Denom, Zeta);
392 Zeta_Denom =
add(
B[0], Zeta_Denom);
394 Zeta =
divide(Zeta_Numer, Zeta_Denom);
397 for (n = 7; n >= 0; n--)
398 dphi = dphi * Zeta.
real +
D[n];
402 latitude *=
PI / 180.0;
405 if ((longitude >
PI) && (longitude -
PI < 1.0e-6))