Fixed hop aroma calculation for dryhop additions

Thu, 25 Apr 2019 21:52:35 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 25 Apr 2019 21:52:35 +0200
changeset 342
3ac81572bb28
parent 341
9c4bc199be9e
child 343
82184e3be6d9

Fixed hop aroma calculation for dryhop additions

www/js/prod_edit.js file | annotate | diff | comparison | revisions
--- a/www/js/prod_edit.js	Tue Apr 23 19:53:26 2019 +0200
+++ b/www/js/prod_edit.js	Thu Apr 25 21:52:35 2019 +0200
@@ -372,7 +372,9 @@
 	function hopAromaContribution(bt, vol, use, amount) {
 		var result = 0;
 
-		if (bt > 20) {
+		if (use == 5) {		// Dry hop
+			result = 1.33;
+		} else if (bt > 20) {
 			result = 0;
 		} else if (bt > 7.5) {
 			result = 10.03 / (4 * Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * Math.pow((bt - 7.5) /4, 2));
@@ -382,8 +384,6 @@
 			result = 1.2;
 		} else if (use == 4) {	// Whirlpool
 			result = 1.2;
-		} else if (use == 5) {	// Dry hop
-			result = 1.33;
 		}
 		return (result * amount * 1000) / vol;
 	}

mercurial