class UTM {

    public GeographicPosition convertToLatLon()
    {
        double ecc2 = WGS84EarthConstants.FIRST_ECCENTRICITY_SQ;
        double ecc4 = WGS84EarthConstants.FIRST_ECCENTRICITY_FOURTH;
        double ecc6 = WGS84EarthConstants.FIRST_ECCENTRICITY_SIXTH;

        double e = (1 - Math.sqrt(1 - ecc2)) / (1 + Math.sqrt(1 - ecc2));
        double e2 = e * e;
        double e3 = e2 * e;
        double e4 = e3 * e;

        double x = myEasting - 500000;
        double y = myNorthing;
        if (myHemisphere == Hemisphere.SOUTH)
        {
            y -= 10000000;
        }

        final double zoneHalfWidth = 3.;
        double orginLongitude = (myZone - 1) * 6 - 180. + zoneHalfWidth;

        double m = y / SCALE;

        double mu = m / (WGS84EarthConstants.RADIUS_EQUATORIAL_M * (1 - ecc2 / 4 - 3 * ecc4 / 64 - 5 * ecc6 / 256));

        double phiRad = mu + (3 * e / 2 - 27 * e3 / 32) * Math.sin(2 * mu) + (21 * e2 / 16 - 55 * e4 / 32) * Math.sin(4 * mu)
                + 151 * e3 / 96 * Math.sin(6 * mu);
        double phiRadSin = Math.sin(phiRad);
        double phiRadCos = Math.cos(phiRad);
        double phiRadTan = phiRadSin / phiRadCos;

        double n = WGS84EarthConstants.RADIUS_EQUATORIAL_M / Math.sqrt(1 - ecc2 * phiRadSin * phiRadSin);
        double t = phiRadTan * phiRadTan;
        double t2 = t * t;
        double ePrime2 = WGS84EarthConstants.SECOND_ECCENTRICITY_SQ;
        double c = ePrime2 * phiRadCos * phiRadCos;
        double c2 = c * c;
        final double onePointFive = 1.5;
        double r = WGS84EarthConstants.RADIUS_EQUATORIAL_M * (1 - ecc2)
                / Math.pow(1 - ecc2 * phiRadSin * phiRadSin, onePointFive);
        double d = x / (n * SCALE);
        double d2 = d * d;
        double d3 = d2 * d;
        double d4 = d3 * d;
        double d5 = d4 * d;
        double d6 = d5 * d;

        double latitudeRad = phiRad - n * phiRadTan / r * (d2 / 2 - (5 + 3 * t + 10 * c - 4 * c2 - 9 * ePrime2) * d4 / 24
                + (61 + 90 * t + 298 * c + 45 * t2 - 252 * ePrime2 - 3 * c2) * d6 / 720);

        double longitudeRad = (d - (1 + 2 * t + c) * d3 / 6 + (5 - 2 * c + 28 * t - 3 * c2 + 8 * ePrime2 + 24 * t2) * d5 / 120)
                / phiRadCos;

        double longitudeDeg = orginLongitude + Math.toDegrees(longitudeRad);

        GeographicPosition geoPos = new GeographicPosition(
                LatLonAlt.createFromDegrees(Math.toDegrees(latitudeRad), longitudeDeg).getNormalized());

        if (LOGGER.isTraceEnabled())
        {
            LOGGER.trace(" Latitude = " + Math.toDegrees(latitudeRad) + " Longitude = " + longitudeDeg);
        }

        return geoPos;
    }

    public  UTM(double latD, double lonD);

}