瀏覽代碼

Added Windage functions and headers for other categories

Samuel W. Flint 9 年之前
父節點
當前提交
2973511977
共有 1 個文件被更改,包括 28 次插入0 次删除
  1. 28 0
      cl-ballistics.lisp

+ 28 - 0
cl-ballistics.lisp

@@ -91,3 +91,31 @@
           moa-to-radians
           radians-to-degrees
           radians-to-moa))
+
+;;; Windage functions
+
+(defun windage (wind-speed vi xx tv)
+  (declare (real wind-speed vi xx tv))
+  (let ((wind-speed-inches-per-second (* wind-speed 17.60)))
+    (* wind-speed-inches-per-second (/ (- tv xx) vi))))
+
+(defun head-wind (wind-speed wind-angle)
+  (declare (real wind-speed wind-angle))
+  (* (cos (degrees-to-radians wind-angle))
+     wind-speed))
+
+(defun cross-wind (wind-speed wind-angle)
+  (* (sin (degrees-to-radians wind-angle))
+     wind-speed))
+
+(export '(windage
+          head-wind
+          cross-wind))
+
+;;; Bore angle functions
+
+
+;;; Solving
+
+
+;;; Retrieving Data