(defparameter *resolution* 16)
(defparameter *impedance* 249)
-(defun 13B () (setq *resolution* 13 *volt-max* 10.0))
-(defun 16B () (setq *resolution* 16 *volt-max* 10.0))
+(defun 13-bit! () (setq *resolution* 13 *volt-max* 10.0))
+(defun 16-bit! () (setq *resolution* 16 *volt-max* 10.0))
-(defalias P3K 16B)
-(defalias SLC 16B)
-(defalias P1K 13B)
-(defalias DL4 13B)
+(defalias p3k! 16-bit!)
+(defalias slc! 16-bit!)
+(defalias p1k! 13-bit!)
+(defalias dl4! 13-bit!)
(defun max-counts (resolution) (- (^ 2 resolution) 1))
(defun cfm-circ (fpm radius) (float (* pi fpm (square (/ radius 12)))))
-(defun cfm-rect (fpm width height) (float (* fpm (/ width 12) (/ height 12))))
+(defun cfm-rect (fpm width height)
+ (float (* fpm (/ width 12) (/ height 12))))
(defun sat-water-press (temp)
- (+ 0.0182795
- (* temp 0.001029904)
- (* (square temp) 2.579408e-05)
- (* (cube temp) 2.400493e-07)
- (* (^ temp 4) 8.100939e-10)
- (* (^ temp 5) 3.256805e-11)
- (* (^ temp 6) -1.001922e-13)
- (* (^ temp 7) 2.44161e-16)))
+ (+ 0.0182795
+ (* temp 0.001029904)
+ (* (square temp) 2.579408e-05)
+ (* (cube temp) 2.400493e-07)
+ (* (^ temp 4) 8.100939e-10)
+ (* (^ temp 5) 3.256805e-11)
+ (* (^ temp 6) -1.001922e-13)
+ (* (^ temp 7) 2.44161e-16)))
(defun hum-ratio (humidity swp)
- (let ((hum-press (* (/ humidity 100.0) swp)))
- (/ (* hum-press 0.62198) (- 14.7 hum-press))))
+ (let ((hum-press (* (/ humidity 100.0) swp)))
+ (/ (* hum-press 0.62198) (- 14.7 hum-press))))
(defun gn-water-per-lb (humidity temp)
- (* 7000 (hum-ratio humidity (sat-water-press temp))))
+ (* 7000 (hum-ratio humidity (sat-water-press temp))))