www/includes/formulas.php

changeset 89
082c23b26055
parent 88
0a39cbdcf085
child 90
d4246abee34e
--- a/www/includes/formulas.php	Mon Nov 12 11:32:16 2018 +0100
+++ b/www/includes/formulas.php	Mon Nov 12 16:34:43 2018 +0100
@@ -175,6 +175,26 @@
 }
 
 
+/*
+ * Kleurwerking naar SRM
+ */
+function kw_to_srm($colormethod, $c) {
+
+	if ($colormethod == "Morey")
+		return 1.49 * pow($c, 0.69);
+	if ($colormethod == "Mosher")
+		return 0.3 * $c + 4.7;
+	if ($colormethod == "Daniels")
+		return 0.2 * $c + 8.4;
+}
+
+
+
+function kw_to_ebc($colormethod, $c) {
+	return srm_to_ebc(kw_to_srm($colormethod, $c));
+}
+
+
 
 /*
 
@@ -537,7 +557,6 @@
 end;
 
 
-  CalcOG;
   CalcBitterness;
 
         // Get concentration of ions in diluted brewwater (1) and target water (2) in mmol/l

mercurial