Artoria2e5 / PRCoords

Public Domain library for rectifying Chinese coordinates
https://artoria2e5.github.io/PRCoords/demo.html
GNU General Public License v3.0
151 stars 23 forks source link

Wrong lat_deg_arclen #10

Closed mrhso closed 5 years ago

mrhso commented 5 years ago

https://github.com/Artoria2e5/PRCoords/blob/master/js/PRCoords.js#L124 It should be (Math.PI / 180) * (GCJ_A * (1 - GCJ_EE)) / Math.pow(magic, 1.5), instead of (Math.PI / 180) * (GCJ_A * (1 - GCJ_EE)) * Math.pow(magic, 1.5). The bug is in all languages except lua. BTW, lon_deg_arclen (arclon) in Racket is also wrong.

Artoria2e5 commented 5 years ago

the FUCK how did this thing work at all

Artoria2e5 commented 5 years ago

fixed in 1.0.2

mrhso commented 5 years ago

Well, but... https://github.com/Artoria2e5/PRCoords/blob/master/racket/prcoords.rkt#L111

Artoria2e5 commented 5 years ago

yeah nah leave it for tomorrow..