(defun approach-angle (x y) "calculates angle ship should reach to enter orbiting circle around fortress using worldsurf coordinates" (let ((distance (sqrt (+ (expt (- x 355) 2) (expt (- y 313) 2)))) (angle-to-tan (asin (/ 140 (sqrt (+ (expt (- x 355) 2) (expt (- y 313) 2)))))) (angle-from-x (atan (- 313 y) (- 355 x)))) (if (< distance 140) (- 120 (* angle-from-x 57.2957795)) (* 57.2957795 (- angle-to-tan angle-from-x)))))