Turbo87 / utm

Bidirectional UTM-WGS84 converter for python
http://pypi.python.org/pypi/utm
MIT License
486 stars 101 forks source link

Possible bug in conversion.py #2

Closed geoffleyland closed 11 years ago

geoffleyland commented 11 years ago

I think line 24 of conversion.py should be

P3 = (21 * _E2 / 16 - 55 * _E4 / 32)

Rather than

P3 = (21 * _E3 / 16 - 55 * _E4 / 32)

Of course you'll need to define _E2 further up (or, possibly better, use Horner's method and write

P3 = _E*_E * (21/16 - _E*_E * 55/32)

)

Turbo87 commented 11 years ago

I'm currently on vacation. I'll have a look once I get back.

Turbo87 commented 11 years ago

@geoffleyland thanks for finding this bug! I've actually improved the precision even further now :)