forked from organicmaps/organicmaps
[search_quality] Fixed a bug in the lat-to-y conversion.
This commit is contained in:
parent
97d04e12cf
commit
f94266ba67
1 changed files with 1 additions and 3 deletions
4
search/search_quality/gen-samples.lisp
Normal file → Executable file
4
search/search_quality/gen-samples.lisp
Normal file → Executable file
|
@ -29,9 +29,7 @@ exec /usr/local/bin/sbcl --noinform --quit --load $0 --end-toplevel-options "$@"
|
|||
(defun lon-to-x (lon) lon)
|
||||
(defun lat-to-y (lat)
|
||||
(let* ((sinx (sin (deg-to-rad (clamp lat -86.0 86.0))))
|
||||
(result (rad-to-deg (/ (* 0.5
|
||||
(log (+ 1.0 sinx)))
|
||||
(- 1.0 sinx)))))
|
||||
(result (rad-to-deg (* 0.5 (log (/ (+ 1.0 sinx) (- 1.0 sinx)))))))
|
||||
(clamp-y result)))
|
||||
|
||||
(defclass pos () ((x :initarg :x)
|
||||
|
|
Loading…
Add table
Reference in a new issue