fromLatLon

fun fromLatLon(latitude: Angle, longitude: Angle): MGRSCoord

Create a MGRS coordinate from a pair of latitude and longitude Angle with the maximum precision of five digits (one meter).

Return

the corresponding MGRSCoord.

Parameters

latitude

the latitude Angle.

longitude

the longitude Angle.

Throws

if the conversion to MGRS coordinates fails.


fun fromLatLon(latitude: Angle, longitude: Angle, precision: Int): MGRSCoord

Create a MGRS coordinate from a pair of latitude and longitude Angle with the given precision or number of digits (1 to 5).

Return

the corresponding MGRSCoord.

Parameters

latitude

the latitude Angle.

longitude

the longitude Angle.

precision

the number of digits used for easting and northing (1 to 5).

Throws

if the conversion to MGRS coordinates fails.