Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
MGRS | LATITUDE | LONGITUDE |
14SPB800720 | 33.172 | -97.069 |
14SQB084140 | 32.644 | -96.778 |
14SQB091410 | 32.888 | -96.764 |
14SQB086520 | 32.987 | -96.767 |
14SQB074850 | 33.285 | -96.772 |
14SQB056720 | 33.168 | -96.795 |
14SQB047900 | 33.330 | -96.800 |
14SQB047890 | 33.321 | -96.800 |
14SQB047270 | 32.762 | -96.814 |
After adding the parts in bold font the radians result is now converted to degrees:
System.out.println( "Output LAT/LONG:"+ String.format("%s, %s", cs.getLatitude()*180/3.14159265, cs.getLongitude()*180/3.14159265));
Am I doing something wrong?
I am finally able call the routine when I did this:
With the job CLOSED, right click the job in the repository.
Then click "Setup routine dependencies".
Select the custom routine.
I am getting output now, but the results are in radians instead of degrees:
Input MGRS: 14SQC6530479576
Output LAT/LONG: 0.5955656176832095, -1.6776699450841455
#Results I am trying to get:
input = 14SQC6530479576
lat lon = 34.123,-96.123
#tJava:
MGRSCoordConverter cs = new MGRSCoordConverter();
context.myResult = String.valueOf(cs.convertMGRSToGeodetic("14SQC6530479576"));
System.out.println(String.format("%s, %s", cs.getLatitude(), cs.getLongitude() ));
#routine
package routines;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.Angle;
import gov.nasa.worldwind.geom.coords.UPSCoord;
After adding the parts in bold font the radians result is now converted to degrees:
System.out.println( "Output LAT/LONG:"+ String.format("%s, %s", cs.getLatitude()*180/3.14159265, cs.getLongitude()*180/3.14159265));