[search_quality] Fixed a bug in the lat-to-y conversion.

This commit is contained in:
Maxim Pimenov 2016-03-04 19:40:41 +03:00 committed by Sergey Yershov
parent 97d04e12cf
commit f94266ba67

4
search/search_quality/gen-samples.lisp Normal file → Executable file
View 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)