proj4js / mgrs

Utility for converting between WGS84 lat/lng and MGRS coordinates
MIT License
105 stars 45 forks source link

Accuracy values? #13

Closed spyhunter99 closed 5 years ago

spyhunter99 commented 9 years ago

The documentation for the accuracy field is confusing

In one function it's (function forward)

      //   5 for 1 m, 
      //   4 for 10 m, 
      //   3 for 100 m, 
      //   4 for 1000 m or 
      //   5 for 10000 m

In another function, "accuracy (in meters)"

I'm actually trying to figure out how to use

function encode(utm, accuracy)
gajus commented 7 years ago

That snippet of information is wrong. The greater the number, the bigger the accuracy. Accuracy to the precision of 1000m is therefore 2, not 4.

DanielJDufour commented 5 years ago

Good catch. A new maintainer here :-) We'll fix that.

DanielJDufour commented 5 years ago

This should be fixed now. Let me know if you have any questions: https://github.com/proj4js/mgrs/blob/master/mgrs.js#L42 image