www/js/global.js

changeset 133
22d28dd9c041
parent 121
875aeb365e1c
child 136
bcc4583fd013
equal deleted inserted replaced
132:aaefac2d08a3 133:22d28dd9c041
104 } 104 }
105 105
106 106
107 107
108 /* 108 /*
109 * Alcohol By Volume
110 */
111 function abvol(og, fg) {
112
113 if ((4.749804 - fg) != 0)
114 return 486.8693 * (og - fg) / (4.749804 - fg);
115 return 0;
116 }
117
118
119
120 /*
109 * Kleurwerking naar SRM 121 * Kleurwerking naar SRM
110 */ 122 */
111 function kw_to_srm(colormethod, c) { 123 function kw_to_srm(colormethod, c) {
112 124
113 if (colormethod == "Morey") 125 if (colormethod == "Morey")
185 else 197 else
186 sgfactor = (gravity - 1050) / 200; 198 sgfactor = (gravity - 1050) / 200;
187 ibu = Math.round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) * 10) / 10; 199 ibu = Math.round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) * 10) / 10;
188 } 200 }
189 201
190 console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor); 202 // console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor);
191 return ibu; 203 return ibu;
192 } 204 }
193 205
194 206
195 207

mercurial