-
Notifications
You must be signed in to change notification settings - Fork 48
Description
I've been trying to figure out why 46.83087249468004, -71.29936529210055 would result in 38DNF6550888223 (the middle of nowhere).
But using earthpoint.us, it would result in 19TCM2464188936.
I'm not a geodesy expert, so when I saw some of the comments mention lat/long instead of long/lat, it caused me to pass the arguments as lat/long, but the function expect long/lat.
From the npm/github description
Utility for converting between WGS84 lat/lng and MGRS coordinates
And 3 places in the code:
Line 74 in 65bd498
| * Convert lat/lon to MGRS. |
Line 109 in 65bd498
| * Convert MGRS to lat/lon bounding box. |
Line 235 in 65bd498
| * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience |
And 3 places in the types:
Line 3 in 65bd498
| * Convert lat/lon to MGRS. |
Line 14 in 65bd498
| * Convert MGRS to lat/lon bounding box. |
Line 25 in 65bd498
| * Convert MGRS to lat/lon point. |
I guess the params are typed correctly:
@param ll
Array with longitude and latitude on a WGS84 ellipsoid.
But there is no runtime check, so it took some time to figure out.