Code for representing and converting between geographical coordinate systems, taken from Stack overflow.
The code has been cleaned up a bit to make it more "object oriented" and according to common java idioms and coding standards.
There are two classes, for UTM-coordinates and WGS84-coordinates. Example usage:
WGS84 wgs_a = new WGS84(56,-5);
UTM utm_a = new UTM(31, 'V', 375273.85, 6207884.59);
WGS84 wgs_b = new WGS84(utm_a);
UTM utm_b = new UTM(wgs_a);
More explanations of the math can be found here.
There is no error-handling...