I'm using Nasa's Worldwind java API to convert MGRS strings to lat/lon. However, when my latitude is greater than 85 degrees or less than -85 degrees I get an error.
java.lang.IllegalArgumentException: Error during MGRS conversion
Here is my input
MGRSCoord.fromString("ZAD 00000 66856", null);
I'm creating the MGRS from worldwind was well.
Double latitude = 87.0;
Double longitude = 0.0;
Angle latitudeAngle = Angle.fromDegreesLatitude(latitude);
Angle longitudeAngle = Angle.fromDegreesLongitude(longitude);
String coordString = MGRSCoord.fromLatLon(latitudeAngle,longitudeAngle).toString();
MGRSCoord.fromString(coordString, null);
My guest guess is this is frdefault Globe
into the conversion by using null
, but I tried using actual Globe
s, but it didn't work, and frankly I didn't really know what to set it to.