dbamber/UkGeoTool

Odd difference of output between your library and the code you started from

Closed this issue · 1 comments

Dear dbamber,
I found a strange difference of behaviour between your function eastNorthToLatLong and the equivalent function you made that from, that is osGridToLatLong by Chris Veness at http://www.movable-type.co.uk/scripts/latlong-gridref.html.

If you feed the same input to both functions, they give different results, despite the source being the same (I've diff'ed the body of the functions to check). The difference is particularly big on longitude.

The code I used for testing is available at https://gist.github.com/giacecco/6751808 .

It is even more interesting that, starting from Chris Veness' code, I translated the function to R (a programming language for data analysis I need to use for some research) and my results are consistent with Chris', not with yours :-( This does not mean that Chris and my versions are 'right', this is why I am still investigating.

If you have any idea and find the problem before me, please share!

Giacecco

False alarm, it was all an error in my testing scripts, I am sorry.